diff options
author | Winson Chung <winsonc@google.com> | 2011-06-13 18:15:54 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2011-06-13 18:47:30 -0700 |
commit | faa13255de0fb1d581ec7a583ed6ef0b661dbea0 (patch) | |
tree | 6486f064977b91d11acf8deaf4045d41925a35cf /src/com/android/launcher2/AppsCustomizeTabHost.java | |
parent | 61fa4197c4316bb0f9b05fcefb676f86197a2273 (diff) | |
download | android_packages_apps_Trebuchet-faa13255de0fb1d581ec7a583ed6ef0b661dbea0.tar.gz android_packages_apps_Trebuchet-faa13255de0fb1d581ec7a583ed6ef0b661dbea0.tar.bz2 android_packages_apps_Trebuchet-faa13255de0fb1d581ec7a583ed6ef0b661dbea0.zip |
Fixing crash in FocusHelper and removing some old focus code for old Customize layout.
Change-Id: Ifd8a38174bbcf04c0ffeeefb4f42419e82a6ba95
Diffstat (limited to 'src/com/android/launcher2/AppsCustomizeTabHost.java')
-rw-r--r-- | src/com/android/launcher2/AppsCustomizeTabHost.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java index b5c6327a4..51db66c73 100644 --- a/src/com/android/launcher2/AppsCustomizeTabHost.java +++ b/src/com/android/launcher2/AppsCustomizeTabHost.java @@ -25,6 +25,7 @@ import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.TabHost; +import android.widget.TabWidget; import android.widget.TextView; import com.android.launcher.R; @@ -63,7 +64,7 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona // Setup the tab host setup(); - final ViewGroup tabs = (ViewGroup) findViewById(com.android.internal.R.id.tabs); + final TabWidget tabs = (TabWidget) findViewById(com.android.internal.R.id.tabs); final AppsCustomizePagedView appsCustomizePane = (AppsCustomizePagedView) findViewById(R.id.apps_customize_pane_content); mTabs = tabs; @@ -87,6 +88,13 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona tabView.setText(mContext.getString(R.string.widgets_tab_label)); addTab(newTabSpec(WIDGETS_TAB_TAG).setIndicator(tabView).setContent(contentFactory)); setOnTabChangedListener(this); + + // Setup the key listener to jump between the last tab view and the market icon + AppsCustomizeTabKeyEventListener keyListener = new AppsCustomizeTabKeyEventListener(); + View lastTab = tabs.getChildTabViewAt(tabs.getTabCount() - 1); + lastTab.setOnKeyListener(keyListener); + View shopButton = findViewById(R.id.market_button); + shopButton.setOnKeyListener(keyListener); } @Override |