mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 09:16:00 +00:00
Small layout improvement
This commit is contained in:
parent
9ff0ce2685
commit
f78151e5c8
2 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="@string/title_pro_activated"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
android:textColor="?attr/colorWarning"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPending" />
|
||||
|
||||
|
|
Loading…
Reference in a new issue