summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt120
-rw-r--r--core/java/android/widget/TabHost.java4
-rw-r--r--core/java/android/widget/TabWidget.java5
3 files changed, 69 insertions, 60 deletions
diff --git a/api/current.txt b/api/current.txt
index 870b6ae09d95..aee8eb1b161f 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -57006,66 +57006,66 @@ package android.widget {
method public void setTrackTintMode(@Nullable android.graphics.PorterDuff.Mode);
}
- public class TabHost extends android.widget.FrameLayout implements android.view.ViewTreeObserver.OnTouchModeChangeListener {
- ctor public TabHost(android.content.Context);
- ctor public TabHost(android.content.Context, android.util.AttributeSet);
- ctor public TabHost(android.content.Context, android.util.AttributeSet, int);
- ctor public TabHost(android.content.Context, android.util.AttributeSet, int, int);
- method public void addTab(android.widget.TabHost.TabSpec);
- method public void clearAllTabs();
- method @Nullable public int getCurrentTab();
- method @Nullable public String getCurrentTabTag();
- method @Nullable public android.view.View getCurrentTabView();
- method public android.view.View getCurrentView();
- method public android.widget.FrameLayout getTabContentView();
- method public android.widget.TabWidget getTabWidget();
- method @NonNull public android.widget.TabHost.TabSpec newTabSpec(@NonNull String);
- method public void onTouchModeChanged(boolean);
- method public void setCurrentTab(int);
- method public void setCurrentTabByTag(String);
- method public void setOnTabChangedListener(android.widget.TabHost.OnTabChangeListener);
- method public void setup();
- method public void setup(android.app.LocalActivityManager);
- }
-
- public static interface TabHost.OnTabChangeListener {
- method public void onTabChanged(String);
- }
-
- public static interface TabHost.TabContentFactory {
- method public android.view.View createTabContent(String);
- }
-
- public class TabHost.TabSpec {
- method @NonNull public String getTag();
- method public android.widget.TabHost.TabSpec setContent(int);
- method public android.widget.TabHost.TabSpec setContent(android.widget.TabHost.TabContentFactory);
- method public android.widget.TabHost.TabSpec setContent(android.content.Intent);
- method public android.widget.TabHost.TabSpec setIndicator(CharSequence);
- method public android.widget.TabHost.TabSpec setIndicator(CharSequence, android.graphics.drawable.Drawable);
- method public android.widget.TabHost.TabSpec setIndicator(android.view.View);
- }
-
- public class TabWidget extends android.widget.LinearLayout implements android.view.View.OnFocusChangeListener {
- ctor public TabWidget(android.content.Context);
- ctor public TabWidget(android.content.Context, android.util.AttributeSet);
- ctor public TabWidget(android.content.Context, android.util.AttributeSet, int);
- ctor public TabWidget(android.content.Context, android.util.AttributeSet, int, int);
- method public void dispatchDraw(android.graphics.Canvas);
- method public void focusCurrentTab(int);
- method public android.view.View getChildTabViewAt(int);
- method @Nullable public android.graphics.drawable.Drawable getLeftStripDrawable();
- method @Nullable public android.graphics.drawable.Drawable getRightStripDrawable();
- method public int getTabCount();
- method public boolean isStripEnabled();
- method public void onFocusChange(android.view.View, boolean);
- method public void setCurrentTab(int);
- method public void setDividerDrawable(@DrawableRes int);
- method public void setLeftStripDrawable(@Nullable android.graphics.drawable.Drawable);
- method public void setLeftStripDrawable(@DrawableRes int);
- method public void setRightStripDrawable(@Nullable android.graphics.drawable.Drawable);
- method public void setRightStripDrawable(@DrawableRes int);
- method public void setStripEnabled(boolean);
+ @Deprecated public class TabHost extends android.widget.FrameLayout implements android.view.ViewTreeObserver.OnTouchModeChangeListener {
+ ctor @Deprecated public TabHost(android.content.Context);
+ ctor @Deprecated public TabHost(android.content.Context, android.util.AttributeSet);
+ ctor @Deprecated public TabHost(android.content.Context, android.util.AttributeSet, int);
+ ctor @Deprecated public TabHost(android.content.Context, android.util.AttributeSet, int, int);
+ method @Deprecated public void addTab(android.widget.TabHost.TabSpec);
+ method @Deprecated public void clearAllTabs();
+ method @Deprecated @Nullable public int getCurrentTab();
+ method @Deprecated @Nullable public String getCurrentTabTag();
+ method @Deprecated @Nullable public android.view.View getCurrentTabView();
+ method @Deprecated public android.view.View getCurrentView();
+ method @Deprecated public android.widget.FrameLayout getTabContentView();
+ method @Deprecated public android.widget.TabWidget getTabWidget();
+ method @Deprecated @NonNull public android.widget.TabHost.TabSpec newTabSpec(@NonNull String);
+ method @Deprecated public void onTouchModeChanged(boolean);
+ method @Deprecated public void setCurrentTab(int);
+ method @Deprecated public void setCurrentTabByTag(String);
+ method @Deprecated public void setOnTabChangedListener(android.widget.TabHost.OnTabChangeListener);
+ method @Deprecated public void setup();
+ method @Deprecated public void setup(android.app.LocalActivityManager);
+ }
+
+ @Deprecated public static interface TabHost.OnTabChangeListener {
+ method @Deprecated public void onTabChanged(String);
+ }
+
+ @Deprecated public static interface TabHost.TabContentFactory {
+ method @Deprecated public android.view.View createTabContent(String);
+ }
+
+ @Deprecated public class TabHost.TabSpec {
+ method @Deprecated @NonNull public String getTag();
+ method @Deprecated public android.widget.TabHost.TabSpec setContent(int);
+ method @Deprecated public android.widget.TabHost.TabSpec setContent(android.widget.TabHost.TabContentFactory);
+ method @Deprecated public android.widget.TabHost.TabSpec setContent(android.content.Intent);
+ method @Deprecated public android.widget.TabHost.TabSpec setIndicator(CharSequence);
+ method @Deprecated public android.widget.TabHost.TabSpec setIndicator(CharSequence, android.graphics.drawable.Drawable);
+ method @Deprecated public android.widget.TabHost.TabSpec setIndicator(android.view.View);
+ }
+
+ @Deprecated public class TabWidget extends android.widget.LinearLayout implements android.view.View.OnFocusChangeListener {
+ ctor @Deprecated public TabWidget(android.content.Context);
+ ctor @Deprecated public TabWidget(android.content.Context, android.util.AttributeSet);
+ ctor @Deprecated public TabWidget(android.content.Context, android.util.AttributeSet, int);
+ ctor @Deprecated public TabWidget(android.content.Context, android.util.AttributeSet, int, int);
+ method @Deprecated public void dispatchDraw(android.graphics.Canvas);
+ method @Deprecated public void focusCurrentTab(int);
+ method @Deprecated public android.view.View getChildTabViewAt(int);
+ method @Deprecated @Nullable public android.graphics.drawable.Drawable getLeftStripDrawable();
+ method @Deprecated @Nullable public android.graphics.drawable.Drawable getRightStripDrawable();
+ method @Deprecated public int getTabCount();
+ method @Deprecated public boolean isStripEnabled();
+ method @Deprecated public void onFocusChange(android.view.View, boolean);
+ method @Deprecated public void setCurrentTab(int);
+ method @Deprecated public void setDividerDrawable(@DrawableRes int);
+ method @Deprecated public void setLeftStripDrawable(@Nullable android.graphics.drawable.Drawable);
+ method @Deprecated public void setLeftStripDrawable(@DrawableRes int);
+ method @Deprecated public void setRightStripDrawable(@Nullable android.graphics.drawable.Drawable);
+ method @Deprecated public void setRightStripDrawable(@DrawableRes int);
+ method @Deprecated public void setStripEnabled(boolean);
}
public class TableLayout extends android.widget.LinearLayout {
diff --git a/core/java/android/widget/TabHost.java b/core/java/android/widget/TabHost.java
index 481704c80287..90cb1c8dfa03 100644
--- a/core/java/android/widget/TabHost.java
+++ b/core/java/android/widget/TabHost.java
@@ -46,7 +46,11 @@ import java.util.List;
* page. The individual elements are typically controlled using this container object, rather than
* setting values on the child elements themselves.
*
+ * @deprecated new applications should use fragment APIs instead of this class:
+ * Use <a href="{@docRoot}guide/navigation/navigation-swipe-view">TabLayout and ViewPager</a>
+ * instead.
*/
+@Deprecated
public class TabHost extends FrameLayout implements ViewTreeObserver.OnTouchModeChangeListener {
private static final int TABWIDGET_LOCATION_LEFT = 0;
diff --git a/core/java/android/widget/TabWidget.java b/core/java/android/widget/TabWidget.java
index 4c67b080252a..434a79970499 100644
--- a/core/java/android/widget/TabWidget.java
+++ b/core/java/android/widget/TabWidget.java
@@ -53,7 +53,12 @@ import com.android.internal.R;
* @attr ref android.R.styleable#TabWidget_tabStripEnabled
* @attr ref android.R.styleable#TabWidget_tabStripLeft
* @attr ref android.R.styleable#TabWidget_tabStripRight
+ *
+ * @deprecated new applications should use fragment APIs instead of this class:
+ * Use <a href="{@docRoot}guide/navigation/navigation-swipe-view">TabLayout and ViewPager</a>
+ * instead.
*/
+@Deprecated
public class TabWidget extends LinearLayout implements OnFocusChangeListener {
private final Rect mBounds = new Rect();