From d1c15a43d50f8df719a87251e7bb91c8f0acceb2 Mon Sep 17 00:00:00 2001 From: DSIW Date: Fri, 10 Jun 2016 06:30:25 +0200 Subject: [PATCH] Restyle new password formular --- .../com/zeapo/pwdstore/crypto/PgpHandler.java | 23 ++-- .../main/res/drawable-hdpi/ic_action_save.png | Bin 394 -> 0 bytes .../main/res/drawable-mdpi/ic_action_save.png | Bin 362 -> 0 bytes .../res/drawable-xhdpi/ic_action_save.png | Bin 441 -> 0 bytes .../res/drawable-xxhdpi/ic_action_save.png | Bin 495 -> 0 bytes .../main/res/drawable/selected_rectangle.xml | 21 ---- app/src/main/res/layout/encrypt_layout.xml | 102 +++++++----------- .../res/menu/pgp_handler_new_password.xml | 15 +++ 8 files changed, 69 insertions(+), 92 deletions(-) delete mode 100644 app/src/main/res/drawable-hdpi/ic_action_save.png delete mode 100644 app/src/main/res/drawable-mdpi/ic_action_save.png delete mode 100644 app/src/main/res/drawable-xhdpi/ic_action_save.png delete mode 100644 app/src/main/res/drawable-xxhdpi/ic_action_save.png delete mode 100644 app/src/main/res/drawable/selected_rectangle.xml create mode 100644 app/src/main/res/menu/pgp_handler_new_password.xml 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 0fe36a1ec3d5519890f4a978080ab567401f6cf4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 394 zcmV;50d@X~P)GDd`KZz4U!n2!bF8Vg~}1uL2sk0CtQ#x7_sKTZkQf3;ueQ2hi^I2o#WqBmqd8LtzI#nGqM_^ zoRLLaNL(B<>5+u=m4G&hi=)A1H3?Sb`xlI5`=&c~& z#0^M9hTOp3(iVY8w?3j1GYU;AN;qnI#9;>CifKY5;6o;cz4o?hA|Dj+se(7Kp=9X$ z+dF-LPQ2ZTRqsE#iLtg(POIL3w4#vsz89TNpfyzY*H%pE?8b#r=%1pHsg}}6o9TT^ oxkR9H;INe-2!bGv!bgAs0M`Oe{s;Z08UO$Q07*qoM6N<$f`(h64gdfE 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 664260d8c6a01580f05c23e407a270f9b7425d18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 362 zcmV-w0hRuVP)|n{gP19FMD7c7%}D z)uDE_$GML$fJR#~IAX@WydXD@{eWVx#yeHE7i@eCz{N9i^77iSF{Qdx0F;b@NLNU+ z1o7Asz$l1x#e%Q41`xCed#Es35DP$t{85XYS?Ei({;{YLHBq`AA;m6h;0@)T{w4M9 zO98Y9o$$H+PwniGhU!o18GZ$#_6*qvIvedKz7H1xH4m^YQ;5mAyaUJmUC*r zmAbAekPeF&DcA)KDQckf^iP8TaB&oKEDt44WBMt_ldk{+0K^$qNLVDtO8@`>07*qo IM6N<$f?n;B_5c6? 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 dde278b5e2186411cc5d71f54f5b7fc278066e90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 441 zcmV;q0Y?6bP)@_6J5wKF2%}Nf{+psjI zdDFy3;z>io^2fJaH8Go0G!AW4BrGD&VS|J+R{>v3NI}3?5>gTHv4oTad?X&)Pcx)8=rJT8VDP!XXvOe~ zL6$-61;gBC)(BrVy8Z@Vk?{WiE>2HFJz2ZT71_b+(8E4Kge zJH?hVF4?}fcaPkCEib=)%w_|r_^St z%72+{p$}zLWmcbP=t)&(ePZz7%K1iBRnLr~lta5Ft^TB%x0~^Ku3Orn%c^UnM0DL* zM5Z}7BywV>{xq{NX|*vhaWF8lED#9&qaf_Gr)-x<~`r7%GBHY8@qE!*O? zN&mJb=LWAJpq>5#A5>c&Crx;*?~~@8>%ATvd<+Z=c - - - - - - - - - - - - - - - - - - - \ 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"/> - -