From dabddc2bf5d332352a229063b7ce45eb963827ad Mon Sep 17 00:00:00 2001 From: Anthony Restaino Date: Wed, 16 Jul 2014 17:12:01 -0400 Subject: [PATCH] Updated drawer UI and font --- res/drawable-hdpi/ic_action_plus.png | Bin 0 -> 181 bytes res/drawable-hdpi/ic_action_star.png | Bin 0 -> 884 bytes res/drawable-mdpi/ic_action_plus.png | Bin 0 -> 134 bytes res/drawable-mdpi/ic_action_star.png | Bin 0 -> 574 bytes res/drawable-xhdpi/ic_action_plus.png | Bin 0 -> 201 bytes res/drawable-xhdpi/ic_action_star.png | Bin 0 -> 1169 bytes res/drawable-xxhdpi/ic_action_plus.png | Bin 0 -> 268 bytes res/drawable-xxhdpi/ic_action_star.png | Bin 0 -> 1886 bytes res/layout/activity_main.xml | 113 +++++++++++------- res/layout/bookmark_list_item.xml | 1 + res/layout/tab_list_item.xml | 19 +-- res/values/styles.xml | 1 + .../browser/lightning/BrowserActivity.java | 22 ++-- 13 files changed, 99 insertions(+), 57 deletions(-) create mode 100644 res/drawable-hdpi/ic_action_plus.png create mode 100644 res/drawable-hdpi/ic_action_star.png create mode 100644 res/drawable-mdpi/ic_action_plus.png create mode 100644 res/drawable-mdpi/ic_action_star.png create mode 100644 res/drawable-xhdpi/ic_action_plus.png create mode 100644 res/drawable-xhdpi/ic_action_star.png create mode 100644 res/drawable-xxhdpi/ic_action_plus.png create mode 100644 res/drawable-xxhdpi/ic_action_star.png diff --git a/res/drawable-hdpi/ic_action_plus.png b/res/drawable-hdpi/ic_action_plus.png new file mode 100644 index 0000000000000000000000000000000000000000..aa7cf4f2c36c674a10fe46e3aaa5d64d27c6e9df GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpUt8c!F;kcwMxZ|>%7Fc5JF+`jQ# zI;XdKq1^VX?6iC?`GQzLlF=#H$y#GT=I2&jJ1T@Gq zK9aV}yJNL<%2Spjzs_x)bx!!WV@mDeBXR%OU;GpNB*p|&%22W9UA>{_rKM(ulHy;| SA5U!p$#}Z@xvXY*0=Xrd+oLM&`?;y5|*$uE3sJYJQCOiB$LUVaE8CXP!ABdS-of>5GSr^gIO?G*hKE@1c+;a^(Pp8uln~kB5F^ugCNx8%` zI*_9xa7#ocWhz-C^+K|Zr;$Wj#6}UuFqS#Y1p_QF!A6JM0PL!M^Amx-RDF#bRrL?5 zA4vYx!h@R7COKq`2)tsMKHiJPqXSv`YC1H6IIFEXf%5Eq&Un411vE8 z4%{-@xxa1_6-#`;$n@jMBw~M|=)&U^?My}bv4CmpR)=oPh1VHt7JmD&fam18OG`_q zPl~}@Fu>}^0*F&Kd-VLW<$G9diTh%!afL$RGSX%Ni(t79qq`}&T<$iu8;{5DHCvz# z=Yr)2#QzJ;2!a6?n7%EbmRU7=Cb0l;&pgx{ld82%HhP9>m&th%aFs=<;vjNGJ6Sfb zQXwdF1ZWkD?aPdHoG1FqzCE2t**C6#r@5&8JHEY9IACE&kugrQ0!!ateR*;rt+QRu zI?aWgwu4xI)M-|hi5+*EGP*UNoCRLnrgW#?T)K?=EA?1l`>}u(vt>+S-c9saZ&tQ| z6+cXf16u0DT)Idh|C^Q5F?e!-1W9JSw#^ym916iW-OT>Uk@Yst?E-%wltsHGnGeFg@*l ca03IwTEXnQx^wFO01amFboFyt=akR{07yJ6sQ>@~ literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/ic_action_star.png b/res/drawable-mdpi/ic_action_star.png new file mode 100644 index 0000000000000000000000000000000000000000..11e628d0bd3a89595f13d790913701bc466768b4 GIT binary patch literal 574 zcmV-E0>S->P)5XN(;s8|?Lu~GyBf{)AlrBT!Pf>;-U2@kdT;M zvLp&w7;bNNzHerBXCHw;zy0SHkH?3Qo&^wzMAnd=1&~N2?qadnZLg+(LC&iP{ayrc zD(4%?WO9>!x1EnmK0=|;FhU<)*8))12Xg5A2*^R#73cYUeo#~YDyLJPE*gzaqhqWa zm7kKct6Due#yWP8&1Of_>GX^ULn4f7YPZxcDC1*&&&gC7FV*7EF@}w6TL23OTyVnu zt8+jCe2L&i-y6w^NRFi6Q-59h)l4QcFH@@y++qwHY{7tq11^{I3m?sb*uYpaXK>fd z!3lS(>%1a)BO3$GnUOa*{cg2cfuFUuo9#LW3kO_n5#(~Y2@%|D>WU54y-~BkfQ6&u zT_Lh-WpU;>&OkGJY_J8>wCa5vJ|oKJvz3De8`pNk*x|!I7HQc>;g!Ld3}9Ds=)=AU z#^mjHDMGte9}b6?kvaj`U`+Y9xNdFR9`h8bRBBSX3+?R(gg!cN99u9xcTWAr8IBXL zz_hpbMgA_?q2dwx=os?~RsWA*P27I#k`hxb(kEU&dWZ(=JWzv-VS_CgupI}WtV-@J zR~6x63jr@OV_*ovL;+SrwB5=f^z$%sm!)E&0NZ}+xl3gQ`t2{bZ;=n5ge8sdy8r+H M07*qoM6N<$f`EJjssI20 literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/ic_action_plus.png b/res/drawable-xhdpi/ic_action_plus.png new file mode 100644 index 0000000000000000000000000000000000000000..9d6af042327a42ea1fe2adc96a25f40d1826b524 GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=6FglULn>~)z2(T&pdjE7*st

