Skip to content
Snippets Groups Projects
Commit f835e826 authored by Torsten Grote's avatar Torsten Grote
Browse files

Merge branch 'download-briar-button' into 'master'

Add download button to ExpiredActivity

See merge request akwizgran/briar!766
parents 87a92c9a d074e4a3
No related branches found
No related tags found
No related merge requests found
package org.briarproject.briar.android.splash; package org.briarproject.briar.android.splash;
import android.app.Activity; import android.content.Intent;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.View.OnClickListener;
import org.briarproject.briar.R; import org.briarproject.briar.R;
import static android.content.Intent.ACTION_VIEW;
import static android.view.WindowManager.LayoutParams.FLAG_SECURE; import static android.view.WindowManager.LayoutParams.FLAG_SECURE;
import static org.briarproject.briar.android.TestingConstants.PREVENT_SCREENSHOTS; import static org.briarproject.briar.android.TestingConstants.PREVENT_SCREENSHOTS;
public class ExpiredActivity extends Activity { public class ExpiredActivity extends AppCompatActivity
implements OnClickListener {
@Override @Override
public void onCreate(Bundle state) { public void onCreate(Bundle state) {
...@@ -17,5 +23,13 @@ public class ExpiredActivity extends Activity { ...@@ -17,5 +23,13 @@ public class ExpiredActivity extends Activity {
if (PREVENT_SCREENSHOTS) getWindow().addFlags(FLAG_SECURE); if (PREVENT_SCREENSHOTS) getWindow().addFlags(FLAG_SECURE);
setContentView(R.layout.activity_expired); setContentView(R.layout.activity_expired);
findViewById(R.id.download_briar_button).setOnClickListener(this);
}
@Override
public void onClick(View v) {
Uri uri = Uri.parse("https://briarproject.org/download.html");
startActivity(new Intent(ACTION_VIEW, uri));
finish();
} }
} }
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TextView <ScrollView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" android:orientation="vertical">
android:gravity="center"
android:text="@string/expiry_date_reached" <LinearLayout
android:textSize="@dimen/text_size_large"/> xmlns:android="http://schemas.android.com/apk/res/android"
\ No newline at end of file android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_large"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"
android:gravity="center"
android:text="@string/expiry_date_reached"
android:textSize="@dimen/text_size_large"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"
android:gravity="center"
android:text="@string/download_briar"
android:textSize="@dimen/text_size_large"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"
android:gravity="center"
android:text="@string/create_new_account"
android:textSize="@dimen/text_size_large"/>
<Button
android:id="@+id/download_briar_button"
style="@style/BriarButton.Default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"
android:text="@string/download_briar_button"/>
</LinearLayout>
</ScrollView>
\ No newline at end of file
...@@ -46,6 +46,9 @@ ...@@ -46,6 +46,9 @@
</plurals> </plurals>
<string name="expiry_update">The testing expiry date has been extended. Your account will now expire in %d days.</string> <string name="expiry_update">The testing expiry date has been extended. Your account will now expire in %d days.</string>
<string name="expiry_date_reached">This software has expired.\nThank you for testing!</string> <string name="expiry_date_reached">This software has expired.\nThank you for testing!</string>
<string name="download_briar">To continue using Briar, please download version 1.0.</string>
<string name="create_new_account">You will need to create a new account, but you can use the same nickname.</string>
<string name="download_briar_button">Download Briar 1.0</string>
<string name="startup_open_database">Decrypting Database…</string> <string name="startup_open_database">Decrypting Database…</string>
<string name="startup_migrate_database">Upgrading Database…</string> <string name="startup_migrate_database">Upgrading Database…</string>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment