From 5b341fb0186bd27b5cd8f34fe8f39dcc4ebd00a4 Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Fri, 25 May 2018 11:47:00 -0500 Subject: [PATCH] Create LicenseActivity and blue and green button styles --- app/src/main/AndroidManifest.xml | 8 +-- .../activities/LicenseActivity.java | 38 +++++++++++++ .../res/drawable/send_button_background.xml | 2 +- app/src/main/res/layout/activity_license.xml | 53 +++++++++++++++++++ app/src/main/res/layout/create_seed.xml | 2 +- .../res/layout/fragment_accounts_settings.xml | 2 +- .../fragment_import_account_options.xml | 2 +- app/src/main/res/values/colors.xml | 3 +- app/src/main/res/values/strings.xml | 6 +-- app/src/main/res/values/styles.xml | 14 +++++ 10 files changed, 118 insertions(+), 12 deletions(-) create mode 100644 app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java create mode 100644 app/src/main/res/layout/activity_license.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2a633fc..850e19e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -16,15 +16,17 @@ android:supportsRtl="true" android:configChanges="locale" android:theme="@style/AppTheme"> - + + + diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java new file mode 100644 index 0000000..2842601 --- /dev/null +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java @@ -0,0 +1,38 @@ +package cy.agorise.crystalwallet.activities; + +import android.os.Bundle; +import android.support.annotation.Nullable; +import android.support.v7.app.AppCompatActivity; +import android.webkit.WebView; + +import butterknife.BindView; +import butterknife.ButterKnife; +import butterknife.OnClick; +import cy.agorise.crystalwallet.R; + +public class LicenseActivity extends AppCompatActivity { + + @BindView(R.id.wvEULA) WebView wvEULA; + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_license); + ButterKnife.bind(this); + + // TODO check if license has been agreed + + String html = getString(R.string.licence_html); + wvEULA.loadData(html, "text/html", "UTF-8"); + } + + @OnClick(R.id.btnAgree) + public void onAgree() { + // TODO send user to Intro activity if no active account or to Board activity otherwise + } + + @OnClick(R.id.btnDisAgree) + public void onDisagree() { + finish(); + } +} diff --git a/app/src/main/res/drawable/send_button_background.xml b/app/src/main/res/drawable/send_button_background.xml index d54df51..1fceb6b 100644 --- a/app/src/main/res/drawable/send_button_background.xml +++ b/app/src/main/res/drawable/send_button_background.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_license.xml b/app/src/main/res/layout/activity_license.xml new file mode 100644 index 0000000..f78bf4e --- /dev/null +++ b/app/src/main/res/layout/activity_license.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + +