From e1fadc9a76e9bfc7f80fc5ba2ae30abe35ac55e3 Mon Sep 17 00:00:00 2001 From: Sriram Ramasubramanian Date: Wed, 13 Mar 2013 16:59:02 -0700 Subject: [PATCH] Bug 823644: Cleanup list-view style. [r=mfinkle] --HG-- extra : rebase_source : e79f66f5e405dac2ac0dbd1a97ce1c8a26037c10 --- mobile/android/base/Makefile.in | 2 - .../android/base/awesomebar/BookmarksTab.java | 2 +- .../android/base/awesomebar/HistoryTab.java | 2 +- .../layout/awesomebar_allpages_list.xml | 5 +- .../layout/awesomebar_expandable_list.xml | 8 ---- .../base/resources/layout/awesomebar_list.xml | 7 --- .../base/resources/layout/awesomebar_tabs.xml | 5 +- .../resources/layout/select_dialog_list.xml | 15 +++--- .../layout/select_dialog_multichoice.xml | 2 +- .../resources/layout/site_setting_item.xml | 4 +- .../base/resources/values-v11/styles.xml | 31 ++++++------ .../base/resources/values-v11/themes.xml | 2 +- .../resources/values-xlarge-v11/dimens.xml | 4 ++ .../resources/values-xlarge-v11/styles.xml | 6 --- .../android/base/resources/values/dimens.xml | 4 ++ .../android/base/resources/values/styles.xml | 47 ++++++++++++++----- .../android/base/resources/values/themes.xml | 8 +++- 17 files changed, 85 insertions(+), 69 deletions(-) delete mode 100644 mobile/android/base/resources/layout/awesomebar_expandable_list.xml delete mode 100644 mobile/android/base/resources/layout/awesomebar_list.xml diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in index 9ec46e1fcfff..2804103507d0 100644 --- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -384,11 +384,9 @@ RES_LAYOUT = \ res/layout/autocomplete_list_item.xml \ res/layout/awesomebar.xml \ res/layout/awesomebar_actionbar.xml \ - res/layout/awesomebar_expandable_list.xml \ res/layout/awesomebar_folder_row.xml \ res/layout/awesomebar_header_row.xml \ res/layout/awesomebar_allpages_list.xml \ - res/layout/awesomebar_list.xml \ res/layout/awesomebar_row.xml \ res/layout/awesomebar_search.xml \ res/layout/awesomebar_suggestion_row.xml \ diff --git a/mobile/android/base/awesomebar/BookmarksTab.java b/mobile/android/base/awesomebar/BookmarksTab.java index 21149005fef1..1d5c1d6226b9 100644 --- a/mobile/android/base/awesomebar/BookmarksTab.java +++ b/mobile/android/base/awesomebar/BookmarksTab.java @@ -59,7 +59,7 @@ public class BookmarksTab extends AwesomeBarTab { @Override public View getView() { if (mView == null) { - mView = (LayoutInflater.from(mContext).inflate(R.layout.awesomebar_list, null)); + mView = new ListView(mContext, null); ((Activity)mContext).registerForContextMenu(mView); mView.setTag(TAG); mView.setOnTouchListener(mListListener); diff --git a/mobile/android/base/awesomebar/HistoryTab.java b/mobile/android/base/awesomebar/HistoryTab.java index cb105a672edf..dd15528d1d95 100644 --- a/mobile/android/base/awesomebar/HistoryTab.java +++ b/mobile/android/base/awesomebar/HistoryTab.java @@ -70,7 +70,7 @@ public class HistoryTab extends AwesomeBarTab { @Override public ListView getView() { if (mView == null) { - mView = LayoutInflater.from(mContext).inflate(R.layout.awesomebar_expandable_list, null); + mView = new ExpandableListView(mContext, null); ((Activity)mContext).registerForContextMenu(mView); mView.setTag(TAG); diff --git a/mobile/android/base/resources/layout/awesomebar_allpages_list.xml b/mobile/android/base/resources/layout/awesomebar_allpages_list.xml index c5c924893344..df8b64ac442d 100644 --- a/mobile/android/base/resources/layout/awesomebar_allpages_list.xml +++ b/mobile/android/base/resources/layout/awesomebar_allpages_list.xml @@ -8,7 +8,8 @@ android:layout_height="fill_parent" android:orientation="vertical"> - + diff --git a/mobile/android/base/resources/layout/awesomebar_expandable_list.xml b/mobile/android/base/resources/layout/awesomebar_expandable_list.xml deleted file mode 100644 index c3912a53c47f..000000000000 --- a/mobile/android/base/resources/layout/awesomebar_expandable_list.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/mobile/android/base/resources/layout/awesomebar_list.xml b/mobile/android/base/resources/layout/awesomebar_list.xml deleted file mode 100644 index ffe0be1e5d90..000000000000 --- a/mobile/android/base/resources/layout/awesomebar_list.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/mobile/android/base/resources/layout/awesomebar_tabs.xml b/mobile/android/base/resources/layout/awesomebar_tabs.xml index 9ff998ddf540..2f4b2e96e638 100644 --- a/mobile/android/base/resources/layout/awesomebar_tabs.xml +++ b/mobile/android/base/resources/layout/awesomebar_tabs.xml @@ -39,7 +39,10 @@ + android:layout_height="fill_parent" + android:background="#EEF1F5" + android:paddingLeft="@dimen/awesomebar_list_padding" + android:paddingRight="@dimen/awesomebar_list_padding"/> diff --git a/mobile/android/base/resources/layout/select_dialog_list.xml b/mobile/android/base/resources/layout/select_dialog_list.xml index 83880888525e..d2469a0f673b 100644 --- a/mobile/android/base/resources/layout/select_dialog_list.xml +++ b/mobile/android/base/resources/layout/select_dialog_list.xml @@ -4,11 +4,10 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + diff --git a/mobile/android/base/resources/layout/select_dialog_multichoice.xml b/mobile/android/base/resources/layout/select_dialog_multichoice.xml index 0d11ca746e60..0e08bac4399f 100644 --- a/mobile/android/base/resources/layout/select_dialog_multichoice.xml +++ b/mobile/android/base/resources/layout/select_dialog_multichoice.xml @@ -18,4 +18,4 @@ android:id="@android:id/text1" android:layout_width="match_parent" android:layout_height="wrap_content" - style="@style/GeckoList.ListItem"/> + style="@style/Widget.ListItem"/> diff --git a/mobile/android/base/resources/layout/site_setting_item.xml b/mobile/android/base/resources/layout/site_setting_item.xml index 986aa948af77..6db490e40bba 100644 --- a/mobile/android/base/resources/layout/site_setting_item.xml +++ b/mobile/android/base/resources/layout/site_setting_item.xml @@ -24,7 +24,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" - style="GeckoList.ListItem" + style="Widget.ListItem" android:gravity="center_vertical|left" android:singleLine="true" android:ellipsize="marquee"/> @@ -34,7 +34,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" - style="GeckoList.ListItem" + style="Widget.ListItem" android:gravity="center_vertical|left" android:singleLine="true" android:ellipsize="marquee"/> diff --git a/mobile/android/base/resources/values-v11/styles.xml b/mobile/android/base/resources/values-v11/styles.xml index 8f6c679f0e99..5a070b697af8 100644 --- a/mobile/android/base/resources/values-v11/styles.xml +++ b/mobile/android/base/resources/values-v11/styles.xml @@ -10,19 +10,23 @@ Please refer to values/styles.xml for default styles. --> - - + + - - - diff --git a/mobile/android/base/resources/values-xlarge-v11/dimens.xml b/mobile/android/base/resources/values-xlarge-v11/dimens.xml index c5104fcb16f9..b0275651c214 100644 --- a/mobile/android/base/resources/values-xlarge-v11/dimens.xml +++ b/mobile/android/base/resources/values-xlarge-v11/dimens.xml @@ -9,6 +9,10 @@ 40dp 0dp 24dp + + + 52dp + 66dp 46dp 56dp diff --git a/mobile/android/base/resources/values-xlarge-v11/styles.xml b/mobile/android/base/resources/values-xlarge-v11/styles.xml index 9dcd7a4fc083..eb46fc236067 100644 --- a/mobile/android/base/resources/values-xlarge-v11/styles.xml +++ b/mobile/android/base/resources/values-xlarge-v11/styles.xml @@ -10,12 +10,6 @@ Please refer to values/styles.xml for default styles. --> - - - - + + - - -