Restore purchase

This commit is contained in:
M66B
2020-08-23 10:11:39 +02:00
parent a9d435bc2f
commit ee4c738942
3 changed files with 24 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
private TextView tvPrice;
private ImageView ivExternal;
private TextView tvPriceHint;
private TextView tvRestoreHint;
private Button btnCheck;
@Override
@@ -71,6 +72,7 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
tvPrice = view.findViewById(R.id.tvPrice);
ivExternal = view.findViewById(R.id.ivExternal);
tvPriceHint = view.findViewById(R.id.tvPriceHint);
tvRestoreHint = view.findViewById(R.id.tvRestoreHint);
btnCheck = view.findViewById(R.id.btnCheck);
@@ -114,6 +116,14 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
}
});
tvRestoreHint.setPaintFlags(tvRestoreHint.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
tvRestoreHint.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Helper.viewFAQ(getContext(), 117);
}
});
btnCheck.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@@ -127,6 +137,7 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
cbHide.setVisibility(View.GONE);
btnPurchase.setEnabled(!Helper.isPlayStoreInstall());
tvPrice.setText(null);
tvRestoreHint.setVisibility(Helper.isPlayStoreInstall() || BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
btnCheck.setEnabled(false);
btnCheck.setVisibility(Helper.isPlayStoreInstall() && debug ? View.VISIBLE : View.GONE);