From a1876733f5e99122861f1fad25ccdf9811688e7b Mon Sep 17 00:00:00 2001 From: dtvv Date: Thu, 6 Sep 2018 14:22:42 -0500 Subject: [PATCH] In the backup seed screen there is not option for brainkey backup --- .../activities/BackupSeedActivity.java | 9 +- .../fragments/BackupsSettingsFragment.java | 15 +++ app/src/main/res/anim/cycle_7.xml | 2 + app/src/main/res/anim/shake.xml | 4 + app/src/main/res/drawable/square.xml | 12 ++ app/src/main/res/layout/backup_seed.xml | 113 +++++++++--------- 6 files changed, 93 insertions(+), 62 deletions(-) create mode 100644 app/src/main/res/anim/cycle_7.xml create mode 100644 app/src/main/res/anim/shake.xml create mode 100644 app/src/main/res/drawable/square.xml diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/BackupSeedActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/BackupSeedActivity.java index 15b7d6b..1e4ebbc 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/BackupSeedActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/BackupSeedActivity.java @@ -18,6 +18,7 @@ import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import cy.agorise.crystalwallet.R; +import cy.agorise.crystalwallet.fragments.BackupsSettingsFragment; import cy.agorise.crystalwallet.models.AccountSeed; import cy.agorise.crystalwallet.viewmodels.AccountSeedViewModel; @@ -28,7 +29,7 @@ public class BackupSeedActivity extends AppCompatActivity { @BindView(R.id.tvBrainKey) TextView textfieldBrainkey; - @BindView(R.id.btnOk) + @BindView(R.id.btnCancel) Button btnOk; @BindView(R.id.btnCopy) Button btnCopy; @@ -60,14 +61,14 @@ public class BackupSeedActivity extends AppCompatActivity { accountSeedViewModel.loadSeed(seedId); } else { + finish(); } } - @OnClick(R.id.btnOk) + @OnClick(R.id.btnCancel) public void btnOkClick(){ - Intent intent = new Intent(this, IntroActivity.class); - startActivity(intent); + finish(); } /* diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/BackupsSettingsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/BackupsSettingsFragment.java index f20f11e..66dd34e 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/BackupsSettingsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/BackupsSettingsFragment.java @@ -2,6 +2,7 @@ package cy.agorise.crystalwallet.fragments; import android.arch.lifecycle.LiveData; import android.arch.lifecycle.Observer; +import android.content.Intent; import android.os.Bundle; import android.os.Environment; import android.support.annotation.Nullable; @@ -24,6 +25,8 @@ import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import cy.agorise.crystalwallet.R; +import cy.agorise.crystalwallet.activities.BackupSeedActivity; +import cy.agorise.crystalwallet.activities.IntroActivity; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.GeneralSetting; import cy.agorise.crystalwallet.requestmanagers.CreateBackupRequest; @@ -47,6 +50,9 @@ public class BackupsSettingsFragment extends Fragment{ return fragment; } + @BindView(R.id.btnBrainkey) + public Button btnBrainkey; + @BindView(R.id.tvBinFile) public TextView tvBinFile; @@ -81,6 +87,15 @@ public class BackupsSettingsFragment extends Fragment{ return ssb; } + + @OnClick(R.id.btnBrainkey) + public void btnBrainOnClick(){ + + Intent intent = new Intent(getContext(), BackupSeedActivity.class); + startActivity(intent); + } + + @OnClick(R.id.btnBinFile) public void makeBackupFile(){ if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { diff --git a/app/src/main/res/anim/cycle_7.xml b/app/src/main/res/anim/cycle_7.xml new file mode 100644 index 0000000..c396f74 --- /dev/null +++ b/app/src/main/res/anim/cycle_7.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/app/src/main/res/anim/shake.xml b/app/src/main/res/anim/shake.xml new file mode 100644 index 0000000..c79b244 --- /dev/null +++ b/app/src/main/res/anim/shake.xml @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/app/src/main/res/drawable/square.xml b/app/src/main/res/drawable/square.xml new file mode 100644 index 0000000..efde959 --- /dev/null +++ b/app/src/main/res/drawable/square.xml @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/backup_seed.xml b/app/src/main/res/layout/backup_seed.xml index 0a50ef8..d892d28 100644 --- a/app/src/main/res/layout/backup_seed.xml +++ b/app/src/main/res/layout/backup_seed.xml @@ -3,88 +3,85 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:background="@color/white" android:paddingBottom="0dp" - android:paddingLeft="0dp" - android:paddingRight="0dp" + android:paddingLeft="25dp" + android:paddingRight="25dp" android:paddingTop="@dimen/activity_vertical_margin"> + android:layout_height="370dp" + android:background="@color/white" + android:padding="20dp" + android:layout_alignParentStart="true" + android:layout_centerVertical="true"> - + android:layout_marginTop="35dp" + android:background="@drawable/square" + android:padding="10dp"> - + + + + +