summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-10-14 12:26:54 -0700
committerWinson Chung <winsonc@google.com>2011-10-14 13:02:24 -0700
commitd2c1f80aa73bef9d7fb5991ec29ea7a7b2e38f90 (patch)
treeaf08c3563a3f298fab79f9d1a2049fa87faf3b39
parent2dcda1f72c4f09578d13b20890aa146f961e2ee7 (diff)
downloadandroid_packages_apps_Trebuchet-d2c1f80aa73bef9d7fb5991ec29ea7a7b2e38f90.tar.gz
android_packages_apps_Trebuchet-d2c1f80aa73bef9d7fb5991ec29ea7a7b2e38f90.tar.bz2
android_packages_apps_Trebuchet-d2c1f80aa73bef9d7fb5991ec29ea7a7b2e38f90.zip
Making Launcher tabs more consistent with system. (Bug: 5184498)
Change-Id: Idac7c14fdefcdad0bb88b1c5b34fa3e10c2733ac
-rw-r--r--res/color/tab_widget_indicator_color.xml20
-rw-r--r--res/values/dimens.xml2
-rw-r--r--res/values/styles.xml16
-rw-r--r--src/com/android/launcher2/AppsCustomizeTabHost.java9
4 files changed, 14 insertions, 33 deletions
diff --git a/res/color/tab_widget_indicator_color.xml b/res/color/tab_widget_indicator_color.xml
deleted file mode 100644
index cbe9e3e19..000000000
--- a/res/color/tab_widget_indicator_color.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_selected="true" android:color="#FFEFEFEF" />
- <item android:color="#909090" />
-</selector>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index faad6061e..27e00b31a 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -52,7 +52,7 @@
<!-- AllApps/Customize/AppsCustomize -->
<!-- The height of the tab bar - if this changes, we should update the
external icon width/height above to compensate -->
- <dimen name="apps_customize_tab_bar_height">56dp</dimen>
+ <dimen name="apps_customize_tab_bar_height">52dp</dimen>
<dimen name="app_icon_size">48dp</dimen>
<!-- The width can be 72dp because we don't have L/R padding -->
<dimen name="apps_customize_cell_width">74dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 83683880c..04bddf19d 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -158,17 +158,13 @@
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
<item name="android:gravity">center</item>
- <item name="android:paddingLeft">15dp</item>
- <item name="android:paddingRight">15dp</item>
- <item name="android:paddingTop">10dp</item>
- <item name="android:paddingBottom">15dp</item>
+ <item name="android:paddingLeft">35dp</item>
+ <item name="android:paddingRight">35dp</item>
<item name="android:background">@drawable/tab_widget_indicator_selector</item>
- <item name="android:textColor">@color/tab_widget_indicator_color</item>
- <item name="android:textSize">16sp</item>
- <item name="android:shadowColor">#393939</item>
- <item name="android:shadowDx">0.0</item>
- <item name="android:shadowDy">1.0</item>
- <item name="android:shadowRadius">1.0</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textSize">12sp</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:textAllCaps">true</item>
</style>
<style name="TabIndicator.AppsCustomize">
<!-- Overridden in values-land -->
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java
index 8b7b95612..d37b1c902 100644
--- a/src/com/android/launcher2/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher2/AppsCustomizeTabHost.java
@@ -107,11 +107,16 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
// Create the tabs
TextView tabView;
+ String label;
+ label = mContext.getString(R.string.all_apps_button_label);
tabView = (TextView) mLayoutInflater.inflate(R.layout.tab_widget_indicator, tabs, false);
- tabView.setText(mContext.getString(R.string.all_apps_button_label));
+ tabView.setText(label);
+ tabView.setContentDescription(label);
addTab(newTabSpec(APPS_TAB_TAG).setIndicator(tabView).setContent(contentFactory));
+ label = mContext.getString(R.string.widgets_tab_label);
tabView = (TextView) mLayoutInflater.inflate(R.layout.tab_widget_indicator, tabs, false);
- tabView.setText(mContext.getString(R.string.widgets_tab_label));
+ tabView.setText(label);
+ tabView.setContentDescription(label);
addTab(newTabSpec(WIDGETS_TAB_TAG).setIndicator(tabView).setContent(contentFactory));
setOnTabChangedListener(this);