summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/AppsCustomizeTabHost.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-05-09 16:00:53 -0700
committerWinson Chung <winsonc@google.com>2011-05-12 10:40:25 -0700
commit46af2e89164b391b7a0049c6ce9048a2b7a7f644 (patch)
treeb9b241e12baf8cda73cb0e636c750d9dcf8f4f53 /src/com/android/launcher2/AppsCustomizeTabHost.java
parent95963d614eac0dd67fd70e774c4c83b7eb676b3b (diff)
downloadandroid_packages_apps_Trebuchet-46af2e89164b391b7a0049c6ce9048a2b7a7f644.tar.gz
android_packages_apps_Trebuchet-46af2e89164b391b7a0049c6ce9048a2b7a7f644.tar.bz2
android_packages_apps_Trebuchet-46af2e89164b391b7a0049c6ce9048a2b7a7f644.zip
Adding Wallpapers tab.
Change-Id: Ic42bec30a4a3a4f8745bd1b5b164f33cc9a6c96f
Diffstat (limited to 'src/com/android/launcher2/AppsCustomizeTabHost.java')
-rw-r--r--src/com/android/launcher2/AppsCustomizeTabHost.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java
index 15920c34a..e2d21b6cb 100644
--- a/src/com/android/launcher2/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher2/AppsCustomizeTabHost.java
@@ -33,6 +33,7 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
private static final String APPS_TAB_TAG = "APPS";
private static final String WIDGETS_TAB_TAG = "WIDGETS";
+ private static final String WALLPAPERS_TAB_TAG = "WALLPAPERS";
private final LayoutInflater mLayoutInflater;
@@ -70,6 +71,9 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
tabView = (TextView) mLayoutInflater.inflate(R.layout.tab_widget_indicator, tabs, false);
tabView.setText(mContext.getString(R.string.widgets_tab_label));
addTab(newTabSpec(WIDGETS_TAB_TAG).setIndicator(tabView).setContent(contentFactory));
+ tabView = (TextView) mLayoutInflater.inflate(R.layout.tab_widget_indicator, tabs, false);
+ tabView.setText(mContext.getString(R.string.wallpapers_tab_label));
+ addTab(newTabSpec(WALLPAPERS_TAB_TAG).setIndicator(tabView).setContent(contentFactory));
setOnTabChangedListener(this);
// Set the width of the tab bar to match the content (for now)
@@ -91,6 +95,8 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
return AppsCustomizePagedView.ContentType.Applications;
} else if (tag.equals(WIDGETS_TAB_TAG)) {
return AppsCustomizePagedView.ContentType.Widgets;
+ } else if (tag.equals(WALLPAPERS_TAB_TAG)) {
+ return AppsCustomizePagedView.ContentType.Wallpapers;
}
return AppsCustomizePagedView.ContentType.Applications;
}
@@ -103,6 +109,8 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
return APPS_TAB_TAG;
} else if (type == AppsCustomizePagedView.ContentType.Widgets) {
return WIDGETS_TAB_TAG;
+ } else if (type == AppsCustomizePagedView.ContentType.Wallpapers) {
+ return WALLPAPERS_TAB_TAG;
}
return APPS_TAB_TAG;
}