summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-05-25 17:26:50 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-05-25 17:26:50 -0700
commit83e3868e90104b77a37adfbbf193b2e62758a17d (patch)
tree772a67593545e1a87561dc51be4bb2a0d3dee502
parentc835cc07c72f16fa5f892ea917886f19887be33d (diff)
parent20bb6c88f705531d36b7728b9f3cbb7042ef9513 (diff)
downloadandroid_packages_apps_Trebuchet-83e3868e90104b77a37adfbbf193b2e62758a17d.tar.gz
android_packages_apps_Trebuchet-83e3868e90104b77a37adfbbf193b2e62758a17d.tar.bz2
android_packages_apps_Trebuchet-83e3868e90104b77a37adfbbf193b2e62758a17d.zip
Merge "Fixing the customize drawer tabs on large devices"
-rw-r--r--res/layout-large/customize_tab_widget_indicator.xml19
-rw-r--r--res/values-large-port/styles.xml28
-rw-r--r--res/values-large/styles.xml3
-rw-r--r--res/values-xlarge/styles.xml23
-rw-r--r--src/com/android/launcher2/CustomizeTrayTabHost.java12
5 files changed, 81 insertions, 4 deletions
diff --git a/res/layout-large/customize_tab_widget_indicator.xml b/res/layout-large/customize_tab_widget_indicator.xml
new file mode 100644
index 000000000..186a34294
--- /dev/null
+++ b/res/layout-large/customize_tab_widget_indicator.xml
@@ -0,0 +1,19 @@
+<?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.
+-->
+
+<com.android.launcher2.AccessibleTabView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/CustomizeTabIndicator.Wide" />
diff --git a/res/values-large-port/styles.xml b/res/values-large-port/styles.xml
new file mode 100644
index 000000000..ba23a89d3
--- /dev/null
+++ b/res/values-large-port/styles.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright (C) 2008 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.
+*/
+-->
+
+<resources>
+ <style name="CustomizeTabIndicator.Wide" parent="TabIndicator.Wide">
+ <item name="android:paddingLeft">20dp</item>
+ <item name="android:paddingRight">20dp</item>
+ <item name="android:paddingTop">12dp</item>
+ <item name="android:paddingBottom">16dp</item>
+ <item name="android:textSize">16sp</item>
+ </style>
+</resources>
diff --git a/res/values-large/styles.xml b/res/values-large/styles.xml
index bcbe038ac..ebb26f566 100644
--- a/res/values-large/styles.xml
+++ b/res/values-large/styles.xml
@@ -50,6 +50,9 @@
<item name="android:textSize">20sp</item>
</style>
+ <style name="CustomizeTabIndicator.Wide" parent="TabIndicator.Wide">
+ </style>
+
<style name="config_orientation">
<item name="@android:screenOrientation">unspecified</item>
</style>
diff --git a/res/values-xlarge/styles.xml b/res/values-xlarge/styles.xml
new file mode 100644
index 000000000..fdf2f1970
--- /dev/null
+++ b/res/values-xlarge/styles.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright (C) 2011 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.
+*/
+-->
+
+<resources>
+ <style name="CustomizeTabIndicator.Wide" parent="TabIndicator.Wide">
+ </style>
+</resources>
diff --git a/src/com/android/launcher2/CustomizeTrayTabHost.java b/src/com/android/launcher2/CustomizeTrayTabHost.java
index 6306bdae4..c6a39b377 100644
--- a/src/com/android/launcher2/CustomizeTrayTabHost.java
+++ b/src/com/android/launcher2/CustomizeTrayTabHost.java
@@ -77,19 +77,23 @@ public class CustomizeTrayTabHost extends TabHost implements LauncherTransitiona
TextView tabView;
TabWidget tabWidget = (TabWidget) findViewById(com.android.internal.R.id.tabs);
- tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
+ tabView = (TextView) mInflater.inflate(
+ R.layout.customize_tab_widget_indicator, tabWidget, false);
tabView.setText(mContext.getString(R.string.widgets_tab_label));
addTab(newTabSpec(WIDGETS_TAG)
.setIndicator(tabView).setContent(contentFactory));
- tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
+ tabView = (TextView) mInflater.inflate(
+ R.layout.customize_tab_widget_indicator, tabWidget, false);
tabView.setText(mContext.getString(R.string.applications_tab_label));
addTab(newTabSpec(APPLICATIONS_TAG)
.setIndicator(tabView).setContent(contentFactory));
- tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
+ tabView = (TextView) mInflater.inflate(
+ R.layout.customize_tab_widget_indicator, tabWidget, false);
tabView.setText(mContext.getString(R.string.wallpapers_tab_label));
addTab(newTabSpec(WALLPAPERS_TAG)
.setIndicator(tabView).setContent(contentFactory));
- tabView = (TextView) mInflater.inflate(R.layout.tab_widget_indicator, tabWidget, false);
+ tabView = (TextView) mInflater.inflate(
+ R.layout.customize_tab_widget_indicator, tabWidget, false);
tabView.setText(mContext.getString(R.string.shortcuts_tab_label));
addTab(newTabSpec(SHORTCUTS_TAG)
.setIndicator(tabView).setContent(contentFactory));