nqNOPhe;ZuTtDMliaEglOq_}lcHa(s5eMUtb--2sZF_(YI0QF-5A3Bqg zZ}VGM-O6p-pL}AQ<+W@4?SGFRxyks0C8i0BdZ3WO{-^cRr>l5gwr2cra#O~%{T!!2 O3O!x@T-G@yGywo~PCxSi literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/ic_action_star.png b/res/drawable-xhdpi/ic_action_star.png new file mode 100644 index 0000000000000000000000000000000000000000..6e5549750e566d5f9b22810963a76d09e3142407 GIT binary patch literal 1169 zcmV;C1aA9@P)q`_-6nA<`PooH|j5KSN1$Woo9T(g}ArwsWLs*Jipj00cLnb#Ph z6h0o0U+V4c-Nq10xEMzB&&%!~V_+Ue1*}>Wuo^1ilgZ>03jQ4fb6g9J0>tk>LFjBY z`vL=VTnmNp`F#GC?E0aMT^Uz6Fh9h-Fqr>1cYNAn5z};o@jwedFfedIc6t-Src$YU z>N@6(37c3GWZ%y*@-J3MiWX@ZxgckLMFziQg?lMl!IwY^FG6=vz#pYj>0J4JT*Eyo zs3VBGKT8uIwsDbRy2xyxgzxL?yCJ)~FM{p$^z>YVRBmetaYq5rw zG8zcsCnhG&i$ELn?KTIoqK$5_foK0KVLLlJFQdtUAZD6oLU!?)%nRJn5`F5T`3GMqVm z4%o1L*V1Z17?bgvi07qXY1XjNY6fpKeefD{yM@)NQdRh(m|KfRC3XvVQmHn0^(>;?}Mey(9T0)mYYol?h){Pz1$ zT=iRy!zo{aGtc-VGV!WGN1*{)mSb+n??NYy3XTlTc-hhdZYEez_#S9$5rt(J9?RIG zODv(&>j4dPkC#Ye3pBMlhb0={RWCVYlwz^ib+>Q>7jUYVDWIigCPqg0$mmTMcmJj` zdp8y9I^bPD8C~-r>aPK}*54BdgQizKJ=IeL4V@J*#oGV5+qi*Ko%z}-K;`3!MB={N zxPepEAzBL0Y78$u|9F%T8Ndx1I##16dATZ=>*@T|(EhX5 z!rWnu8DX<@Oh*MQ&;q(@)$Ss|$MW7CuGQ)>P-(D$1?^f?a#tvO-nA$PJ^!`zQqJ-&;_LlI^PFRLw2q{##nhpiT<-KmpTs=I-!#H0<0$y)*$$ofNRnZ+u#6 znY&Y{<`$qq1*~f!JihEwt?07oZfov!6j=Yb1rj36wfL$`7|L3YGnlSia%%35vp}m` zoaTL_mj%$IGIzX{vHJkxtWd!%CUsE2SA5u%%jF(5uf(RmrKy&yD10M{f@w`T^00000NkvXXu0mjfq8ued literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/ic_action_plus.png b/res/drawable-xxhdpi/ic_action_plus.png new file mode 100644 index 0000000000000000000000000000000000000000..3ec4d3ae878f54130df40add72d602f35dd57d7f GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGompxq^Ln>~)y=%zTpdir@c-^LN zSH;<7yK*@NFJ2Ld{Al+>eEBEAtsaUVlT=6CBHnv|zD06w>IrIE) z%MF--&N(ojaZii&{+8M{kgKr)tmePy`*X|-;=uSEMxDnO!n{)#O$2H8boFyt=akR{ E0LrgT8UO$Q literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/ic_action_star.png b/res/drawable-xxhdpi/ic_action_star.png new file mode 100644 index 0000000000000000000000000000000000000000..17cb4c8d0e7fe76d5b7e55c729577049164e19f4 GIT binary patch literal 1886 zcmV-k2ch_hP)W5laz%t4JMkkVlt>h4qvDjbu7DOwqDHM+njexj(5Mw55$Yp` zKFEXqx6FrTt?BCQo_%NE-QJ9}%Gti`&3v;vJ2N|bnT(Q>l9G~=l9G~=l9G~=QgSHE zO(_a06bi$|V)0`|A|e_c9lbg>Huj4m5dl@J)i+52yVQ1Yt%wYM^fzeqKSsl~A~Hal znwol{R4V;#6o6}dr^pP5XyH9#z&EX2E+0{32IP9ui2vPI0KQX~bTGF6u(17i(8TA% zictR*a7m2(X>LXVmlUD?g8v4!Z3cXcuJ@zinia5(dlacY5!v}!Ve@|$-_MEfXBDYF z(9qD(^EA4f4D!E~O65cI8?Nyk&w?iIRm4Ij0(U~#`d=-NCyVdQ?;|54pDJP@yPgE_ zO`(9Q$NEqezu#1sG+f(1B*5LIsCSP?bi4<@iTgfMLM~;P~<|O z$;ruArR#~$o$i$`X{URY{4c(BVOB2qh!rmQnJr5G0t6KjE=^}@KM_+Rv) zNcOIPstB-FeR?)X)~$B(n3Vi0;6^XLJ?<3>_)U@Qfoiqd2Li;ux-liV7yo1aAAKpJ z-7miLLIEdxm^~-OVmz;ib_d>mvg7{*$#BZdDf&X6imd<9A4-nj-aAla+Yr(S*i;`M zAAb$@+U#<%JDCfh$ehTM-a+4Z2A<`W&TtOY;o;#IQM1FjoMO3L{+zB)5Ewtu-;30) z)Ac%1$RgT(EJpvWOt7RHl6bc~`rYPdu7d~g!aSV-kKh$NgLlXf8)dDntv!>=4Q9|)@uT@&=k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SGKW{Qta%aLaKzxZxGV@$AgIpnzHHegD-sPHiuxr#T5B#n3WmKGD8m}Ac-$(}?u6{RXlN=iyfN=iyfN=iyfN&}<+ Y0K0`wJzGdd{Qv*}07*qoM6N<$f~wb-0{{R3 literal 0 HcmV?d00001 diff --git a/res/layout/activity_main.xml b/res/layout/activity_main.xml index 0b9f4ec..47a4fa5 100644 --- a/res/layout/activity_main.xml +++ b/res/layout/activity_main.xml @@ -1,6 +1,4 @@ - + - - - - - - - + android:orientation="horizontal" > + + + + + + + android:dividerHeight="1dp" + android:listSelector="@drawable/list_bg" /> - - + android:orientation="horizontal" > + + + + + + + android:dividerHeight="1dp" + android:listSelector="@drawable/list_bg" /> diff --git a/res/layout/bookmark_list_item.xml b/res/layout/bookmark_list_item.xml index 3d50ec2..66c4f60 100644 --- a/res/layout/bookmark_list_item.xml +++ b/res/layout/bookmark_list_item.xml @@ -23,6 +23,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" + android:fontFamily="sans-serif-light" android:maxLines="1" android:minHeight="?android:attr/listPreferredItemHeightSmall" android:paddingRight="4dp" diff --git a/res/layout/tab_list_item.xml b/res/layout/tab_list_item.xml index d1001c4..bbc13a0 100644 --- a/res/layout/tab_list_item.xml +++ b/res/layout/tab_list_item.xml @@ -2,20 +2,20 @@ @@ -24,11 +24,12 @@ android:id="@+id/text1" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="center_vertical" android:layout_centerVertical="true" - android:maxLines="1" - android:layout_toRightOf="@+id/favicon1" android:layout_toLeftOf="@+id/delete1" + android:layout_toRightOf="@+id/favicon1" + android:fontFamily="sans-serif-light" + android:gravity="center_vertical" + android:maxLines="1" android:minHeight="?android:attr/listPreferredItemHeightSmall" android:textAppearance="?android:attr/textAppearanceListItemSmall" android:textColor="@color/dark_text" /> @@ -36,15 +37,15 @@ diff --git a/res/values/styles.xml b/res/values/styles.xml index 8f0214d..265d017 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -43,6 +43,7 @@ \ No newline at end of file diff --git a/src/acr/browser/lightning/BrowserActivity.java b/src/acr/browser/lightning/BrowserActivity.java index 21fe602..f563b90 100644 --- a/src/acr/browser/lightning/BrowserActivity.java +++ b/src/acr/browser/lightning/BrowserActivity.java @@ -107,7 +107,7 @@ public class BrowserActivity extends Activity implements BrowserController { private RelativeLayout mDrawer; private LinearLayout mDrawerRight; private ListView mDrawerListRight; - private TextView mNewTab; + private RelativeLayout mNewTab; private ActionBarDrawerToggle mDrawerToggle; private List mWebViews = new ArrayList(); private List mIdList = new ArrayList(); @@ -187,7 +187,7 @@ public class BrowserActivity extends Activity implements BrowserController { mBrowserFrame = (FrameLayout) findViewById(R.id.content_frame); mProgress = (ProgressBar) findViewById(R.id.activity_bar); mProgress.setVisibility(View.GONE); - mNewTab = (TextView) findViewById(R.id.new_tab_button); + mNewTab = (RelativeLayout) findViewById(R.id.new_tab_button); mDrawer = (RelativeLayout) findViewById(R.id.drawer); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); mDrawerList = (ListView) findViewById(R.id.left_drawer); @@ -850,7 +850,15 @@ public class BrowserActivity extends Activity implements BrowserController { if (mCurrentView != null) { mCurrentView.loadUrl(mBookmarkList.get(position).getUrl()); } - mDrawerLayout.closeDrawer(mDrawerRight); + // keep any jank from happening when the drawer is closed after the + // URL starts to load + final Handler handler = new Handler(); + handler.postDelayed(new Runnable() { + @Override + public void run() { + mDrawerLayout.closeDrawer(mDrawerRight); + } + }, 150); } } @@ -1050,10 +1058,10 @@ public class BrowserActivity extends Activity implements BrowserController { mDrawerList.setItemChecked(position, true); showTab(mWebViews.get(position)); - - //Use a delayed handler to make the transition smooth - //otherwise it will get caught up with the showTab code - //and cause a janky motion + + // Use a delayed handler to make the transition smooth + // otherwise it will get caught up with the showTab code + // and cause a janky motion final Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override