diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
index a80e48009..f984ad31c 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
@@ -81,6 +81,10 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
this.activity = this;
this.clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
+ if (getIntent().getStringExtra("Operation").equals("ENCRYPT")) {
+ setTitle("New password");
+ }
+
// some persistance
settings = PreferenceManager.getDefaultSharedPreferences(this);
String providerPackageName = settings.getString("openpgp_provider_list", "");
@@ -121,7 +125,11 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
- getMenuInflater().inflate(R.menu.pgp_handler, menu);
+ if (getIntent().getStringExtra("Operation").equals("ENCRYPT")) {
+ getMenuInflater().inflate(R.menu.pgp_handler_new_password, menu);
+ } else {
+ getMenuInflater().inflate(R.menu.pgp_handler, menu);
+ }
return true;
}
@@ -141,6 +149,13 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
break;
case R.id.edit_password:
editPassword();
+ case R.id.crypto_confirm_add:
+ encrypt(new Intent());
+ break;
+ case R.id.crypto_cancel_add:
+ setResult(RESULT_CANCELED);
+ finish();
+ return true;
}
return super.onOptionsItemSelected(item);
}
@@ -205,12 +220,6 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
case R.id.crypto_show_button:
decryptAndVerify(new Intent());
break;
- case R.id.crypto_confirm_add:
- encrypt(new Intent());
- break;
- case R.id.crypto_cancel_add:
- finish();
- break;
case R.id.crypto_delete_button:
// deletePassword();
break;
diff --git a/app/src/main/res/drawable-hdpi/ic_action_save.png b/app/src/main/res/drawable-hdpi/ic_action_save.png
deleted file mode 100644
index 0fe36a1ec..000000000
Binary files a/app/src/main/res/drawable-hdpi/ic_action_save.png and /dev/null differ
diff --git a/app/src/main/res/drawable-mdpi/ic_action_save.png b/app/src/main/res/drawable-mdpi/ic_action_save.png
deleted file mode 100644
index 664260d8c..000000000
Binary files a/app/src/main/res/drawable-mdpi/ic_action_save.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_action_save.png b/app/src/main/res/drawable-xhdpi/ic_action_save.png
deleted file mode 100644
index dde278b5e..000000000
Binary files a/app/src/main/res/drawable-xhdpi/ic_action_save.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_action_save.png b/app/src/main/res/drawable-xxhdpi/ic_action_save.png
deleted file mode 100644
index ccf8c82cd..000000000
Binary files a/app/src/main/res/drawable-xxhdpi/ic_action_save.png and /dev/null differ
diff --git a/app/src/main/res/drawable/selected_rectangle.xml b/app/src/main/res/drawable/selected_rectangle.xml
deleted file mode 100644
index ec8d2ad86..000000000
--- a/app/src/main/res/drawable/selected_rectangle.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- -
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/encrypt_layout.xml b/app/src/main/res/layout/encrypt_layout.xml
index 1ee8e3c98..98a6b04db 100644
--- a/app/src/main/res/layout/encrypt_layout.xml
+++ b/app/src/main/res/layout/encrypt_layout.xml
@@ -5,24 +5,24 @@
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.zeapo.pwdstore.crypto.PgpHandler"
- android:background="#eee">
+ android:background="#eee"
+ android:padding="@dimen/activity_horizontal_margin">
+ android:orientation="vertical">
+ android:textColor="@color/grey_500"
+ android:text="CATEGORY HERE"
+ android:id="@+id/crypto_password_category"
+ android:layout_gravity="center_vertical"
+ android:textSize="18dp"
+ android:textIsSelectable="false"
+ android:layout_marginLeft="@dimen/activity_horizontal_margin" />
-
+ android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
+ android:textSize="24dp"
+ android:textColor="@color/accent" />
-
+ android:layout_height="wrap_content">
-
@@ -57,20 +55,29 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
- android:text="@string/crypto_pass_label"/>
-
-
-
+ android:text="@string/crypto_pass_label"
+ android:id="@+id/textView2"
+ android:layout_centerVertical="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true" />
+
+
+
+
+
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/menu/pgp_handler_new_password.xml b/app/src/main/res/menu/pgp_handler_new_password.xml
new file mode 100644
index 000000000..92be4363a
--- /dev/null
+++ b/app/src/main/res/menu/pgp_handler_new_password.xml
@@ -0,0 +1,15 @@
+