mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 03:46:00 +01:00
Show price
This commit is contained in:
@@ -40,6 +40,7 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
|
||||
private TextView tvList;
|
||||
private Button btnPurchase;
|
||||
private TextView tvPrice;
|
||||
private TextView tvPriceHint;
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
@@ -52,11 +53,14 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
|
||||
tvList = view.findViewById(R.id.tvList);
|
||||
btnPurchase = view.findViewById(R.id.btnPurchase);
|
||||
tvPrice = view.findViewById(R.id.tvPrice);
|
||||
tvPriceHint = view.findViewById(R.id.tvPriceHint);
|
||||
|
||||
tvList.setText(HtmlHelper.fromHtml(
|
||||
"<a href=\"" + BuildConfig.PRO_FEATURES_URI + "\">" + Html.escapeHtml(getString(R.string.title_pro_list)) + "</a>"));
|
||||
tvList.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
||||
tvPrice.setText(null);
|
||||
|
||||
btnPurchase.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@@ -65,11 +69,24 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
|
||||
}
|
||||
});
|
||||
|
||||
tvPrice.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
tvPriceHint.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
addBillingListener(new ActivityBilling.IBillingListener() {
|
||||
@Override
|
||||
public void onSkuDetails(String sku, String price) {
|
||||
if (ActivityBilling.SKU_PRO.equals(sku))
|
||||
tvPrice.setText(price);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
Reference in New Issue
Block a user