Bug 823644: Cleanup list-view style. [r=mfinkle]

--HG--
extra : rebase_source : 0d806581a999edf580221e4c9dabe913928ea1e5
This commit is contained in:
Sriram Ramasubramanian 2013-03-13 16:59:02 -07:00
Родитель f5f090edd8
Коммит 908a226409
17 изменённых файлов: 64 добавлений и 69 удалений

Просмотреть файл

@ -375,11 +375,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 \

Просмотреть файл

@ -58,7 +58,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);

Просмотреть файл

@ -68,7 +68,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);

Просмотреть файл

@ -8,7 +8,8 @@
android:layout_height="fill_parent"
android:orientation="vertical">
<include layout="@layout/awesomebar_list"
android:id="@+id/awesomebar_list"/>
<ListView android:id="@+id/awesomebar_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>

Просмотреть файл

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<ExpandableListView xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/AwesomeBarList"
android:groupIndicator="@android:color/transparent"/>

Просмотреть файл

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/AwesomeBarList"/>

Просмотреть файл

@ -37,7 +37,10 @@
<android.support.v4.view.ViewPager
android:id="@+id/tabviewpager"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
android:layout_height="fill_parent"
android:background="#EEF1F5"
android:paddingLeft="@dimen/awesomebar_list_padding"
android:paddingRight="@dimen/awesomebar_list_padding"/>
</LinearLayout>

Просмотреть файл

@ -4,11 +4,10 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!-- This is used for select lists for multiple selection enabled -->
<view xmlns:android="http://schemas.android.com/apk/res/android"
class="android.widget.ListView"
android:id="@+id/select_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:cacheColorHint="@null"
android:scrollbars="vertical"
android:overScrollMode="ifContentScrolls" />
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/select_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:cacheColorHint="@null"
android:scrollbars="vertical"
android:overScrollMode="ifContentScrolls" />

Просмотреть файл

@ -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"/>

Просмотреть файл

@ -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"/>

Просмотреть файл

@ -10,19 +10,17 @@
Please refer to values/styles.xml for default styles.
-->
<!-- Lists in AwesomeBar -->
<style name="GeckoList" parent="android:style/Widget.Holo.ListView">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_weight">1</item>
<item name="android:background">#EEF1F5</item>
<item name="android:divider">#D1D5DA</item>
<item name="android:dividerHeight">1dp</item>
<item name="android:cacheColorHint">#EEF1F5</item>
<item name="android:listSelector">@drawable/action_bar_button</item>
</style>
<!--
Base application styles. This could be overridden in other res/values-XXX/themes.xml.
-->
<style name="Widget.BaseListView" parent="android:style/Widget.Holo.ListView"/>
<style name="GeckoList.ListItem">
<!--
Application styles. All customizations that are not specific
to a particular API level can go here.
-->
<style name="Widget.ListItem">
<item name="android:textColor">@color/select_item_multichoice</item>
<item name="android:minHeight">?android:attr/listPreferredItemHeight</item>
<item name="android:textAppearance">?android:attr/textAppearanceLarge</item>
@ -40,9 +38,6 @@
<item name="android:orientation">horizontal</item>
</style>
<!-- Lists in AwesomeBar -->
<style name="AwesomeBarList" parent="@style/GeckoList"/>
<!-- ActionBar -->
<style name="ActionBar" parent="android:style/Widget.Holo.ActionBar" />

Просмотреть файл

@ -41,7 +41,7 @@
<style name="Gecko.App">
<item name="android:windowBackground">@color/background_normal</item>
<item name="android:panelBackground">@drawable/menu_panel_bg</item>
<item name="android:listViewStyle">@style/GeckoList</item>
<item name="android:listViewStyle">@style/Widget.ListView</item>
</style>
</resources>

Просмотреть файл

