From 9091c2224032c07a46988890a2767eecbb794634 Mon Sep 17 00:00:00 2001 From: Daniel Albert Date: Sun, 29 Jun 2014 13:59:51 +0200 Subject: [PATCH] Added new button style and converted account_settings and the select_secret_key_layout to use it --- .../remote/ui/AccountSettingsFragment.java | 7 ++-- .../ui/SelectSecretKeyLayoutFragment.java | 8 ++-- .../res/drawable-hdpi/ic_action_accounts.png | Bin 0 -> 641 bytes .../res/drawable-mdpi/ic_action_accounts.png | Bin 0 -> 506 bytes .../res/drawable-xhdpi/ic_action_accounts.png | Bin 0 -> 765 bytes .../drawable-xxhdpi/ic_action_accounts.png | Bin 0 -> 1093 bytes .../src/main/res/drawable/button_edgy.xml | 37 ++++++++++++++++++ .../layout/api_account_settings_fragment.xml | 9 ++--- .../select_secret_key_layout_fragment.xml | 9 ++--- 9 files changed, 51 insertions(+), 19 deletions(-) create mode 100644 OpenKeychain/src/main/res/drawable-hdpi/ic_action_accounts.png create mode 100644 OpenKeychain/src/main/res/drawable-mdpi/ic_action_accounts.png create mode 100644 OpenKeychain/src/main/res/drawable-xhdpi/ic_action_accounts.png create mode 100644 OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_accounts.png create mode 100644 OpenKeychain/src/main/res/drawable/button_edgy.xml diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java index cb58f8734..e49c11e08 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java @@ -28,8 +28,7 @@ import android.widget.AdapterView; import android.widget.AdapterView.OnItemSelectedListener; import android.widget.Spinner; import android.widget.TextView; - -import com.beardedhen.androidbootstrap.BootstrapButton; +import android.widget.Button; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; @@ -57,7 +56,7 @@ public class AccountSettingsFragment extends Fragment implements private Spinner mCompression; private SelectSecretKeyLayoutFragment mSelectKeyFragment; - private BootstrapButton mCreateKeyButton; + private Button mCreateKeyButton; KeyValueSpinnerAdapter mEncryptionAdapter; KeyValueSpinnerAdapter mHashAdapter; @@ -107,7 +106,7 @@ public class AccountSettingsFragment extends Fragment implements .findViewById(R.id.api_account_settings_encryption_algorithm); mHashAlgorithm = (Spinner) view.findViewById(R.id.api_account_settings_hash_algorithm); mCompression = (Spinner) view.findViewById(R.id.api_account_settings_compression); - mCreateKeyButton = (BootstrapButton) view.findViewById(R.id.api_account_settings_create_key); + mCreateKeyButton = (Button) view.findViewById(R.id.api_account_settings_create_key); mCreateKeyButton.setOnClickListener(new View.OnClickListener() { @Override diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectSecretKeyLayoutFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectSecretKeyLayoutFragment.java index b36270981..e156b8b9c 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectSecretKeyLayoutFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectSecretKeyLayoutFragment.java @@ -30,10 +30,9 @@ import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; +import android.widget.Button; import android.widget.TextView; -import com.beardedhen.androidbootstrap.BootstrapButton; - import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.pgp.KeyRing; import org.sufficientlysecure.keychain.pgp.PgpKeyHelper; @@ -45,7 +44,7 @@ public class SelectSecretKeyLayoutFragment extends Fragment implements LoaderMan private TextView mKeyUserIdRest; private TextView mKeyMasterKeyIdHex; private TextView mNoKeySelected; - private BootstrapButton mSelectKeyButton; + private Button mSelectKeyButton; private Boolean mFilterCertify, mFilterSign; private Uri mReceivedUri = null; @@ -117,8 +116,7 @@ public class SelectSecretKeyLayoutFragment extends Fragment implements LoaderMan mKeyUserId = (TextView) view.findViewById(R.id.select_secret_key_user_id); mKeyUserIdRest = (TextView) view.findViewById(R.id.select_secret_key_user_id_rest); mKeyMasterKeyIdHex = (TextView) view.findViewById(R.id.select_secret_key_master_key_hex); - mSelectKeyButton = (BootstrapButton) view - .findViewById(R.id.select_secret_key_select_key_button); + mSelectKeyButton = (Button) view.findViewById(R.id.select_secret_key_select_key_button); mFilterCertify = false; mFilterSign = false; mSelectKeyButton.setOnClickListener(new OnClickListener() { diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_accounts.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_accounts.png new file mode 100644 index 0000000000000000000000000000000000000000..7cc40731552e74f577b5b492903e34c3ba7af493 GIT binary patch literal 641 zcmV-{0)G98P)92pja zY0{Z$%tUKvH#^&YkJ;MwgH+eFN$s$ZFf&t8vx&WzJQ6~#z|nhGNba9pNGRprk9+Uk zdnbgImDQl-bp7LWIt}3xz;H{qQyhoG;is1XV6+F97{;t(cvT3p1(02D0Kj-OeBNNV z3}gc!DHp)FrSWfYd4_SX`2GhNPrmP;@;uLO0zk&ku9yR%CjgNF#J6sMQ46<`8K01Q zsOXhqNUQD|0(LI(>2;B1;2F$9%a(D0&n#eknp%NaV%VmfA}Ki63iHi$uRbU0h${^*lySQdTkS%b>pWzDBYP0jW|a;WfV5=-NQ_jYSpGrqZ9e z-NXBT*{e~kePEn50|d06xU4Hct8l_*1nYUt5V)$5j+JO^Xvmc?Z$}+EGIoeoEhTnR zI1%l{L7yO$k5x)16X6AzBaMXWq&C2qvOl_PaL%=#kbpeu3#z}l)UmNaID%Q+5Myot z^lgftsKuV5924vS+z>_pI3XNiSQHbFrCTpG@zEF)#sMTitA<9u7Gfm&uiDyad~55# z&x;l_scBa+CjKBE5?wv9&h~Owa;JsrxzP|@$O4$uR<##*`u0UB+sF=pzhniYm6g@N b^)J8xOs3Mz)bL2i00000NkvXXu0mjf%Yhh( literal 0 HcmV?d00001 diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_accounts.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_accounts.png new file mode 100644 index 0000000000000000000000000000000000000000..2bf88c183e3c35572a0b92c6d9a17090f7d5671a GIT binary patch literal 506 zcmVEtx7@7|rC zpA!UUJF$g6e@fF-V@TKy+-6y3CI^7TOAKqcZkV?4Er9GN0f6L>7*-xJKH;wbQjGyH z6DB94EP-Fc<$^o~!+Zs69f~%f*iF6Cx084KBfs?DAcuESuv{dC=StZ>9 zD-<>(0>JV*7DR>h`7wlOJGOlAB@qh|i3vm{=@6YZyM$k3?H6K{A}JIvh=YhJ z2H=30*K|brfCz&L4BJA)z4O_Q*&luYHy+VwicDyA4&R~eq$M{FCrX+>MF$2c;jzs2 wUD45$+0p7BJ{=`XJNY->+u&^f#eM}C01U~LRuO8By#N3J07*qoM6N<$g7z}lkN^Mx literal 0 HcmV?d00001 diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_accounts.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_accounts.png new file mode 100644 index 0000000000000000000000000000000000000000..f1ec295d2bf32c778e4fffd6f358a017868f1556 GIT binary patch literal 765 zcmVW_I@5ln+@K1G8BXO3|(1i%N%J|z&!N}3x5nNdUsWZgcK5h2PmdZUF z0M1H=;f$9FCB%pa9vVC+I8z6l3iS|!uVh2y)DnnQ&2GL8l|sEjcgr>wE)181P)QB=h7mC z&;|tUo**3gfJ0REb?XG7o#)GN=AFW`P7rbdfD=Cqp=;~7`ri=Byc(nBFtc@RWi3p< zQ*0N#ky_W76>?_J(a_0J?tTc){WBm_!W z(h%Cx04SU(tX2LVqLJkw4nP`$696P3I0HZmf>Qt_AOy-$aiMisZR)h!bL|e!0!V@K zWO|Eisd{S8^+jU=XhWzo04)eXl}D%f|B7_}xNm9%sHQIg51{S<;zk2Na-*)&qVmUK vLuUtS$t6cDrk1|)^78WX^71;=uK)u8tXCQ`kE7W?00000NkvXXu0mjfVUku% literal 0 HcmV?d00001 diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_accounts.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_accounts.png new file mode 100644 index 0000000000000000000000000000000000000000..da24654ebd28c91cc64eee94a735dd9f5b593125 GIT binary patch literal 1093 zcmV-L1iJf)P)QPebce0RQg z{{N+?RFh}>?sxC`z4Q5^2!bF8f*=TjAP9mW$eAjxFWBvN8}!pAYl$7p?^;W;C$d=n zUQDOcB>?2_^!H>Pvc>_YNXX`7cLZYr0O>ovz0vWe#NIF_5HkSS-SKt$8IbiX-aC83 zNPBpySm=Bn?Vrf%j@rNwZUNxA^ZWF3RX{s99NiFzL>qvr!Os6I@xBP1l3g^L&7Z5) z>UZe?NayzoZp(>A2uFs(PS2C}a6R$0G#(%i+>f5MsX<;)Aum`24M0-OA=#T0hjUds zA^Rce^p#3j{iGI(SeB+O)sU1BgbyV4pMaf^=lO? zhY1>~vEfR2tva8Zu5lmYLpV*knW{>qV>mR8Ew!&7Toxn~Yx_oQEFGIxx8gCzAINmS zz0f=$&FIfGQ6?3vt*qrTGyrMh^&t~vwqkW#yjDK|X-JyJ)IDowI}{H{+mME5opc@w zfR@29we49p0i2Z$KtqbGEJdA7wL$@KoZ;B3G%27Q(}_x|OqDQImRTp>Iy^B(cE3GE z%wdQAou>;vxM(O{Yfks@=o^5VgKO|y&pYby#YU>xE+8{G_R#}sj;>ReFjLx4W9k{8 zb_Ig3>xr@gc*2-17C@}Doy$-FXbnMeC;+ss%UlEjKwhvU3IWVQ@c`CbTl}Yi6Nd!g zP8ooS&o`GDfaKF!9>z&<07PRY0KBhT4qBG7TCE;rgexU$@w=1V}EzYIJ{Gvwj2s;G?_aSJl8%0@>ci|}a2O2z@ zcvML!I)NuR2CxO;t%A(RD+tEE5#xrCP52#f?pHP;ZbG3XP`L{yOI|#PF zl; zmz4lOv9kW{0|309&;Q;3+9m`5@Bjh?K@bE%5ClOG1VNA^{SjaQ%;%M0wGhv900000 LNkvXXu0mjf;9J%w literal 0 HcmV?d00001 diff --git a/OpenKeychain/src/main/res/drawable/button_edgy.xml b/OpenKeychain/src/main/res/drawable/button_edgy.xml new file mode 100644 index 000000000..d296642b8 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable/button_edgy.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/api_account_settings_fragment.xml b/OpenKeychain/src/main/res/layout/api_account_settings_fragment.xml index 32843eb29..7bb861547 100644 --- a/OpenKeychain/src/main/res/layout/api_account_settings_fragment.xml +++ b/OpenKeychain/src/main/res/layout/api_account_settings_fragment.xml @@ -1,6 +1,5 @@ - + android:background="@drawable/button_edgy" + android:drawableLeft="@drawable/ic_action_accounts" + android:textSize="14dip"/> - + android:drawableLeft="@drawable/ic_action_accounts" + android:background="@drawable/button_edgy" + android:textSize="14dp"/>