Improved layout

This commit is contained in:
M66B 2016-01-01 18:29:37 +01:00
parent f48de100b1
commit 642ff08405
2 changed files with 18 additions and 17 deletions

View File

@ -69,16 +69,6 @@ public class ActivityPro extends AppCompatActivity {
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
// Trial
long now = new Date().getTime();
long trial = IAB.getTrialEnd(this);
TextView tvTrial = (TextView) findViewById(R.id.tvTrial);
if (now < trial) {
DateFormat df = SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
tvTrial.setText(getString(R.string.title_pro_trial_until, df.format(trial)));
} else
tvTrial.setText(getString(R.string.title_pro_trial_ended));
// Initial state
updateState();
@ -171,6 +161,17 @@ public class ActivityPro extends AppCompatActivity {
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
Util.sendCrashReport(ex, ActivityPro.this);
}
// Trial
long now = new Date().getTime();
long trial = IAB.getTrialEnd(this);
TextView tvTrial = (TextView) findViewById(R.id.tvTrial);
if (now < trial) {
DateFormat df = SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
tvTrial.setText(getString(R.string.title_pro_trial_until, df.format(trial)));
} else
tvTrial.setText(getString(R.string.title_pro_trial_ended));
}
@Override

View File

@ -16,15 +16,8 @@
android:orientation="vertical">
<TextView
android:id="@+id/tvTrial"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Material.Medium" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/title_pro_description"
android:textAppearance="@android:style/TextAppearance.Material.Medium" />
@ -242,6 +235,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<TextView
android:id="@+id/tvTrial"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:textAppearance="@android:style/TextAppearance.Material.Medium" />
</LinearLayout>
</ScrollView>
</LinearLayout>