SDK only: integrate new sample code, deprecating along the way.
The new support library features and sample code for switching between fragments using a TabHost now eliminates the utility of the TabActivity class, so deprecate it. This also means there is no longer any use in ActivityGroup or LocalActivityManager. Yay. Also fix up things so the new support API demos are included in the documentation. Change-Id: I4f073b82787f32560ba1fa5b6a23746ecc8aecdc
This commit is contained in:
@@ -392,6 +392,10 @@ web_docs_sample_code_flags := \
|
|||||||
resources/samples/AccelerometerPlay "Accelerometer Play" \
|
resources/samples/AccelerometerPlay "Accelerometer Play" \
|
||||||
-samplecode $(sample_dir)/ApiDemos \
|
-samplecode $(sample_dir)/ApiDemos \
|
||||||
resources/samples/ApiDemos "API Demos" \
|
resources/samples/ApiDemos "API Demos" \
|
||||||
|
-samplecode $(sample_dir)/Support4Demos \
|
||||||
|
resources/samples/Support4Demos "API 4+ Support Demos" \
|
||||||
|
-samplecode $(sample_dir)/Support13Demos \
|
||||||
|
resources/samples/Support13Demos "API 13+ Support Demos" \
|
||||||
-samplecode $(sample_dir)/BackupRestore \
|
-samplecode $(sample_dir)/BackupRestore \
|
||||||
resources/samples/BackupRestore "Backup and Restore" \
|
resources/samples/BackupRestore "Backup and Restore" \
|
||||||
-samplecode $(sample_dir)/BluetoothChat \
|
-samplecode $(sample_dir)/BluetoothChat \
|
||||||
|
|||||||
@@ -25290,7 +25290,7 @@
|
|||||||
abstract="false"
|
abstract="false"
|
||||||
static="false"
|
static="false"
|
||||||
final="false"
|
final="false"
|
||||||
deprecated="not deprecated"
|
deprecated="deprecated"
|
||||||
visibility="public"
|
visibility="public"
|
||||||
>
|
>
|
||||||
<constructor name="ActivityGroup"
|
<constructor name="ActivityGroup"
|
||||||
@@ -33946,7 +33946,7 @@
|
|||||||
abstract="false"
|
abstract="false"
|
||||||
static="false"
|
static="false"
|
||||||
final="false"
|
final="false"
|
||||||
deprecated="not deprecated"
|
deprecated="deprecated"
|
||||||
visibility="public"
|
visibility="public"
|
||||||
>
|
>
|
||||||
<constructor name="LocalActivityManager"
|
<constructor name="LocalActivityManager"
|
||||||
@@ -37020,7 +37020,7 @@
|
|||||||
abstract="false"
|
abstract="false"
|
||||||
static="false"
|
static="false"
|
||||||
final="false"
|
final="false"
|
||||||
deprecated="not deprecated"
|
deprecated="deprecated"
|
||||||
visibility="public"
|
visibility="public"
|
||||||
>
|
>
|
||||||
<constructor name="TabActivity"
|
<constructor name="TabActivity"
|
||||||
|
|||||||
@@ -400,6 +400,12 @@ public abstract class ActionBar {
|
|||||||
* Create and return a new {@link Tab}.
|
* Create and return a new {@link Tab}.
|
||||||
* This tab will not be included in the action bar until it is added.
|
* This tab will not be included in the action bar until it is added.
|
||||||
*
|
*
|
||||||
|
* <p>Very often tabs will be used to switch between {@link Fragment}
|
||||||
|
* objects. Here is a typical implementation of such tabs:</p>
|
||||||
|
*
|
||||||
|
* {@sample development/samples/ApiDemos/src/com/example/android/apis/app/FragmentTabs.java
|
||||||
|
* complete}
|
||||||
|
*
|
||||||
* @return A new Tab
|
* @return A new Tab
|
||||||
*
|
*
|
||||||
* @see #addTab(Tab)
|
* @see #addTab(Tab)
|
||||||
|
|||||||
@@ -23,8 +23,13 @@ import android.os.Bundle;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @deprecated Use the new {@link Fragment} and {@link FragmentManager} APIs
|
||||||
|
* instead; these are also
|
||||||
|
* available on older platforms through the Android compatibility package.
|
||||||
|
*
|
||||||
* A screen that contains and runs multiple embedded activities.
|
* A screen that contains and runs multiple embedded activities.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class ActivityGroup extends Activity {
|
public class ActivityGroup extends Activity {
|
||||||
private static final String TAG = "ActivityGroup";
|
private static final String TAG = "ActivityGroup";
|
||||||
private static final String STATES_KEY = "android:states";
|
private static final String STATES_KEY = "android:states";
|
||||||
|
|||||||
@@ -28,12 +28,17 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class for managing multiple running embedded activities in the same
|
* @deprecated Use the new {@link Fragment} and {@link FragmentManager} APIs
|
||||||
|
* instead; these are also
|
||||||
|
* available on older platforms through the Android compatibility package.
|
||||||
|
*
|
||||||
|
* <p>Helper class for managing multiple running embedded activities in the same
|
||||||
* process. This class is not normally used directly, but rather created for
|
* process. This class is not normally used directly, but rather created for
|
||||||
* you as part of the {@link android.app.ActivityGroup} implementation.
|
* you as part of the {@link android.app.ActivityGroup} implementation.
|
||||||
*
|
*
|
||||||
* @see ActivityGroup
|
* @see ActivityGroup
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class LocalActivityManager {
|
public class LocalActivityManager {
|
||||||
private static final String TAG = "LocalActivityManager";
|
private static final String TAG = "LocalActivityManager";
|
||||||
private static final boolean localLOGV = false;
|
private static final boolean localLOGV = false;
|
||||||
|
|||||||
@@ -23,8 +23,34 @@ import android.widget.TabWidget;
|
|||||||
import android.widget.TextView;
|
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 {
|
public class TabActivity extends ActivityGroup {
|
||||||
private TabHost mTabHost;
|
private TabHost mTabHost;
|
||||||
private String mDefaultTab = null;
|
private String mDefaultTab = null;
|
||||||
|
|||||||
@@ -406,6 +406,26 @@ var ANDROID_RESOURCES = [
|
|||||||
en: 'A variety of small applications that demonstrate an extensive collection of framework topics.'
|
en: 'A variety of small applications that demonstrate an extensive collection of framework topics.'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
tags: ['sample', 'layout', 'ui', 'fragment', 'loader', 'new'],
|
||||||
|
path: 'samples/Support4Demos/index.html',
|
||||||
|
title: {
|
||||||
|
en: 'API 4+ Support Demos'
|
||||||
|
},
|
||||||
|
description: {
|
||||||
|
en: 'A variety of small applications that demonstrate the use of the helper classes in the Android API 4+ Support Library (classes which work down to API level 4 or version 1.6 of the platform).'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tags: ['sample', 'layout', 'ui', 'new'],
|
||||||
|
path: 'samples/Support13Demos/index.html',
|
||||||
|
title: {
|
||||||
|
en: 'API 13+ Support Demos'
|
||||||
|
},
|
||||||
|
description: {
|
||||||
|
en: 'A variety of small applications that demonstrate the use of the helper classes in the Android API 13+ Support Library (classes which work down to API level 13 or version 3.2 of the platform).'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
tags: ['sample', 'data', 'newfeature', 'accountsync'],
|
tags: ['sample', 'data', 'newfeature', 'accountsync'],
|
||||||
path: 'samples/BackupRestore/index.html',
|
path: 'samples/BackupRestore/index.html',
|
||||||
|
|||||||
Reference in New Issue
Block a user