diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/IntroActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/IntroActivity.java
index f7057ae..fca4558 100644
--- a/app/src/main/java/cy/agorise/crystalwallet/activities/IntroActivity.java
+++ b/app/src/main/java/cy/agorise/crystalwallet/activities/IntroActivity.java
@@ -10,6 +10,8 @@ import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
@@ -23,6 +25,7 @@ import butterknife.ButterKnife;
import butterknife.OnClick;
import cy.agorise.crystalwallet.R;
import cy.agorise.crystalwallet.dao.CrystalDatabase;
+import cy.agorise.crystalwallet.fragments.ImportAccountOptionsFragment;
import cy.agorise.crystalwallet.models.AccountSeed;
import cy.agorise.crystalwallet.models.CryptoCoinBalance;
import cy.agorise.crystalwallet.models.CryptoCoinTransaction;
@@ -139,6 +142,15 @@ public class IntroActivity extends AppCompatActivity {
@OnClick(R.id.btnImportAccount)
public void importAccount() {
+ FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
+ Fragment prev = getSupportFragmentManager().findFragmentByTag("importAccountOptions");
+ if (prev != null) {
+ ft.remove(prev);
+ }
+ ft.addToBackStack(null);
+ // Create and show the dialog.
+ ImportAccountOptionsFragment newFragment = ImportAccountOptionsFragment.newInstance();
+ newFragment.show(ft, "importAccountOptions");
}
}
diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/ImportAccountOptionsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/ImportAccountOptionsFragment.java
new file mode 100644
index 0000000..d676d4c
--- /dev/null
+++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/ImportAccountOptionsFragment.java
@@ -0,0 +1,72 @@
+package cy.agorise.crystalwallet.fragments;
+
+import android.app.Dialog;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.DialogFragment;
+import android.support.v4.app.Fragment;
+import android.support.v7.app.AlertDialog;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.widget.Button;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import cy.agorise.crystalwallet.R;
+
+/**
+ * Created by xd on 1/25/18.
+ * Shows a dialog where the user can select how to import his/her existing account
+ */
+
+public class ImportAccountOptionsFragment extends DialogFragment {
+
+ @BindView(R.id.btnCancel)
+ Button btnClose;
+
+ public ImportAccountOptionsFragment() {
+ // Required empty public constructor
+ }
+
+ public static ImportAccountOptionsFragment newInstance() {
+ ImportAccountOptionsFragment fragment = new ImportAccountOptionsFragment();
+ Bundle args = new Bundle();
+ fragment.setArguments(args);
+ return fragment;
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ }
+
+ @NonNull
+ @Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+
+ LayoutInflater inflater = getActivity().getLayoutInflater();
+ View view = inflater.inflate(R.layout.fragment_import_account_options, null);
+ ButterKnife.bind(this, view);
+
+ return builder.setView(view).create();
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+
+ // Force dialog fragment to use the full width of the screen
+ Window dialogWindow = getDialog().getWindow();
+ assert dialogWindow != null;
+ dialogWindow.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+ }
+
+ @OnClick(R.id.btnCancel)
+ public void cancel() {
+ dismiss();
+ }
+}
diff --git a/app/src/main/res/layout/fragment_import_account_options.xml b/app/src/main/res/layout/fragment_import_account_options.xml
new file mode 100644
index 0000000..3a461c2
--- /dev/null
+++ b/app/src/main/res/layout/fragment_import_account_options.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/import_seed.xml b/app/src/main/res/layout/import_seed.xml
index f043cfe..01ffc12 100644
--- a/app/src/main/res/layout/import_seed.xml
+++ b/app/src/main/res/layout/import_seed.xml
@@ -1,14 +1,24 @@
-
+ tools:context=".activities.ImportSeedActivity">
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom"/>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 98d571b..e1ae7d9 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -503,4 +503,7 @@
Camera feed to scan QR
Create Account
Import Account
+ Select one option to import your existing account
+ Import Account Seed
+ Import Account Backup