|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|