Loading api/current.xml +22 −0 Original line number Diff line number Diff line Loading @@ -156861,6 +156861,17 @@ visibility="public" > </method> <method name="dispatchKeyUpEvent" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="protected" > </method> <method name="getCurrentTab" return="int" abstract="false" Loading Loading @@ -157166,6 +157177,17 @@ <parameter name="indicatorFactory" type="android.widget.TabHost.IndicatorStrategy"> </parameter> </method> <method name="setIndicator" return="android.widget.TabHost.TabSpec" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> </class> <class name="TabWidget" extends="android.widget.LinearLayout" core/java/android/widget/TabHost.java +28 −4 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.view.LayoutInflater; import android.view.SoundEffectConstants; import android.view.View; import android.view.ViewGroup; import android.view.ViewStub; import android.view.ViewTreeObserver; import android.view.Window; import com.android.internal.R; Loading Loading @@ -176,7 +177,7 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); // leaving touch mode.. if nothing has focus, let's give it to // the indicator of the current tab if (!mCurrentView.hasFocus() || mCurrentView.isFocused()) { mTabWidget.getChildAt(mCurrentTab).requestFocus(); dispatchKeyUpEvent(); } } } Loading @@ -195,8 +196,10 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); throw new IllegalArgumentException("you must specify a way to create the tab content"); } View tabIndicator = tabSpec.mIndicatorStrategy.createIndicatorView(); if (tabIndicator != null) { tabIndicator.setOnKeyListener(mTabKeyListener); mTabWidget.addView(tabIndicator); } mTabSpecs.add(tabSpec); if (mCurrentTab == -1) { Loading Loading @@ -272,13 +275,17 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); && (mCurrentView.isRootNamespace()) && (mCurrentView.hasFocus()) && (mCurrentView.findFocus().focusSearch(View.FOCUS_UP) == null)) { mTabWidget.getChildAt(mCurrentTab).requestFocus(); dispatchKeyUpEvent(); playSoundEffect(SoundEffectConstants.NAVIGATION_UP); return true; } return handled; } protected void dispatchKeyUpEvent() { mTabWidget.getChildAt(mCurrentTab).requestFocus(); } @Override public void dispatchWindowFocusChanged(boolean hasFocus) { Loading Loading @@ -414,6 +421,12 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); return this; } public TabSpec setIndicator() { mIndicatorStrategy = new ViewStubIndicatorStrategy(); //mIndicatorStrategy = new LabelIndicatorStrategy(""); return this; } /** * Specify the id of the view that should be used as the content * of the tab. Loading Loading @@ -479,6 +492,17 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); void tabClosed(); } private class ViewStubIndicatorStrategy implements IndicatorStrategy { public View createIndicatorView() { View view = new ViewStub(getContext()); return view; } } /** * How to create a tab indicator that just has a label. */ Loading core/java/com/tmobile/widget/Carousel.java +10 −1 Original line number Diff line number Diff line package com.tmobile.widget; import com.tmobile.widget.CarouselTabWidget.CarouselTabWidgetOnItemSelectedListener; import android.app.LocalActivityManager; Loading Loading @@ -135,6 +136,8 @@ public class Carousel extends TabHost implements OnGestureListener { } } public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { float x1 = e1.getX(); Loading Loading @@ -205,4 +208,10 @@ public class Carousel extends TabHost implements OnGestureListener { public void setTabWidget(CarouselTabWidget tabWidget) { mTabWidget = tabWidget; } protected void dispatchKeyUpEvent() { mTabWidget.getFilmstrip().requestFocus(); } } core/java/com/tmobile/widget/CarouselTabContentLayout.java +2 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,8 @@ public class CarouselTabContentLayout extends FrameLayout { LayoutParams layoutParams = generateDefaultLayoutParams(); setPadding(0, 62, 0, 0); // The height of filmstrip is 50, hence set the y padding to 50 setPadding(0, 50, 0, 0); super.addView(mCarouselLayout, -1, layoutParams); } Loading Loading
api/current.xml +22 −0 Original line number Diff line number Diff line Loading @@ -156861,6 +156861,17 @@ visibility="public" > </method> <method name="dispatchKeyUpEvent" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="protected" > </method> <method name="getCurrentTab" return="int" abstract="false" Loading Loading @@ -157166,6 +157177,17 @@ <parameter name="indicatorFactory" type="android.widget.TabHost.IndicatorStrategy"> </parameter> </method> <method name="setIndicator" return="android.widget.TabHost.TabSpec" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> </class> <class name="TabWidget" extends="android.widget.LinearLayout"
core/java/android/widget/TabHost.java +28 −4 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.view.LayoutInflater; import android.view.SoundEffectConstants; import android.view.View; import android.view.ViewGroup; import android.view.ViewStub; import android.view.ViewTreeObserver; import android.view.Window; import com.android.internal.R; Loading Loading @@ -176,7 +177,7 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); // leaving touch mode.. if nothing has focus, let's give it to // the indicator of the current tab if (!mCurrentView.hasFocus() || mCurrentView.isFocused()) { mTabWidget.getChildAt(mCurrentTab).requestFocus(); dispatchKeyUpEvent(); } } } Loading @@ -195,8 +196,10 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); throw new IllegalArgumentException("you must specify a way to create the tab content"); } View tabIndicator = tabSpec.mIndicatorStrategy.createIndicatorView(); if (tabIndicator != null) { tabIndicator.setOnKeyListener(mTabKeyListener); mTabWidget.addView(tabIndicator); } mTabSpecs.add(tabSpec); if (mCurrentTab == -1) { Loading Loading @@ -272,13 +275,17 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); && (mCurrentView.isRootNamespace()) && (mCurrentView.hasFocus()) && (mCurrentView.findFocus().focusSearch(View.FOCUS_UP) == null)) { mTabWidget.getChildAt(mCurrentTab).requestFocus(); dispatchKeyUpEvent(); playSoundEffect(SoundEffectConstants.NAVIGATION_UP); return true; } return handled; } protected void dispatchKeyUpEvent() { mTabWidget.getChildAt(mCurrentTab).requestFocus(); } @Override public void dispatchWindowFocusChanged(boolean hasFocus) { Loading Loading @@ -414,6 +421,12 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); return this; } public TabSpec setIndicator() { mIndicatorStrategy = new ViewStubIndicatorStrategy(); //mIndicatorStrategy = new LabelIndicatorStrategy(""); return this; } /** * Specify the id of the view that should be used as the content * of the tab. Loading Loading @@ -479,6 +492,17 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); void tabClosed(); } private class ViewStubIndicatorStrategy implements IndicatorStrategy { public View createIndicatorView() { View view = new ViewStub(getContext()); return view; } } /** * How to create a tab indicator that just has a label. */ Loading
core/java/com/tmobile/widget/Carousel.java +10 −1 Original line number Diff line number Diff line package com.tmobile.widget; import com.tmobile.widget.CarouselTabWidget.CarouselTabWidgetOnItemSelectedListener; import android.app.LocalActivityManager; Loading Loading @@ -135,6 +136,8 @@ public class Carousel extends TabHost implements OnGestureListener { } } public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { float x1 = e1.getX(); Loading Loading @@ -205,4 +208,10 @@ public class Carousel extends TabHost implements OnGestureListener { public void setTabWidget(CarouselTabWidget tabWidget) { mTabWidget = tabWidget; } protected void dispatchKeyUpEvent() { mTabWidget.getFilmstrip().requestFocus(); } }
core/java/com/tmobile/widget/CarouselTabContentLayout.java +2 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,8 @@ public class CarouselTabContentLayout extends FrameLayout { LayoutParams layoutParams = generateDefaultLayoutParams(); setPadding(0, 62, 0, 0); // The height of filmstrip is 50, hence set the y padding to 50 setPadding(0, 50, 0, 0); super.addView(mCarouselLayout, -1, layoutParams); } Loading