From d9e888e8a9485b5083fe6e76293e483d2ac942a3 Mon Sep 17 00:00:00 2001 From: Anthony Restaino Date: Thu, 2 Apr 2015 21:50:59 -0400 Subject: [PATCH] Change Navigation Drawer layout slightly, fix dark theme for drawer --- AndroidManifest.xml | 4 +- res/drawable-hdpi/ic_action_tabs_dark.png | Bin 0 -> 165 bytes res/drawable-hdpi/ic_action_tabs_light.png | Bin 0 -> 178 bytes res/drawable-xhdpi/ic_action_tabs_dark.png | Bin 0 -> 177 bytes res/drawable-xhdpi/ic_action_tabs_light.png | Bin 0 -> 193 bytes res/drawable-xxhdpi/ic_action_tabs_dark.png | Bin 0 -> 235 bytes res/drawable-xxhdpi/ic_action_tabs_light.png | Bin 0 -> 252 bytes res/drawable/list_bg_dark.xml | 7 ++ res/drawable/list_bg_light.xml | 7 ++ res/layout/bookmark_drawer.xml | 18 +-- res/layout/bookmark_list_item.xml | 5 +- res/layout/tab_drawer.xml | 47 +++++--- res/layout/tab_list_item.xml | 13 ++- res/values-v21/styles.xml | 4 + res/values/attr.xml | 2 + res/values/colors.xml | 4 + res/values/strings.xml | 1 + res/values/styles.xml | 4 + .../browser/lightning/BrowserActivity.java | 104 +++++++----------- 19 files changed, 122 insertions(+), 98 deletions(-) create mode 100644 res/drawable-hdpi/ic_action_tabs_dark.png create mode 100644 res/drawable-hdpi/ic_action_tabs_light.png create mode 100644 res/drawable-xhdpi/ic_action_tabs_dark.png create mode 100644 res/drawable-xhdpi/ic_action_tabs_light.png create mode 100644 res/drawable-xxhdpi/ic_action_tabs_dark.png create mode 100644 res/drawable-xxhdpi/ic_action_tabs_light.png create mode 100644 res/drawable/list_bg_dark.xml create mode 100644 res/drawable/list_bg_light.xml diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 6d1176a..95e30d4 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -3,8 +3,8 @@ + android:versionCode="74" + android:versionName="4.0.6a" > diff --git a/res/drawable-hdpi/ic_action_tabs_dark.png b/res/drawable-hdpi/ic_action_tabs_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..a894d9ccc8f7b8005ae1dd04e1ac10c34e3d369f GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpUt98VX=kcwMxZye-pP!Mo+e6@(f zdlAdID+z*O3H~Q8PFCN1a?;Ev;vbS6k~J9^YGxI0+iG0#_I$&}GWL890fh(q8}^m4 zuHXGX-haV5*@LUkH83zTed9b)+xzZ=(&@jN4+XddCfF-{&lhEA@U`U$n7BpmZ^>Ms Oy$qhNelF{r5}E)2$UVjY literal 0 HcmV?d00001 diff --git a/res/drawable-hdpi/ic_action_tabs_light.png b/res/drawable-hdpi/ic_action_tabs_light.png new file mode 100644 index 0000000000000000000000000000000000000000..1a3ebfde24b4c81f7757c648f7451accd8fcfc4d GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpUtN>3NZkcwMxZz%FL81Oh;yvu%Z z+1y7)6)NHn*ede4MI)|UT5`JHv-I;(F}G}>`X5i<&7L`Trm(d;o6O$t*2PKcj4T2M zdI|OUZQ4N2_y6uLVxh6d>SaZ2910B$o=m6W7aQATWYv2WbZ{yxsB?IGUkhl=bP0l+XkKxpzIH literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/ic_action_tabs_dark.png b/res/drawable-xhdpi/ic_action_tabs_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..20ce803330ccbfb4bc5bd33f6e6cf049f74102c8 GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=6`n4RAr-gY-rC69pdio|=(eC# zLo9)>T;bg_zvolS!X|0o^Zv)WPojx)EhA8Qyi(G$b&FmdKI;Vst0Q-_XZU6uP literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/ic_action_tabs_dark.png b/res/drawable-xxhdpi/ic_action_tabs_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..66cbcea7d141c9b11614dcd2f14271ed2a03df2b GIT binary patch literal 235 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGon><|{Ln>~)y~D`cpdio|Xmz2H zr)2{h>lsgV8}Apn-|u}>|FJA*(@iO$S}=H0dT!>%-6ztHF=%h=&f!#OU|`}vCl1VK ztjZCI{Qg&Z)83|g?w_?bJrpS8;6_&l(i&jVuzq2K^}|Kwhxig1Sp*yyFo+*|4gXmg bVfMGM#|B7p2*l}{f~)y>ph6$xxu-;@SgT zTNwEpPx2p>+Y>eCuGfb4y9f5L2Osz#%f$HvqyY>P;srnEtgSUVbE|YW!`5r%@BhwD zyta;sL!p5IgD9A3`8>Dh;|YW8@bC9GObt3^s}v`h_V$%P83#8u^%G1RZU-EgU2xAl nv3&!kaUd;oj?_ECoWf9V|FS}K{Vg>WZIF + + + + + + \ No newline at end of file diff --git a/res/drawable/list_bg_light.xml b/res/drawable/list_bg_light.xml new file mode 100644 index 0000000..fe5207f --- /dev/null +++ b/res/drawable/list_bg_light.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/res/layout/bookmark_drawer.xml b/res/layout/bookmark_drawer.xml index 9348d60..77f259c 100644 --- a/res/layout/bookmark_drawer.xml +++ b/res/layout/bookmark_drawer.xml @@ -13,35 +13,35 @@ android:id="@+id/bookmark_title" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?attr/listBackground" - android:clickable="true" + android:background="?attr/dividerColor" android:gravity="center_vertical" android:orientation="horizontal" > + android:textAppearance="?android:attr/textAppearanceLarge" /> @@ -20,12 +20,13 @@ android:id="@+id/textBookmark" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" android:ellipsize="end" android:fontFamily="sans-serif-light" android:gravity="center_vertical" android:maxLines="1" android:minHeight="?android:attr/listPreferredItemHeightSmall" - android:paddingRight="16dp" android:singleLine="true" android:textAppearance="?android:attr/textAppearanceListItemSmall" /> diff --git a/res/layout/tab_drawer.xml b/res/layout/tab_drawer.xml index eb4b497..cacfe8c 100644 --- a/res/layout/tab_drawer.xml +++ b/res/layout/tab_drawer.xml @@ -10,37 +10,37 @@ android:orientation="vertical" > + android:src="?attr/tabDrawable" > + android:minHeight="?android:attr/listPreferredItemHeight" + android:text="@string/tabs" + android:textAppearance="?android:attr/textAppearanceLarge" /> + android:weightSum="3" > + + + + + + @@ -23,6 +23,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" android:layout_toLeftOf="@+id/deleteButton" android:layout_toRightOf="@+id/faviconTab" android:ellipsize="end" @@ -35,16 +37,15 @@ diff --git a/res/values-v21/styles.xml b/res/values-v21/styles.xml index 8f20406..a09af9e 100644 --- a/res/values-v21/styles.xml +++ b/res/values-v21/styles.xml @@ -57,6 +57,8 @@ @drawable/ic_action_delete @drawable/ic_action_star @color/divider_light + @drawable/ic_action_tabs_light + @drawable/list_bg_light \ No newline at end of file diff --git a/res/values/attr.xml b/res/values/attr.xml index c575601..69fd678 100644 --- a/res/values/attr.xml +++ b/res/values/attr.xml @@ -16,7 +16,9 @@ + + diff --git a/res/values/colors.xml b/res/values/colors.xml index 0a874bd..5358ddc 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -28,4 +28,8 @@ #1EFFFFFF #1E000000 + + #0FFFFFFF + #0F000000 + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 89c1746..bb367d8 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -213,4 +213,5 @@ Invert color Use Dark Theme The theme change will take effect after you restart the browser. + Tabs diff --git a/res/values/styles.xml b/res/values/styles.xml index a75ae83..2be4b6b 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -56,7 +56,9 @@ @drawable/ic_action_plus @drawable/ic_action_delete @drawable/ic_action_star + @drawable/ic_action_tabs_light @color/divider_light + @drawable/list_bg_light