diff options
Diffstat (limited to 'core/java/android/app/TabActivity.java')
-rw-r--r-- | core/java/android/app/TabActivity.java | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/core/java/android/app/TabActivity.java b/core/java/android/app/TabActivity.java index 033fa0c..0fd0c2c 100644 --- a/core/java/android/app/TabActivity.java +++ b/core/java/android/app/TabActivity.java @@ -23,8 +23,34 @@ import android.widget.TabWidget; import android.widget.TextView; /** - * An activity that contains and runs multiple embedded activities or views. + * @deprecated New applications should use Fragments instead of this class; + * to continue to run on older devices, you can use the v4 support library + * which provides a version of the Fragment API that is compatible down to + * {@link android.os.Build.VERSION_CODES#DONUT}. + * + * <p>For apps developing against {@link android.os.Build.VERSION_CODES#HONEYCOMB} + * or later, tabs are typically presented in the UI using the new + * {@link ActionBar#newTab() ActionBar.newTab()} and + * related APIs for placing tabs within their action bar area.</p> + * + * <p>A replacement for TabActivity can also be implemented by directly using + * TabHost. You will need to define a layout that correctly uses a TabHost + * with a TabWidget as well as an area in which to display your tab content. + * A typical example would be:</p> + * + * {@sample development/samples/Support4Demos/res/layout/fragment_tabs.xml complete} + * + * <p>The implementation needs to take over responsibility for switching + * the shown content when the user switches between tabs. + * + * {@sample development/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabs.java + * complete} + * + * <p>Also see the <a href="{@docRoot}resources/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabsPager.html"> + * Fragment Tabs Pager</a> sample for an example of using the support library's ViewPager to + * allow the user to swipe the content to switch between tabs.</p> */ +@Deprecated public class TabActivity extends ActivityGroup { private TabHost mTabHost; private String mDefaultTab = null; |