mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 03:46:00 +01:00
Small layout improvement
This commit is contained in:
@@ -23,6 +23,7 @@ import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Paint;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
@@ -43,6 +44,8 @@ import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.core.graphics.ColorUtils;
|
||||
import androidx.core.widget.TextViewCompat;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
@@ -280,7 +283,12 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
|
||||
post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
int color = Helper.resolveColor(btnPurchase.getContext(), R.attr.colorInfoForeground);
|
||||
if (purchased)
|
||||
color = ColorUtils.setAlphaComponent(color, (int) Math.round(0.6 * 255));
|
||||
btnPurchase.setEnabled(!purchased);
|
||||
btnPurchase.setTextColor(color);
|
||||
TextViewCompat.setCompoundDrawableTintList(btnPurchase, ColorStateList.valueOf(color));
|
||||
tvPending.setVisibility(View.GONE);
|
||||
btnConsume.setEnabled(purchased);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user