IAB one-time

pull/199/head
M66B 4 years ago
parent 5f37972889
commit 689d26f19c

@ -57,8 +57,8 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
private CheckBox cbHide; private CheckBox cbHide;
private TextView tvList; private TextView tvList;
private Button btnPurchase; private Button btnPurchase;
private TextView tvPrice;
private ImageView ivExternal; private ImageView ivExternal;
private TextView tvPrice;
private TextView tvPriceHint; private TextView tvPriceHint;
private TextView tvFamilyHint; private TextView tvFamilyHint;
private TextView tvRestoreHint; private TextView tvRestoreHint;
@ -84,8 +84,8 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
cbHide = view.findViewById(R.id.cbHide); cbHide = view.findViewById(R.id.cbHide);
tvList = view.findViewById(R.id.tvList); tvList = view.findViewById(R.id.tvList);
btnPurchase = view.findViewById(R.id.btnPurchase); btnPurchase = view.findViewById(R.id.btnPurchase);
tvPrice = view.findViewById(R.id.tvPrice);
ivExternal = view.findViewById(R.id.ivExternal); ivExternal = view.findViewById(R.id.ivExternal);
tvPrice = view.findViewById(R.id.tvPrice);
tvPriceHint = view.findViewById(R.id.tvPriceHint); tvPriceHint = view.findViewById(R.id.tvPriceHint);
tvFamilyHint = view.findViewById(R.id.tvFamilyHint); tvFamilyHint = view.findViewById(R.id.tvFamilyHint);
tvRestoreHint = view.findViewById(R.id.tvRestoreHint); tvRestoreHint = view.findViewById(R.id.tvRestoreHint);
@ -174,7 +174,7 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
tvActivated.setVisibility(View.GONE); tvActivated.setVisibility(View.GONE);
cbHide.setVisibility(View.GONE); cbHide.setVisibility(View.GONE);
btnPurchase.setEnabled(!play); btnPurchase.setEnabled(!play);
tvPrice.setText(null); tvPrice.setVisibility(View.GONE);
ivExternal.setVisibility(play ? View.GONE : View.VISIBLE); ivExternal.setVisibility(play ? View.GONE : View.VISIBLE);
tvFamilyHint.setVisibility(play ? View.VISIBLE : View.GONE); tvFamilyHint.setVisibility(play ? View.VISIBLE : View.GONE);
tvRestoreHint.setVisibility(play ? View.VISIBLE : View.GONE); tvRestoreHint.setVisibility(play ? View.VISIBLE : View.GONE);
@ -205,7 +205,8 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
@Override @Override
public void onSkuDetails(String sku, String price) { public void onSkuDetails(String sku, String price) {
if (ActivityBilling.getSkuPro().equals(sku)) { if (ActivityBilling.getSkuPro().equals(sku)) {
tvPrice.setText(price); tvPrice.setText(getString(R.string.title_pro_one_time, price));
tvPrice.setVisibility(View.VISIBLE);
btnPurchase.setEnabled(true); btnPurchase.setEnabled(true);
} }
} }

@ -17,8 +17,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/title_pro_pending" android:text="@string/title_pro_pending"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="?android:attr/textColorPrimary" android:textColor="?attr/colorWarning"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -27,8 +27,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/title_pro_activated" android:text="@string/title_pro_activated"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvPending" /> app:layout_constraintTop_toBottomOf="@id/tvPending" />
@ -84,17 +83,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvList" /> app:layout_constraintTop_toBottomOf="@id/tvList" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:text="5 euro"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@+id/btnPurchase"
app:layout_constraintStart_toEndOf="@+id/btnPurchase"
app:layout_constraintTop_toTopOf="@+id/btnPurchase" />
<ImageView <ImageView
android:id="@+id/ivExternal" android:id="@+id/ivExternal"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -102,17 +90,17 @@
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:contentDescription="@string/title_pro_purchase" android:contentDescription="@string/title_pro_purchase"
app:layout_constraintBottom_toBottomOf="@+id/btnPurchase" app:layout_constraintBottom_toBottomOf="@+id/btnPurchase"
app:layout_constraintStart_toEndOf="@+id/tvPrice" app:layout_constraintStart_toEndOf="@+id/btnPurchase"
app:layout_constraintTop_toTopOf="@+id/btnPurchase" app:layout_constraintTop_toTopOf="@+id/btnPurchase"
app:srcCompat="@drawable/twotone_open_in_new_24" /> app:srcCompat="@drawable/twotone_open_in_new_24" />
<eu.faircode.email.FixedTextView <eu.faircode.email.FixedTextView
android:id="@+id/tvOnce" android:id="@+id/tvPrice"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp" android:layout_marginTop="12dp"
android:text="@string/title_pro_once" android:text="5 euro (once only)"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnPurchase" /> app:layout_constraintTop_toBottomOf="@+id/btnPurchase" />
@ -120,11 +108,11 @@
android:id="@+id/tvHint" android:id="@+id/tvHint"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="24dp"
android:text="@string/title_pro_hint" android:text="@string/title_pro_hint"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvOnce" /> app:layout_constraintTop_toBottomOf="@id/tvPrice" />
<eu.faircode.email.FixedTextView <eu.faircode.email.FixedTextView
android:id="@+id/tvPriceHint" android:id="@+id/tvPriceHint"

@ -1534,7 +1534,7 @@
<string name="title_pro_feature">This is a pro feature</string> <string name="title_pro_feature">This is a pro feature</string>
<string name="title_pro_list">List of pro features</string> <string name="title_pro_list">List of pro features</string>
<string name="title_pro_purchase">Buy</string> <string name="title_pro_purchase">Buy</string>
<string name="title_pro_once">Only once</string> <string name="title_pro_one_time">%1$s (one-time purchase)</string>
<string name="title_pro_info"> <string name="title_pro_info">
Developing FairEmail took literally thousands of hours and, despite that, most of the features are free to use. Developing FairEmail took literally thousands of hours and, despite that, most of the features are free to use.
FairEmail takes your privacy seriously and doesn\'t show ads and doesn\'t use tracking or analytics to earn money. FairEmail takes your privacy seriously and doesn\'t show ads and doesn\'t use tracking or analytics to earn money.

Loading…
Cancel
Save