diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 6aed77d..a5182a0 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -6,6 +6,7 @@
+
+
+
+
+
+
() {
@Override
public void onChanged(@Nullable AccountSeed accountSeed) {
- tvMnemonic.setText(accountSeed.getMasterSeed());
+ textfieldBrainkey.setText(accountSeed.getMasterSeed());
}
});
accountSeedViewModel.loadSeed(seedId);
@@ -56,4 +70,22 @@ public class BackupSeedActivity extends AppCompatActivity {
Intent intent = new Intent(this, IntroActivity.class);
startActivity(intent);
}
+
+ /*
+ * Clic on button copy to clipboard
+ * */
+ @OnClick(R.id.backup_seed_view_button_copy)
+ public void btnCopyClick(){
+
+ /*
+ * Save to clipboard the brainkey chain
+ * */
+ ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
+ ClipData clip = ClipData.newPlainText(textfieldBrainkey.getText(), textfieldBrainkey.getText().toString());
+ clipboard.setPrimaryClip(clip);
+
+ /*
+ * Success message
+ * */
+ }
}
diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/CreateSeedActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/CreateSeedActivity.java
index aa6d024..bb1f7a9 100644
--- a/app/src/main/java/cy/agorise/crystalwallet/activities/CreateSeedActivity.java
+++ b/app/src/main/java/cy/agorise/crystalwallet/activities/CreateSeedActivity.java
@@ -16,6 +16,7 @@ import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.OnTextChanged;
import cy.agorise.crystalwallet.R;
+import cy.agorise.crystalwallet.dialogs.ProgressCreatingAccountDialog;
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequestListener;
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequests;
import cy.agorise.crystalwallet.requestmanagers.ValidateCreateBitsharesAccountRequest;
@@ -25,6 +26,35 @@ import cy.agorise.crystalwallet.viewmodels.validators.CreateSeedValidator;
import cy.agorise.crystalwallet.viewmodels.validators.UIValidatorListener;
import cy.agorise.crystalwallet.viewmodels.validators.validationfields.ValidationField;
+
+
+/*
+* Commented code backup
+*
+*
+* alertBuilder.setTitle("Processing");
+ alertBuilder.setMessage("Creating Bitshares Account");
+
+ ------
+
+ AlertDialog.Builder alertBuilder = new AlertDialog.Builder(CreateSeedActivity.this,R.style.AppTheme);
+ alertBuilder.setView(R.layout.progress_creating_account);
+ final AlertDialog processDialog = alertBuilder.create();
+ CreateSeedActivity.this.runOnUiThread(new Runnable() { //Run on UI Thread
+ @Override
+ public void run() {
+ processDialog.setCancelable(false);
+ processDialog.show();
+ processDialog.getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+ }
+ });
+
+ */
+
+
+
+
+
public class CreateSeedActivity extends AppCompatActivity implements UIValidatorListener {
AccountSeedViewModel accountSeedViewModel;
@@ -111,25 +141,20 @@ public class CreateSeedActivity extends AppCompatActivity implements UIValidator
new ValidateCreateBitsharesAccountRequest(tietAccountName.getText().toString(), getApplicationContext());
+ //DTVV: Friday 27 July 2018
//Makes dialog to tell the user that the account is been created
- AlertDialog.Builder alertBuilder = new AlertDialog.Builder(CreateSeedActivity.this,R.style.AppTheme);
- alertBuilder.setView(R.layout.progress_creating_account);
- //alertBuilder.setTitle("Processing");
- //alertBuilder.setMessage("Creating Bitshares Account");
- final AlertDialog processDialog = alertBuilder.create();
+ final ProgressCreatingAccountDialog progressCreatingAccountDialog = new ProgressCreatingAccountDialog(CreateSeedActivity.this);
+ progressCreatingAccountDialog.show();
CreateSeedActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
- processDialog.setCancelable(false);
- processDialog.show();
- processDialog.getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+ progressCreatingAccountDialog.show();
}
});
-
request.setListener(new CryptoNetInfoRequestListener() {
@Override
public void onCarryOut() {
- processDialog.dismiss();
+ progressCreatingAccountDialog.dismiss();
if (request.getStatus().equals(ValidateCreateBitsharesAccountRequest.StatusCode.SUCCEEDED)) {
GrapheneAccount accountSeed = request.getAccount();
Intent intent = new Intent(getApplicationContext(), BackupSeedActivity.class);
diff --git a/app/src/main/res/anim/rotate360.xml b/app/src/main/res/anim/rotate360.xml
index 0efcc73..c582275 100644
--- a/app/src/main/res/anim/rotate360.xml
+++ b/app/src/main/res/anim/rotate360.xml
@@ -1,13 +1,17 @@
+
+
\ 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 9166b1c..26ab090 100644
--- a/app/src/main/res/layout/backup_seed.xml
+++ b/app/src/main/res/layout/backup_seed.xml
@@ -1,52 +1,91 @@
-
-
+ android:layout_centerInParent="true">
-
-
-
-
-
-
-
+ android:layout_marginLeft="@dimen/activity_horizontal_margin"
+ android:layout_marginRight="@dimen/activity_horizontal_margin"
+ android:layout_marginTop="10dp"
+ android:layout_marginBottom="20dp"
+ android:text="@string/window_seed_backup"
+ android:layout_centerHorizontal="true"
+ android:textSize="20dp"
+ android:textStyle="bold" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 72a2a81..aff0b55 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -33,6 +33,10 @@
Choose File
Please wait until Balances are loading
+ Backup brainkey
+ Copy
+ IMPORTANT: Print this out, or write it down. Anyone with access to your recovery key will have access to funds within this wallet
+
Seed
PIN (6+ digits)
PIN confirm