Loading core/java/android/widget/TabHost.java +4 −3 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ public class TabHost extends FrameLayout implements ViewTreeObserver.OnTouchMode initTabHost(); } private final void initTabHost() { private void initTabHost() { setFocusableInTouchMode(true); setDescendantFocusability(FOCUS_AFTER_DESCENDANTS); Loading Loading @@ -134,7 +134,8 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); mTabContent = (FrameLayout) findViewById(com.android.internal.R.id.tabcontent); if (mTabContent == null) { throw new RuntimeException( "Your TabHost must have a FrameLayout whose id attribute is 'android.R.id.tabcontent'"); "Your TabHost must have a FrameLayout whose id attribute is " + "'android.R.id.tabcontent'"); } } Loading Loading @@ -176,7 +177,7 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); if (!isInTouchMode) { // leaving touch mode.. if nothing has focus, let's give it to // the indicator of the current tab if (!mCurrentView.hasFocus() || mCurrentView.isFocused()) { if (mCurrentView != null && (!mCurrentView.hasFocus() || mCurrentView.isFocused())) { mTabWidget.getChildTabViewAt(mCurrentTab).requestFocus(); } } Loading Loading
core/java/android/widget/TabHost.java +4 −3 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ public class TabHost extends FrameLayout implements ViewTreeObserver.OnTouchMode initTabHost(); } private final void initTabHost() { private void initTabHost() { setFocusableInTouchMode(true); setDescendantFocusability(FOCUS_AFTER_DESCENDANTS); Loading Loading @@ -134,7 +134,8 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); mTabContent = (FrameLayout) findViewById(com.android.internal.R.id.tabcontent); if (mTabContent == null) { throw new RuntimeException( "Your TabHost must have a FrameLayout whose id attribute is 'android.R.id.tabcontent'"); "Your TabHost must have a FrameLayout whose id attribute is " + "'android.R.id.tabcontent'"); } } Loading Loading @@ -176,7 +177,7 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); if (!isInTouchMode) { // leaving touch mode.. if nothing has focus, let's give it to // the indicator of the current tab if (!mCurrentView.hasFocus() || mCurrentView.isFocused()) { if (mCurrentView != null && (!mCurrentView.hasFocus() || mCurrentView.isFocused())) { mTabWidget.getChildTabViewAt(mCurrentTab).requestFocus(); } } Loading