From 1b90b46b00802c07f68843897fb9e7b5afa29460 Mon Sep 17 00:00:00 2001 From: Daniel Albert Date: Thu, 26 Jun 2014 21:33:42 +0200 Subject: [PATCH 1/3] Swapped out FontawesomeText with normal ImageView --- .../src/main/res/layout/drawer_list_item.xml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/OpenKeychain/src/main/res/layout/drawer_list_item.xml b/OpenKeychain/src/main/res/layout/drawer_list_item.xml index 72f4fec50..158e72c01 100644 --- a/OpenKeychain/src/main/res/layout/drawer_list_item.xml +++ b/OpenKeychain/src/main/res/layout/drawer_list_item.xml @@ -3,17 +3,14 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - + android:layout_centerVertical="true" /> + android:layout_alignParentTop="true" /> From 567e5cc6a52277dce4f3e1214ff3b247ca26f68f Mon Sep 17 00:00:00 2001 From: Daniel Albert Date: Fri, 27 Jun 2014 21:03:19 +0200 Subject: [PATCH 2/3] Added unlock icon, fixed drawer items, switched to icons from resource in drawer --- .../keychain/ui/DrawerActivity.java | 26 ++++++++++-------- .../drawable-hdpi/ic_action_not_secure.png | Bin 0 -> 373 bytes .../drawable-mdpi/ic_action_not_secure.png | Bin 0 -> 321 bytes .../drawable-xhdpi/ic_action_not_secure.png | Bin 0 -> 483 bytes .../drawable-xxhdpi/ic_action_not_secure.png | Bin 0 -> 619 bytes .../src/main/res/layout/drawer_list_item.xml | 8 ++++-- 6 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 OpenKeychain/src/main/res/drawable-hdpi/ic_action_not_secure.png create mode 100644 OpenKeychain/src/main/res/drawable-mdpi/ic_action_not_secure.png create mode 100644 OpenKeychain/src/main/res/drawable-xhdpi/ic_action_not_secure.png create mode 100644 OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_not_secure.png diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java index 9a5050eba..586442bb0 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java @@ -37,8 +37,7 @@ import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; - -import com.beardedhen.androidbootstrap.FontAwesomeText; +import android.widget.ImageView; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; @@ -79,10 +78,10 @@ public class DrawerActivity extends ActionBarActivity { } NavItem mItemIconTexts[] = new NavItem[]{ - new NavItem("fa-user", getString(R.string.nav_keys)), - new NavItem("fa-lock", getString(R.string.nav_encrypt)), - new NavItem("fa-unlock", getString(R.string.nav_decrypt)), - new NavItem("fa-android", getString(R.string.nav_apps))}; + new NavItem(R.drawable.ic_action_person, getString(R.string.nav_keys)), + new NavItem(R.drawable.ic_action_secure, getString(R.string.nav_encrypt)), + new NavItem(R.drawable.ic_action_not_secure, getString(R.string.nav_decrypt)), + new NavItem(R.drawable.ic_action_view_as_list, getString(R.string.nav_apps))}; mDrawerList.setAdapter(new NavigationDrawerAdapter(this, R.layout.drawer_list_item, mItemIconTexts)); @@ -239,10 +238,15 @@ public class DrawerActivity extends ActionBarActivity { } private class NavItem { - public String icon; + public int icon; // res-id public String title; - public NavItem(String icon, String title) { + /** + * NavItem constructor + * @param icon The icons resource-id + * @param title The title of the menu entry + */ + public NavItem(int icon, String title) { super(); this.icon = icon; this.title = title; @@ -271,7 +275,7 @@ public class DrawerActivity extends ActionBarActivity { row = inflater.inflate(mLayoutResourceId, parent, false); holder = new NavItemHolder(); - holder.mImg = (FontAwesomeText) row.findViewById(R.id.drawer_item_icon); + holder.mImg = (ImageView) row.findViewById(R.id.drawer_item_icon); holder.mTxtTitle = (TextView) row.findViewById(R.id.drawer_item_text); row.setTag(holder); @@ -281,7 +285,7 @@ public class DrawerActivity extends ActionBarActivity { NavItem item = mData[position]; holder.mTxtTitle.setText(item.title); - holder.mImg.setIcon(item.icon); + holder.mImg.setImageResource(item.icon); return row; } @@ -289,7 +293,7 @@ public class DrawerActivity extends ActionBarActivity { } static class NavItemHolder { - FontAwesomeText mImg; + ImageView mImg; TextView mTxtTitle; } diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_not_secure.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_not_secure.png new file mode 100644 index 0000000000000000000000000000000000000000..5ee1480802a3dd9e8f033b3f7607f4658c0b989c GIT binary patch literal 373 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@jN+ayjv*Dd-b}ORYjO~AJs7c(EjQORk#pOvTd$;Y*5<}C zuVakL))LB!(pkCjtDlid${};(nx5|}`Ys7=)ekHaB3lHUOg8xXzu5JTPdZThO4K{Q z!2A#y*FYO@Mi%kJ^Gh$3a?DhBxpb4`#E0-HmkT}ms%A{sz}q6e@V)87?uOS=ozf~r zb6@N8+B5{a{$Tj3b;$Fi?W+K*;}etju4LVIDxd%0;ZJ;;kDOHwf4gL`&7Aw}x0@Q} z_JN1Bl^#U|)o~T|WwK~h?LI9ex&4gcs)pdt%X6dMWzopr008TeI{*Lx literal 0 HcmV?d00001 diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_not_secure.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_not_secure.png new file mode 100644 index 0000000000000000000000000000000000000000..dd5289ee4557606f88d73183d1af2e37902da899 GIT binary patch literal 321 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWw1Gk3C%+Ln>}1B}lL;%Nk5teeuSP2r-XBr=9oD&$InKLywOk zDu-dop@s+v-&eW<>zS;cFljzBoSd;!b%GablAg{b1;b!X&6V5F&$q94DrINTWsjV| zeq>F+!p9DKSUb)$e3Vz1*4nk2QMORxMaTUkGfq1>F+?c+tl>6TVXk~KmcdFugw-y< zRAFm%r{R=N7WNZL8#hYs6K{`NWyvt_MZ>=TZF-$*YChcT7g&0%8eYUO^gO#Rg6WcrI}5HbF6NUcJ+Ok=V^vQd<40evw-wg6eoM0cU~p()WZ2ekx^8m0 RStHQ944$rjF6*2UngCnqbZY@Q+uD}ZWd?Zl3Z6_V-78YJ=6Crk_<2NEnj+fp8C$1ZQt&Ft9`fb?bc&JTN&PH zve(KRcuq22sTTE0B3wBE4JvZprjw2CZphYC6%~AMt>_?RKlRl$<-+M5$1f;9 z(kS>;Hsii!+iw1{RWWXXQ>Lf>w6tQ}I?w*Sz_DXH1UU1R9$Fu%lw+4+xL*I|k5|{+ z$5a2=O%%#rzux#_#OaGM%wN3zKe&3atgU_Dnns*KMK#Z!DV%4nI#< KKbLh*2~7a3m%{M? literal 0 HcmV?d00001 diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_not_secure.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_not_secure.png new file mode 100644 index 0000000000000000000000000000000000000000..4aa9dc85cc4ae1480573204cb416922d326f5b75 GIT binary patch literal 619 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGok|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n0P&1978H@y_v0>f5<_i;k21?&hir*T$NU}-8oZt(4ELi@ZUYhAwIKb_s#e8i~lu_)83xnCMx;uq!K$kG3(Yq&ku?ewG0aP2>? zN*Xt(3K<9sX0y!j|2KKwAFV(kJHZLIKbu39L^po+@rwC$Rxl3RAu6{*8U9F;ewQtrN81nEq4EUr*d-O z+Nte0fu=&b+Qw+ R3r~TBJzf1=);T3K0RXmi^tk{4 literal 0 HcmV?d00001 diff --git a/OpenKeychain/src/main/res/layout/drawer_list_item.xml b/OpenKeychain/src/main/res/layout/drawer_list_item.xml index 158e72c01..4719483da 100644 --- a/OpenKeychain/src/main/res/layout/drawer_list_item.xml +++ b/OpenKeychain/src/main/res/layout/drawer_list_item.xml @@ -4,9 +4,10 @@ android:layout_height="wrap_content"> + android:layout_alignParentTop="true" + android:layout_toRightOf="@id/drawer_item_icon"/> From d19c97a714410493fa89166c83aac774b435c866 Mon Sep 17 00:00:00 2001 From: Daniel Albert Date: Sat, 28 Jun 2014 12:25:41 +0200 Subject: [PATCH 3/3] Switched to the dark icons --- .../drawable-hdpi/ic_action_view_as_list.png | Bin 308 -> 309 bytes .../drawable-mdpi/ic_action_view_as_list.png | Bin 246 -> 245 bytes .../drawable-xhdpi/ic_action_view_as_list.png | Bin 337 -> 341 bytes .../drawable-xxhdpi/ic_action_view_as_list.png | Bin 431 -> 441 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_view_as_list.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_view_as_list.png index 86da228e978a34f5fa521e94f8b4ecbf3eda9302..e08afae85297483fdb2c472cdd14d082adaf87f6 100644 GIT binary patch delta 244 zcmVMQZCYr(fUE2PZB}3a=I{W_k*whb zsF@*k4k=X%1mZYi<$cMbLAraG=R@RK;>iI30000^O|kYy@BKwCl~G?)jPa!k@M*p` z0tm838~^|SU5UT*RPN;_>uLrd$J|4+dpV|^DS#9lZ~%aP5^V?NUhcALc3?w#8~|Y7 zAnTL|+5Ad6%R%OpA7+WfNSu(wqevW-B_1pR$^#@e-GLg30r3}~GOSS$ZH~;_u0Gyk*00RK9;vynvLsGo}0000!#5{@_kz&44aaxMKoM{Jc#&%l5K0Bmbyt#Tt< zmSnJOWI_33dL%~Tf+S8Naa5Lgv;^=wNNhR-4H5%zzD{f^@shAB{W#s>0001#CGoVw tpNMa{bOF{Ilf)7N00000c#oF=0|1M)E;*wH$y)#b002ovPDHLkV1m8!VtN1o diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_view_as_list.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_view_as_list.png index ccb4c7d7b2a505b6dfb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