From db04f9a326f876c093b52c41c0f524a705dc777d Mon Sep 17 00:00:00 2001 From: Sriram Ramasubramanian Date: Thu, 10 Jan 2013 13:06:32 -0800 Subject: [PATCH] Bug 817739: Theme change for synced tabs. [r=mfinkle] --HG-- extra : rebase_source : 9b10d242c2c560489974cf7f23c5418a8370fc8a --- mobile/android/base/Makefile.in | 2 +- mobile/android/base/RemoteTabs.java | 4 +-- mobile/android/base/TabsPanel.java | 5 ++- .../drawable/remote_tabs_child_divider.xml | 12 +++++++ .../drawable/tabs_tray_list_divider.xml | 26 --------------- .../layout-xlarge-v11/remote_tabs_child.xml | 32 +++++++++++++------ .../layout-xlarge-v11/remote_tabs_group.xml | 26 +++++++-------- .../tabs_panel_toolbar_menu.xml | 3 +- .../resources/layout/remote_tabs_child.xml | 32 +++++++++++++------ .../resources/layout/remote_tabs_group.xml | 22 ++++++------- .../base/resources/layout/tabs_panel.xml.in | 5 ++- .../resources/values-xlarge-v11/dimens.xml | 5 +-- .../android/base/resources/values/dimens.xml | 3 +- .../android/base/resources/values/styles.xml | 22 ++++++++++--- 14 files changed, 114 insertions(+), 85 deletions(-) create mode 100644 mobile/android/base/resources/drawable/remote_tabs_child_divider.xml delete mode 100644 mobile/android/base/resources/drawable/tabs_tray_list_divider.xml diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in index 13dc1520ace..6cdd8aa633a 100644 --- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -1075,6 +1075,7 @@ MOZ_ANDROID_DRAWABLES += \ mobile/android/base/resources/drawable/progress_spinner_10.png \ mobile/android/base/resources/drawable/progress_spinner_11.png \ mobile/android/base/resources/drawable/progress_spinner_12.png \ + mobile/android/base/resources/drawable/remote_tabs_child_divider.xml \ mobile/android/base/resources/drawable/remote_tabs_level.xml \ mobile/android/base/resources/drawable/start.png \ mobile/android/base/resources/drawable/site_security_level.xml \ @@ -1087,7 +1088,6 @@ MOZ_ANDROID_DRAWABLES += \ mobile/android/base/resources/drawable/tabs_tray_selected_bg_repeat.xml \ mobile/android/base/resources/drawable/tabs_tray_active_selector.xml \ mobile/android/base/resources/drawable/tabs_tray_default_selector.xml \ - mobile/android/base/resources/drawable/tabs_tray_list_divider.xml \ mobile/android/base/resources/drawable/tabs_shadow.xml \ mobile/android/base/resources/drawable/shadow.png \ mobile/android/base/resources/drawable/marketplace.png \ diff --git a/mobile/android/base/RemoteTabs.java b/mobile/android/base/RemoteTabs.java index dab5143d0b2..84c38f35441 100644 --- a/mobile/android/base/RemoteTabs.java +++ b/mobile/android/base/RemoteTabs.java @@ -29,9 +29,9 @@ public class RemoteTabs extends ExpandableListView private static ArrayList >> mTabsList; private static final String[] CLIENT_KEY = new String[] { "name" }; - private static final String[] TAB_KEY = new String[] { "title" }; + private static final String[] TAB_KEY = new String[] { "title", "url" }; private static final int[] CLIENT_RESOURCE = new int[] { R.id.client }; - private static final int[] TAB_RESOURCE = new int[] { R.id.tab }; + private static final int[] TAB_RESOURCE = new int[] { R.id.tab, R.id.url }; public RemoteTabs(Context context, AttributeSet attrs) { super(context, attrs); diff --git a/mobile/android/base/TabsPanel.java b/mobile/android/base/TabsPanel.java index 2b046bf7658..93ca3737dff 100644 --- a/mobile/android/base/TabsPanel.java +++ b/mobile/android/base/TabsPanel.java @@ -68,9 +68,6 @@ public class TabsPanel extends TabHost private GeckoPopupMenu mTabsPopupMenu; private Menu mTabsMenu; - private static final int REMOTE_TABS_HIDDEN = 1; - private static final int REMOTE_TABS_SHOWN = 2; - public TabsPanel(Context context, AttributeSet attrs) { super(context, attrs); mContext = context; @@ -377,9 +374,11 @@ public class TabsPanel extends TabHost if (mCurrentPanel == Panel.REMOTE_TABS) { mAddTab.setVisibility(View.INVISIBLE); + mMenuButton.setVisibility(View.INVISIBLE); } else { mAddTab.setVisibility(View.VISIBLE); mAddTab.setImageLevel(index); + mMenuButton.setVisibility(View.VISIBLE); } if (isSideBar()) { diff --git a/mobile/android/base/resources/drawable/remote_tabs_child_divider.xml b/mobile/android/base/resources/drawable/remote_tabs_child_divider.xml new file mode 100644 index 00000000000..1965112bcfa --- /dev/null +++ b/mobile/android/base/resources/drawable/remote_tabs_child_divider.xml @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/mobile/android/base/resources/drawable/tabs_tray_list_divider.xml b/mobile/android/base/resources/drawable/tabs_tray_list_divider.xml deleted file mode 100644 index 178b218a2c2..00000000000 --- a/mobile/android/base/resources/drawable/tabs_tray_list_divider.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mobile/android/base/resources/layout-xlarge-v11/remote_tabs_child.xml b/mobile/android/base/resources/layout-xlarge-v11/remote_tabs_child.xml index c022e995b2e..35df9110190 100644 --- a/mobile/android/base/resources/layout-xlarge-v11/remote_tabs_child.xml +++ b/mobile/android/base/resources/layout-xlarge-v11/remote_tabs_child.xml @@ -3,13 +3,25 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + + + + + + + diff --git a/mobile/android/base/resources/layout-xlarge-v11/remote_tabs_group.xml b/mobile/android/base/resources/layout-xlarge-v11/remote_tabs_group.xml index d046eab2d80..0ba18e6bdbd 100644 --- a/mobile/android/base/resources/layout-xlarge-v11/remote_tabs_group.xml +++ b/mobile/android/base/resources/layout-xlarge-v11/remote_tabs_group.xml @@ -3,16 +3,16 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + diff --git a/mobile/android/base/resources/layout-xlarge-v11/tabs_panel_toolbar_menu.xml b/mobile/android/base/resources/layout-xlarge-v11/tabs_panel_toolbar_menu.xml index ad083b3ac1e..1a686d335ef 100644 --- a/mobile/android/base/resources/layout-xlarge-v11/tabs_panel_toolbar_menu.xml +++ b/mobile/android/base/resources/layout-xlarge-v11/tabs_panel_toolbar_menu.xml @@ -15,7 +15,8 @@ android:layout_height="fill_parent" android:layout_weight="1.0" android:text="@string/tabs_normal" - android:textColor="@color/tabs_counter_color" + android:textColor="#FFFFFFFF" + android:textSize="18sp" android:background="@drawable/action_bar_button"/> - + + + + + + + diff --git a/mobile/android/base/resources/layout/remote_tabs_group.xml b/mobile/android/base/resources/layout/remote_tabs_group.xml index c3c924fbc66..29a62485e65 100644 --- a/mobile/android/base/resources/layout/remote_tabs_group.xml +++ b/mobile/android/base/resources/layout/remote_tabs_group.xml @@ -3,14 +3,14 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + diff --git a/mobile/android/base/resources/layout/tabs_panel.xml.in b/mobile/android/base/resources/layout/tabs_panel.xml.in index 34c3de67efe..77b8a80c216 100644 --- a/mobile/android/base/resources/layout/tabs_panel.xml.in +++ b/mobile/android/base/resources/layout/tabs_panel.xml.in @@ -40,7 +40,10 @@ + android:layout_height="fill_parent" + android:paddingLeft="@dimen/tabs_panel_list_padding" + android:paddingRight="@dimen/tabs_panel_list_padding" + android:scrollbarStyle="outsideOverlay"/> diff --git a/mobile/android/base/resources/values-xlarge-v11/dimens.xml b/mobile/android/base/resources/values-xlarge-v11/dimens.xml index 673492c4994..914a59791f0 100644 --- a/mobile/android/base/resources/values-xlarge-v11/dimens.xml +++ b/mobile/android/base/resources/values-xlarge-v11/dimens.xml @@ -13,9 +13,10 @@ 46dp 56dp 150dp - 48dp - 28dp + 56dp + 34dp 26sp + 8dip 84dip diff --git a/mobile/android/base/resources/values/dimens.xml b/mobile/android/base/resources/values/dimens.xml index 4bd35dfcefc..626f9855e9b 100644 --- a/mobile/android/base/resources/values/dimens.xml +++ b/mobile/android/base/resources/values/dimens.xml @@ -42,12 +42,13 @@ 10dp 10dp 8dp - 54dp + 64dp 26dp 400dp 78dp 136dp 22sp + 16dip 2dp 30dp 44dp diff --git a/mobile/android/base/resources/values/styles.xml b/mobile/android/base/resources/values/styles.xml index 9cb092002f9..52f47c58686 100644 --- a/mobile/android/base/resources/values/styles.xml +++ b/mobile/android/base/resources/values/styles.xml @@ -139,19 +139,21 @@ + + + + + +