@ -9,6 +9,10 @@
<dimen name="abouthome_gutter_large">40dp</dimen>
<dimen name="abouthome_icon_crop">0dp</dimen>
<dimen name="awesomebar_header_row_height">24dp</dimen>
<!-- Padding on either side of the lists in AwesomeBar -->
<dimen name="awesomebar_list_padding">52dp</dimen>
<dimen name="awesomebar_row_height">66dp</dimen>
<dimen name="awesomebar_tab_transparency_height">46dp</dimen>
<dimen name="browser_toolbar_height">56dp</dimen>

Просмотреть файл

@ -10,12 +10,6 @@
Please refer to values/styles.xml for default styles.
-->
<!-- Lists in AwesomeBar -->
<style name="AwesomeBarList" parent="@style/GeckoList">
<item name="android:paddingLeft">52dp</item>
<item name="android:paddingRight">52dp</item>
</style>
<!-- AwesomeBar Tab Indicator Curve Left -->
<style name="AwesomeBarTabIndicatorCurve.Left">
<item name="android:layout_width">86dp</item>

Просмотреть файл

@ -16,6 +16,10 @@
<dimen name="autocomplete_min_width">200dp</dimen>
<dimen name="autocomplete_row_height">32dp</dimen>
<dimen name="awesomebar_header_row_height">20dp</dimen>
<!-- Padding on either side of the lists in AwesomeBar -->
<dimen name="awesomebar_list_padding">0dp</dimen>
<dimen name="awesomebar_row_height">48dp</dimen>
<dimen name="awesomebar_row_favicon_size_small">16dp</dimen>
<dimen name="awesomebar_row_favicon_size_large">32dp</dimen>

Просмотреть файл

@ -5,10 +5,30 @@
<resources>
<style name="GeckoList" parent="android:style/Widget.ListView">
<!--
Base application styles. This could be overridden in other res/values-XXX/themes.xml.
-->
<style name="Widget"/>
<style name="Widget.BaseListLiew" parent="android:style/Widget.ListView"/>
<!--
Application styles. All customizations that are not specific
to a particular API level can go here.
-->
<style name="Widget.ListView" parent="Widget.BaseListView">
<item name="android:divider">#D1D5DA</item>
<item name="android:dividerHeight">1dp</item>
<item name="android:cacheColorHint">#EEF1F5</item>
<item name="android:listSelector">@drawable/action_bar_button</item>
</style>
<style name="GeckoList.ListItem">
<style name="Widget.ExpandableListView" parent="Widget.ListView">
<item name="android:groupIndicator">@android:color/transparent</item>
<item name="android:childDivider">#D1D5DA</item>
</style>
<style name="Widget.ListItem">
<item name="android:minHeight">?android:attr/listPreferredItemHeight</item>
<item name="android:textAppearance">?android:attr/textAppearanceLargeInverse</item>
<item name="android:gravity">center_vertical</item>
@ -80,17 +100,6 @@
<item name="android:orientation">horizontal</item>
</style>
<!-- Lists in AwesomeBar -->
<style name="AwesomeBarList" parent="android:style/Widget.ListView.White">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_weight">1</item>
<item name="android:background">#EEF1F5</item>
<item name="android:divider">#D1D5DA</item>
<item name="android:dividerHeight">1dp</item>
<item name="android:cacheColorHint">#EEF1F5</item>
<item name="android:listSelector">@drawable/action_bar_button</item>
</style>
<!-- AwesomeBar Tab Indicator Curve -->
<style name="AwesomeBarTabIndicatorCurve">

Просмотреть файл

@ -45,7 +45,10 @@
<item name="android:windowBackground">@color/background_normal</item>
</style>
<style name="Gecko.AwesomeBar" parent="GeckoAwesomeBarBase"/>
<style name="Gecko.AwesomeBar" parent="GeckoAwesomeBarBase">
<item name="android:listViewStyle">@style/Widget.ListView</item>
<item name="android:expandableListViewStyle">@style/Widget.ExpandableListView</item>
</style>
<style name="Gecko.Preferences" parent="GeckoPreferencesBase"/>