зеркало из https://github.com/mozilla/gecko-dev.git
Bug 823644: Cleanup list-view style. [r=mfinkle]
--HG-- extra : rebase_source : e79f66f5e405dac2ac0dbd1a97ce1c8a26037c10
This commit is contained in:
Родитель
447740e760
Коммит
e1fadc9a76
|
@ -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 \
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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"/>
|
|
@ -39,7 +39,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,23 @@
|
|||
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.BaseButton" parent="android:style/Widget.Holo.Light.Button"/>
|
||||
|
||||
<style name="GeckoList.ListItem">
|
||||
<style name="Widget.BaseEditText" parent="android:style/Widget.Holo.Light.EditText"/>
|
||||
|
||||
<style name="Widget.BaseListView" parent="android:style/Widget.Holo.ListView"/>
|
||||
|
||||
<style name="Widget.BaseTextView" parent="android:style/Widget.Holo.Light.TextView"/>
|
||||
|
||||
|
||||
<!--
|
||||
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>
|
||||
|
@ -39,9 +43,6 @@
|
|||
<item name="android:layout_height">@dimen/browser_toolbar_height</item>
|
||||
<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" />
|
||||
|
|
|
@ -42,7 +42,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>
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
<dimen name="abouthome_topsite_shadow_offset">2dp</dimen>
|
||||
<dimen name="autocomplete_min_width">200dp</dimen>
|
||||
<dimen name="autocomplete_row_height">32dp</dimen>
|
||||
|
||||
<!-- Padding on either side of the lists in AwesomeBar -->
|
||||
<dimen name="awesomebar_list_padding">0dp</dimen>
|
||||
|
||||
<dimen name="awesomebar_header_row_height">20dp</dimen>
|
||||
<dimen name="awesomebar_row_height">48dp</dimen>
|
||||
<dimen name="awesomebar_row_favicon_size_small">16dp</dimen>
|
||||
|
|
|
@ -5,10 +5,42 @@
|
|||
|
||||
<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.BaseButton" parent="android:style/Widget.Button"/>
|
||||
|
||||
<style name="Widget.BaseEditText" parent="android:style/Widget.EditText"/>
|
||||
|
||||
<style name="Widget.BaseListLiew" parent="android:style/Widget.ListView"/>
|
||||
|
||||
<style name="Widget.BaseTextView" parent="android:style/Widget.TextView"/>
|
||||
|
||||
<!--
|
||||
Application styles. All customizations that are not specific
|
||||
to a particular API level can go here.
|
||||
-->
|
||||
<style name="Widget.Button" parent="Widget.BaseButton"/>
|
||||
|
||||
<style name="Widget.EditText" parent="Widget.BaseEditText"/>
|
||||
|
||||
<style name="Widget.TextView" parent="Widget.BaseTextView"/>
|
||||
|
||||
<style name="Widget.ListView" parent="Widget.BaseListView">
|
||||
<item name="android:divider">#D1D5DA</item>
|
||||
<item name="android:dividerHeight">1dp</item>
|
||||
<item name="android:cacheColorHint">@android:color/transparent</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 +112,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">
|
||||
|
|
|
@ -43,9 +43,15 @@
|
|||
-->
|
||||
<style name="Gecko.App">
|
||||
<item name="android:windowBackground">@color/background_normal</item>
|
||||
<item name="android:buttonStyle">@style/Widget.Button</item>
|
||||
<item name="android:editTextStyle">@style/Widget.EditText</item>
|
||||
<item name="android:textViewStyle">@style/Widget.TextView</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"/>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче