Bug 817739: Theme change for synced tabs. [r=mfinkle]

--HG--
extra : rebase_source : 9b10d242c2c560489974cf7f23c5418a8370fc8a
This commit is contained in:
Sriram Ramasubramanian 2013-01-10 13:06:32 -08:00
parent d04236a078
commit db04f9a326
14 changed files with 114 additions and 85 deletions

View File

@ -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 \

View File

@ -29,9 +29,9 @@ public class RemoteTabs extends ExpandableListView
private static ArrayList <ArrayList <HashMap <String, String>>> 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);

View File

@ -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()) {

View File

@ -0,0 +1,12 @@
<?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/. -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size android:height="1dp"/>
<solid android:color="#FF313131"/>
</shape>

View File

@ -1,26 +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/. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<size android:height="1dp"/>
<solid android:color="#4C5157"/>
</shape>
</item>
<item android:top="1dp">
<shape android:shape="rectangle">
<size android:height="1dp"/>
<solid android:color="#7A7E81"/>
</shape>
</item>
</layer-list>

View File

@ -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/. -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tab"
android:layout_width="fill_parent"
android:layout_height="@dimen/remote_tab_child_row_height"
style="@style/TabRowTextAppearance"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:textSize="14sp"
android:background="@drawable/tabs_tray_default_selector"
android:gravity="center_vertical"/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="@dimen/remote_tab_child_row_height"
android:gravity="center_vertical"
android:orientation="vertical"
android:background="@drawable/tabs_tray_default_selector"
android:paddingLeft="2dp"
android:paddingRight="2dp">
<TextView android:id="@+id/tab"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/RemoteTabRowTextAppearance"
android:textSize="14sp"/>
<TextView android:id="@+id/url"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/RemoteTabRowTextAppearance.Url"
android:textSize="12sp"/>
</LinearLayout>

View File

@ -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/. -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/client"
android:layout_width="fill_parent"
android:layout_height="@dimen/remote_tab_group_row_height"
style="@style/TabRowTextAppearance"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:textStyle="bold"
android:textSize="13sp"
android:singleLine="false"
android:maxLines="2"
android:background="@drawable/tabs_tray_selected_bg_repeat"
android:gravity="center_vertical"/>
<Gecko.AllCapsTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/client"
android:layout_width="fill_parent"
android:layout_height="@dimen/remote_tab_group_row_height"
style="@style/RemoteTabRowTextAppearance.Url"
android:background="@android:color/transparent"
android:paddingLeft="2dip"
android:paddingRight="2dip"
android:textStyle="bold"
android:textSize="12sp"
android:singleLine="false"
android:maxLines="2"
android:gravity="center_vertical"/>

View File

@ -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"/>
<ImageButton android:id="@+id/add_tab"

View File

@ -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/. -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tab"
android:layout_width="fill_parent"
android:layout_height="@dimen/remote_tab_child_row_height"
style="@style/TabRowTextAppearance"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:textSize="16sp"
android:background="@drawable/tabs_tray_default_selector"
android:gravity="center_vertical"/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="@dimen/remote_tab_child_row_height"
android:gravity="center_vertical"
android:orientation="vertical"
android:background="@drawable/tabs_tray_default_selector"
android:paddingLeft="4dp"
android:paddingRight="4dp">
<TextView android:id="@+id/tab"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/RemoteTabRowTextAppearance"
android:textSize="18sp"/>
<TextView android:id="@+id/url"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/RemoteTabRowTextAppearance.Url"
android:textSize="14sp"/>
</LinearLayout>

View File

@ -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/. -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/client"
android:layout_width="fill_parent"
android:layout_height="@dimen/remote_tab_group_row_height"
style="@style/TabRowTextAppearance"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:textStyle="bold"
android:textSize="14sp"
android:background="@drawable/tabs_tray_selected_bg_repeat"
android:gravity="center_vertical"/>
<Gecko.AllCapsTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/client"
android:layout_width="fill_parent"
android:layout_height="@dimen/remote_tab_group_row_height"
style="@style/RemoteTabRowTextAppearance.Url"
android:background="@android:color/transparent"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:textStyle="bold"
android:textSize="14sp"
android:gravity="center_vertical"/>

View File

@ -40,7 +40,10 @@
<org.mozilla.gecko.RemoteTabs android:id="@+id/synced_tabs"
style="@style/RemoteTabsList"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
android:layout_height="fill_parent"
android:paddingLeft="@dimen/tabs_panel_list_padding"
android:paddingRight="@dimen/tabs_panel_list_padding"
android:scrollbarStyle="outsideOverlay"/>
</view>

View File

@ -13,9 +13,10 @@
<dimen name="awesomebar_tab_transparency_height">46dp</dimen>
<dimen name="browser_toolbar_height">56dp</dimen>
<dimen name="local_tab_row_height">150dp</dimen>
<dimen name="remote_tab_child_row_height">48dp</dimen>
<dimen name="remote_tab_group_row_height">28dp</dimen>
<dimen name="remote_tab_child_row_height">56dp</dimen>
<dimen name="remote_tab_group_row_height">34dp</dimen>
<dimen name="tabs_counter_size">26sp</dimen>
<dimen name="tabs_panel_list_padding">8dip</dimen>
<dimen name="addressbar_offset_left">84dip</dimen>
</resources>

View File

@ -42,12 +42,13 @@
<dimen name="prompt_service_icon_text_padding">10dp</dimen>
<dimen name="prompt_service_left_right_text_with_icon_padding">10dp</dimen>
<dimen name="prompt_service_top_bottom_text_with_icon_padding">8dp</dimen>
<dimen name="remote_tab_child_row_height">54dp</dimen>
<dimen name="remote_tab_child_row_height">64dp</dimen>
<dimen name="remote_tab_group_row_height">26dp</dimen>
<dimen name="popup_width">400dp</dimen>
<dimen name="tab_thumbnail_height">78dp</dimen>
<dimen name="tab_thumbnail_width">136dp</dimen>
<dimen name="tabs_counter_size">22sp</dimen>
<dimen name="tabs_panel_list_padding">16dip</dimen>
<dimen name="tabs_list_divider_height">2dp</dimen>
<dimen name="text_selection_handle_width">30dp</dimen>
<dimen name="text_selection_handle_height">44dp</dimen>

View File

@ -139,19 +139,21 @@
<style name="TabsList" parent="android:style/Widget.ListView">
<item name="android:background">@android:color/transparent</item>
<item name="android:cacheColorHint">@android:color/transparent</item>
<item name="android:divider">@drawable/tabs_tray_list_divider</item>
<item name="android:dividerHeight">2dip</item>
<item name="android:divider">@android:color/transparent</item>
<item name="android:dividerHeight">0dip</item>
<item name="android:listSelector">@android:color/transparent</item>
</style>
<!-- RemoteTabsList -->
<style name="RemoteTabsList" parent="TabsList">
<item name="android:childDivider">@drawable/tabs_tray_list_divider</item>
<item name="android:dividerHeight">1dip</item>
<item name="android:childDivider">@drawable/remote_tabs_child_divider</item>
<item name="android:groupIndicator">@android:color/transparent</item>
</style>
<!-- TabsTray Row -->
<style name="TabRowTextAppearance">
<item name="android:textColor">#E5F2FF</item>
<item name="android:textColor">#FFFFFFFF</item>
<item name="android:shadowColor">#7F000000</item>
<item name="android:shadowRadius">1</item>
<item name="android:shadowDx">0</item>
@ -160,6 +162,18 @@
<item name="android:ellipsize">middle</item>
</style>
<!-- RemoteTabs Row -->
<style name="RemoteTabRowTextAppearance">
<item name="android:textColor">#FFFFFFFF</item>
<item name="android:singleLine">true</item>
<item name="android:ellipsize">middle</item>
</style>
<!-- RemoteTabs Row Url -->
<style name="RemoteTabRowTextAppearance.Url">
<item name="android:textColor">#FFA4A7A9</item>
</style>
<!-- TabWidget -->
<style name="TabWidget">
<item name="android:layout_width">wrap_content</item>