From b36d082b9f91c4fe6e9c360fe5e2fe914c88589b Mon Sep 17 00:00:00 2001 From: DSIW Date: Fri, 10 Jun 2016 03:13:09 +0200 Subject: [PATCH 1/9] Restyle password cards --- .../utils/PasswordRecyclerAdapter.java | 27 ++++--- .../res/layout/password_recycler_view.xml | 6 +- .../main/res/layout/password_row_layout.xml | 72 +++++++++++-------- 3 files changed, 57 insertions(+), 48 deletions(-) diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java index 45dd0d0b..3f240515 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java @@ -71,19 +71,18 @@ public class PasswordRecyclerAdapter extends RecyclerView.Adapter + android:layout_height="match_parent"/> - + android:layout_marginBottom="0dp" + android:layout_marginLeft="8dp" + android:layout_marginRight="8dp" + android:layout_marginTop="0dp"> - + card_view:cardElevation="4dp" + card_view:cardUseCompatPadding="true" + card_view:contentPaddingLeft="4dp" + card_view:contentPaddingTop="4dp"> - - - - \ No newline at end of file + android:gravity="left"> + + + + + + + \ No newline at end of file From 09f12c81c12ed1993446e98779661d25ced42ad3 Mon Sep 17 00:00:00 2001 From: DSIW Date: Fri, 10 Jun 2016 03:23:35 +0200 Subject: [PATCH 2/9] Remove CardView and use divider for separation --- .../zeapo/pwdstore/DividerItemDecoration.java | 51 ++++++++++++++ .../com/zeapo/pwdstore/PasswordFragment.java | 7 +- .../utils/PasswordRecyclerAdapter.java | 18 +++-- app/src/main/res/drawable/divider.xml | 6 ++ .../main/res/layout/password_row_layout.xml | 66 ++++++++----------- 5 files changed, 97 insertions(+), 51 deletions(-) create mode 100644 app/src/main/java/com/zeapo/pwdstore/DividerItemDecoration.java create mode 100644 app/src/main/res/drawable/divider.xml diff --git a/app/src/main/java/com/zeapo/pwdstore/DividerItemDecoration.java b/app/src/main/java/com/zeapo/pwdstore/DividerItemDecoration.java new file mode 100644 index 00000000..7bc66b62 --- /dev/null +++ b/app/src/main/java/com/zeapo/pwdstore/DividerItemDecoration.java @@ -0,0 +1,51 @@ +package com.zeapo.pwdstore; + +import android.content.Context; +import android.content.res.TypedArray; +import android.graphics.Canvas; +import android.graphics.drawable.Drawable; +import android.support.v4.content.ContextCompat; +import android.support.v7.widget.RecyclerView; +import android.view.View; + +public class DividerItemDecoration extends RecyclerView.ItemDecoration { + + private static final int[] ATTRS = new int[]{android.R.attr.listDivider}; + + private Drawable mDivider; + + /** + * Default divider will be used + */ + public DividerItemDecoration(Context context) { + final TypedArray styledAttributes = context.obtainStyledAttributes(ATTRS); + mDivider = styledAttributes.getDrawable(0); + styledAttributes.recycle(); + } + + /** + * Custom divider will be used + */ + public DividerItemDecoration(Context context, int resId) { + mDivider = ContextCompat.getDrawable(context, resId); + } + + @Override + public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) { + int left = parent.getPaddingLeft(); + int right = parent.getWidth() - parent.getPaddingRight(); + + int childCount = parent.getChildCount(); + for (int i = 0; i < childCount; i++) { + View child = parent.getChildAt(i); + + RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams(); + + int top = child.getBottom() + params.bottomMargin; + int bottom = top + mDivider.getIntrinsicHeight(); + + mDivider.setBounds(left, top, right, bottom); + mDivider.draw(c); + } + } +} diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java index 1daa4f90..79401fbd 100644 --- a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java +++ b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java @@ -74,8 +74,11 @@ public class PasswordFragment extends Fragment{ recyclerView = (RecyclerView) view.findViewById(R.id.pass_recycler); recyclerView.setLayoutManager(mLayoutManager); -// -// // Set the adapter + + // use divider + recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), R.drawable.divider)); + + // Set the adapter recyclerView.setAdapter(recyclerAdapter); final FloatingActionButton fab = (FloatingActionButton) view.findViewById(R.id.fab); diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java index 3f240515..af9a6776 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java @@ -33,14 +33,12 @@ public class PasswordRecyclerAdapter extends RecyclerView.Adapter + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/password_row_layout.xml b/app/src/main/res/layout/password_row_layout.xml index 61c089df..0b877934 100644 --- a/app/src/main/res/layout/password_row_layout.xml +++ b/app/src/main/res/layout/password_row_layout.xml @@ -8,49 +8,37 @@ android:layout_marginRight="8dp" android:layout_marginTop="0dp"> - + android:padding="8dp" + android:gravity="left"> - + android:alpha="0.5" + android:maxLines="1" + android:ellipsize="start" + android:text="TYPE" + android:textSize="14dp" + android:textColor="@android:color/black" + android:layout_alignParentTop="true" + android:layout_alignLeft="@+id/label" + android:layout_alignStart="@+id/label" /> - + + - - - \ No newline at end of file From 0e700ce21b042030f41d3c488807afb925461f08 Mon Sep 17 00:00:00 2001 From: DSIW Date: Fri, 10 Jun 2016 04:49:35 +0200 Subject: [PATCH 3/9] Add icons to list item --- .../utils/PasswordRecyclerAdapter.java | 13 ++++++- .../res/drawable-hdpi/ic_action_secure.png | Bin 0 -> 394 bytes .../drawable-hdpi/ic_folder_grey600_24dp.png | Bin 0 -> 140 bytes .../res/drawable-mdpi/ic_action_secure.png | Bin 0 -> 317 bytes .../drawable-mdpi/ic_folder_grey600_24dp.png | Bin 0 -> 123 bytes .../res/drawable-xhdpi/ic_action_secure.png | Bin 0 -> 510 bytes .../drawable-xhdpi/ic_folder_grey600_24dp.png | Bin 0 -> 194 bytes .../res/drawable-xxhdpi/ic_action_secure.png | Bin 0 -> 624 bytes .../ic_folder_grey600_24dp.png | Bin 0 -> 259 bytes .../main/res/layout/password_row_layout.xml | 34 +++++++++++------- 10 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/ic_action_secure.png create mode 100644 app/src/main/res/drawable-hdpi/ic_folder_grey600_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_action_secure.png create mode 100644 app/src/main/res/drawable-mdpi/ic_folder_grey600_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_action_secure.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_folder_grey600_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_action_secure.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_folder_grey600_24dp.png diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java index af9a6776..e1b33e2a 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java @@ -1,5 +1,6 @@ package com.zeapo.pwdstore.utils; +import android.os.Build; import android.support.v7.view.ActionMode; import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; @@ -8,6 +9,7 @@ import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; +import android.widget.ImageView; import android.widget.TextView; import com.zeapo.pwdstore.PasswordFragment; @@ -35,12 +37,14 @@ public class PasswordRecyclerAdapter extends RecyclerView.AdapterUPz(kVRjTi87u+`{IDQ-XbUm?Lc60~AXAJ^0E^!t>>HkbhQzgt`_2q3Ua@jr zx6JeWVO#)<_Ysa2Lm67Eqr$0>$RN?`>oo7+0|>>jO4djwtxoC#nkTM3wYmAUgQWFE zcT`nzbYCR8eLaU60r4~y@walR$Kskfj0&U;u1UuvASpUJ$C$w2P=EqMz6+sdZxFU0 zU5?mcRhcYnrm;okDMVu5P;TSCcH(8l#?`hY%7>6K2Pi-R3Q&Lo6rcbFC_sTh`1SX| o&1&}7NgE1_5JCuP$XkE`04cRe$f0T_ga7~l07*qoM6N<$f@2n|k0wldT1B8K8u&0Y-h{y4_S2yx9DDW^J)aej7 zydym(q0@kYQDh3+$@l-Fx;OMYJGM)$jysX|=gPE?LGCA2IE!l#;Xn1f6D!FLL nNcjguFRb}7QMXy;&11EnM`}*_Yc$LN8qeVA>gTe~DWM4fpph+; literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_action_secure.png b/app/src/main/res/drawable-mdpi/ic_action_secure.png new file mode 100644 index 0000000000000000000000000000000000000000..d49217234375e7bf5965a40e23110a8856333b86 GIT binary patch literal 317 zcmV-D0mA-?P)F6XV1NN5xf+d)jk$o7 z43zui?Af#5=;8pN#j-#u42adxq;3K6DxgCi)64-t%R!cA0x=g3C7@844s^sVsyhH0 zAVhm*>!2#+>>{VFg zSK&}gH3ta87}$arO-z^;4xkBO8q@_5FkuNJ1t%!)%RBmTE;w>u-j25YN5P;5009O7cRV+8N`jHk P00000NkvXXu0mjf2nTdi literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_folder_grey600_24dp.png b/app/src/main/res/drawable-mdpi/ic_folder_grey600_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..88cb71c30826585289d5ee0926cad2cd97e8f4f1 GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM0wlfaz7_*1Cr=m05R22v2@+}xOg4N;eOa$^ z!@+}jRneg+gDJ_)>%IPZUjDHEi|R_LfBjh!pQPdhmp){5YPO&DrEB4yE9E;<(iyHx WuamPdR}BW5#^CAd=d#Wzp$P!@nJVl6 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_action_secure.png b/app/src/main/res/drawable-xhdpi/ic_action_secure.png new file mode 100644 index 0000000000000000000000000000000000000000..2a0898381a14166d1f1b363ff3a41f120471f4d7 GIT binary patch literal 510 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+7#DcDIEGZ*dNX6a|6vD_By5}z(&%8&JNK@9 zql@xS`59|vrA}U%lw{a3$)rPyWoymsISY3l+WK@;-tU^p)4lV`^K0im^mku`&c1764NZ0d#fsKbWv}yir|NG?KX~FgTSL?Suwqqd zD?d%+hn@my+Pnvr{BkL~cF9#~_Ai~@-17~)S>$Kz6rRt&<8k3v_bj*lJesfnI!~KD z<^Fofa*4LYiK#blpPJI(`FHoMS@Tb)UG+VeGwEquVccf*JHIqo^(7aG?q1{hm!0+F zimN)S?5EUjaw#r8eaH6Z@_wBUTiI`f6|Q^myx!L&S;&3zz#zTW?>*DA7`X^No#fNq{&z0? zy;1bDvv<9``^ed7@^$S7TJYD@<);T3K0RW@2)cpVe literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_folder_grey600_24dp.png b/app/src/main/res/drawable-xhdpi/ic_folder_grey600_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..7f135821196aad7cfbbce581dd75ff1945da3056 GIT binary patch literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}b0DPEQxdkch)?uNm?+8wj`r`Z4c& z@ZM5DsIgg)Ws0X+?h*;f%g*QIm6TPfh3E>u~~{vjLEBb-)v?4?fO8~p+VY!k%@&vgW3J9dp#fPv3!M% sZD;kj?A#xll=MBGFS#skrTsfz-^*K9EZ@vN7w9MkPgg&ebxsLQ07djh$p8QV literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_action_secure.png b/app/src/main/res/drawable-xxhdpi/ic_action_secure.png new file mode 100644 index 0000000000000000000000000000000000000000..d8c094ed86aaf11d95485d47fed6143e12ac2f9d GIT binary patch literal 624 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGok|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n1noC978H@y_vn<|FDBd!)g7EQb%|q%^GJOoZutceQZ%7 zOS5BA`;&Ty^M3xx5k{>m97|3bm~!y6eLuv>@#dY|?X3m(r^jej)n4ECzUq4Rb`2(= z%`nj5b@NBIx{U-+(#?|TZ|3?Gp$!W4+_#Wo@nUouEO!GbUuppYt*uE$$OPG&QX6pJw&u&ANq_qI>j(fr){UgMmeXL7;&l!gy-kBolkXjTbk)$*z`p-~D!J{OPNHlKQOK zf&#TQ8UJ-Xx6I>Lv+e(Elg^RE2i1jQ1YS;pWaxj#$J0cZVUY!-9oFvQHeg5>D%-&} Rubc%W;pyt^zK^z#4! literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_folder_grey600_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_folder_grey600_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..5ab94892adfe719ca766ce7a7c08ef4de5095226 GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY0wn)GsXhawPIj?J!ZWnJ==Ag`6pt}e%>vX>n^_s){@ ztWuY}kl^-End>Tkt1a_9W6T=wOx%&rvQz2f9iFKDjkB66q`rLO__a=%mpdi1^AJL8xXNTaZ9n!UhWk#?4r9HHWdc=JfC~n zN5-~Sap~7Hp3nN88(NC){k`7D)9j~}m*&zd@!uHL?uu>k`Ioo}=qm + android:layout_height="wrap_content"> + + + android:textColor="@color/grey_500" + android:layout_alignTop="@+id/type_image" + android:layout_toRightOf="@+id/type_image" + android:layout_toEndOf="@+id/type_image" /> + android:layout_alignLeft="@+id/type" + android:layout_alignStart="@+id/type" /> \ No newline at end of file From 7a25cbf1d69d74142e1f694481a8aebbb90ab466 Mon Sep 17 00:00:00 2001 From: DSIW Date: Fri, 10 Jun 2016 04:50:24 +0200 Subject: [PATCH 4/9] Fix multiple selection with RecyclerView --- .../utils/PasswordRecyclerAdapter.java | 33 ++++++++++--------- .../res/layout/password_recycler_view.xml | 2 +- .../main/res/layout/password_row_layout.xml | 2 +- app/src/main/res/values/colors.xml | 2 ++ 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java index e1b33e2a..e9109bce 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java @@ -1,8 +1,8 @@ package com.zeapo.pwdstore.utils; +import android.graphics.Color; import android.os.Build; import android.support.v7.view.ActionMode; -import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.Menu; @@ -91,7 +91,8 @@ public class PasswordRecyclerAdapter extends RecyclerView.Adapter + android:background="?android:attr/activatedBackgroundIndicator"> + #ff7043 + #fde0dc #f9bdbb #f69988 From da1e95241db7c4377058c1abff9115ca3557c81a Mon Sep 17 00:00:00 2001 From: DSIW Date: Fri, 10 Jun 2016 05:43:56 +0200 Subject: [PATCH 5/9] Restyle password entry activity --- .../main/res/drawable/category_rectangle.xml | 15 -------- app/src/main/res/drawable/gray_rectangle.xml | 24 ------------ app/src/main/res/drawable/oval.xml | 37 ------------------- .../main/res/drawable/password_rectangle.xml | 15 -------- .../res/drawable/password_row_background.xml | 5 --- .../main/res/layout/activity_pgp_handler.xml | 1 - app/src/main/res/layout/decrypt_layout.xml | 26 +++++++------ app/src/main/res/layout/encrypt_layout.xml | 2 - 8 files changed, 15 insertions(+), 110 deletions(-) delete mode 100644 app/src/main/res/drawable/category_rectangle.xml delete mode 100644 app/src/main/res/drawable/gray_rectangle.xml delete mode 100644 app/src/main/res/drawable/oval.xml delete mode 100644 app/src/main/res/drawable/password_rectangle.xml delete mode 100644 app/src/main/res/drawable/password_row_background.xml diff --git a/app/src/main/res/drawable/category_rectangle.xml b/app/src/main/res/drawable/category_rectangle.xml deleted file mode 100644 index 1516662d..00000000 --- a/app/src/main/res/drawable/category_rectangle.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/gray_rectangle.xml b/app/src/main/res/drawable/gray_rectangle.xml deleted file mode 100644 index b1858c80..00000000 --- a/app/src/main/res/drawable/gray_rectangle.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/oval.xml b/app/src/main/res/drawable/oval.xml deleted file mode 100644 index d2149d04..00000000 --- a/app/src/main/res/drawable/oval.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/password_rectangle.xml b/app/src/main/res/drawable/password_rectangle.xml deleted file mode 100644 index e1a19127..00000000 --- a/app/src/main/res/drawable/password_rectangle.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/password_row_background.xml b/app/src/main/res/drawable/password_row_background.xml deleted file mode 100644 index 8f39b056..00000000 --- a/app/src/main/res/drawable/password_row_background.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/activity_pgp_handler.xml b/app/src/main/res/layout/activity_pgp_handler.xml index b5dfba53..3c79b37d 100644 --- a/app/src/main/res/layout/activity_pgp_handler.xml +++ b/app/src/main/res/layout/activity_pgp_handler.xml @@ -13,7 +13,6 @@ + android:textSize="18dp" + android:textIsSelectable="false" + android:layout_marginLeft="16dp" /> + android:layout_marginLeft="@dimen/activity_horizontal_margin" + android:textSize="24dp" /> + + @@ -40,7 +39,6 @@ android:layout_height="fill_parent" android:layout_marginTop="@dimen/activity_vertical_margin" android:layout_marginBottom="@dimen/activity_vertical_margin" - android:background="@drawable/rectangle" android:layout_weight="1"> Date: Fri, 10 Jun 2016 06:30:25 +0200 Subject: [PATCH 6/9] 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 a80e4800..f984ad31 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 1ee8e3c9..98a6b04d 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"/> - -