diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/widget/TabHost.java | 11 | ||||
-rw-r--r-- | core/java/com/tmobile/widget/CarouselTabContentLayout.java | 33 | ||||
-rw-r--r-- | core/java/com/tmobile/widget/CarouselTabWidget.java | 3 |
3 files changed, 13 insertions, 34 deletions
diff --git a/core/java/android/widget/TabHost.java b/core/java/android/widget/TabHost.java index c58cf05..1a9a6e8 100644 --- a/core/java/android/widget/TabHost.java +++ b/core/java/android/widget/TabHost.java @@ -422,7 +422,7 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); } public TabSpec setIndicator() { - mIndicatorStrategy = new ViewStubIndicatorStrategy(); + mIndicatorStrategy = new NullIndicatorStrategy(); return this; } @@ -492,6 +492,15 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); void tabClosed(); } + private class NullIndicatorStrategy implements IndicatorStrategy { + + public View createIndicatorView() { + return null; + } + + + } + private class ViewStubIndicatorStrategy implements IndicatorStrategy { public View createIndicatorView() { diff --git a/core/java/com/tmobile/widget/CarouselTabContentLayout.java b/core/java/com/tmobile/widget/CarouselTabContentLayout.java index a6deb91..3e0b8ac 100644 --- a/core/java/com/tmobile/widget/CarouselTabContentLayout.java +++ b/core/java/com/tmobile/widget/CarouselTabContentLayout.java @@ -123,39 +123,6 @@ public class CarouselTabContentLayout extends FrameLayout { // Do nothing } - - @Override - public View findFocus() { - - return mCarouselLayout.findFocus(); - } - - @Override - public View focusSearch(int direction) { - - return mCarouselLayout.focusSearch(direction); - } - - @Override - public View focusSearch(View focused, int direction) { - - return mCarouselLayout.focusSearch(focused, direction); - } - - @Override - public View getFocusedChild() { - - return mCarouselLayout.getFocusedChild(); - } - - @Override - public boolean dispatchKeyEvent(KeyEvent event) { - - return mCarouselLayout.dispatchKeyEvent(event); - } - - - public int getSelectedPosition() { return mCarouselLayout.getSelectedPosition(); } diff --git a/core/java/com/tmobile/widget/CarouselTabWidget.java b/core/java/com/tmobile/widget/CarouselTabWidget.java index 669c43f..ceb06e5 100644 --- a/core/java/com/tmobile/widget/CarouselTabWidget.java +++ b/core/java/com/tmobile/widget/CarouselTabWidget.java @@ -50,6 +50,9 @@ public class CarouselTabWidget extends TabWidget { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { super.onItemSelected(parent, view, position, id); + + CarouselTabWidget.this.requestFocus(); + mTabHost.setCurrentTab(position); } |