mirror of https://github.com/M66B/NetGuard.git
Improved layout
This commit is contained in:
parent
f48de100b1
commit
642ff08405
|
@ -69,16 +69,6 @@ public class ActivityPro extends AppCompatActivity {
|
||||||
|
|
||||||
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
|
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
|
// Initial state
|
||||||
updateState();
|
updateState();
|
||||||
|
|
||||||
|
@ -171,6 +161,17 @@ public class ActivityPro extends AppCompatActivity {
|
||||||
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
|
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
|
||||||
Util.sendCrashReport(ex, ActivityPro.this);
|
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
|
@Override
|
||||||
|
|
|
@ -16,15 +16,8 @@
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvTrial"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="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:text="@string/title_pro_description"
|
||||||
android:textAppearance="@android:style/TextAppearance.Material.Medium" />
|
android:textAppearance="@android:style/TextAppearance.Material.Medium" />
|
||||||
|
|
||||||
|
@ -242,6 +235,13 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
</LinearLayout>
|
</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>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
Reference in New Issue