diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-06-16 16:38:07 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-06-16 16:38:07 -0700 |
commit | 46d6bcfb95525132fcfb4ec15aae0af4ec7475c5 (patch) | |
tree | ed13e5ef0ec5a7e50d5ef9e6f9782c75c9e42861 | |
parent | 9171bf38925a38f6343c8cecf4b5ea20bef16549 (diff) | |
parent | a7f88508d307c7554968ad3d1c1c58895ea3a223 (diff) | |
download | frameworks_base-46d6bcfb95525132fcfb4ec15aae0af4ec7475c5.zip frameworks_base-46d6bcfb95525132fcfb4ec15aae0af4ec7475c5.tar.gz frameworks_base-46d6bcfb95525132fcfb4ec15aae0af4ec7475c5.tar.bz2 |
Merge "resolved conflicts for merge of 872a1e79 to master"
-rw-r--r-- | Android.mk | 6 | ||||
-rw-r--r-- | api/current.txt | 6 | ||||
-rw-r--r-- | core/java/android/app/ActionBar.java | 6 | ||||
-rw-r--r-- | core/java/android/app/ActivityGroup.java | 5 | ||||
-rw-r--r-- | core/java/android/app/LocalActivityManager.java | 7 | ||||
-rw-r--r-- | core/java/android/app/TabActivity.java | 28 | ||||
-rw-r--r-- | docs/html/resources/resources-data.js | 20 |
7 files changed, 72 insertions, 6 deletions
@@ -382,8 +382,12 @@ web_docs_sample_code_flags := \ resources/samples/AccessibilityService "Accessibility Service" \ -samplecode $(sample_dir)/AccelerometerPlay \ resources/samples/AccelerometerPlay "Accelerometer Play" \ - -samplecode $(sample_dir)/ApiDemos \ + -samplecode $(sample_dir)/ApiDemos \ 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 \ resources/samples/BackupRestore "Backup and Restore" \ -samplecode $(sample_dir)/BluetoothChat \ diff --git a/api/current.txt b/api/current.txt index a2fe825..1e2120c 100644 --- a/api/current.txt +++ b/api/current.txt @@ -2448,7 +2448,7 @@ package android.app { field public static final int RESULT_OK = -1; // 0xffffffff } - public class ActivityGroup extends android.app.Activity { + public deprecated class ActivityGroup extends android.app.Activity { ctor public ActivityGroup(); ctor public ActivityGroup(boolean); method public android.app.Activity getCurrentActivity(); @@ -3237,7 +3237,7 @@ package android.app { method public abstract void onLoaderReset(android.content.Loader<D>); } - public class LocalActivityManager { + public deprecated class LocalActivityManager { ctor public LocalActivityManager(android.app.Activity, boolean); method public android.view.Window destroyActivity(java.lang.String, boolean); method public void dispatchCreate(android.os.Bundle); @@ -3520,7 +3520,7 @@ package android.app { field public static final int START_STICKY_COMPATIBILITY = 0; // 0x0 } - public class TabActivity extends android.app.ActivityGroup { + public deprecated class TabActivity extends android.app.ActivityGroup { ctor public TabActivity(); method public android.widget.TabHost getTabHost(); method public android.widget.TabWidget getTabWidget(); diff --git a/core/java/android/app/ActionBar.java b/core/java/android/app/ActionBar.java index cac06ec..3ec5edb 100644 --- a/core/java/android/app/ActionBar.java +++ b/core/java/android/app/ActionBar.java @@ -487,6 +487,12 @@ public abstract class ActionBar { * Create and return a new {@link Tab}. * 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 * * @see #addTab(Tab) diff --git a/core/java/android/app/ActivityGroup.java b/core/java/android/app/ActivityGroup.java index 5b04253..fbd78be 100644 --- a/core/java/android/app/ActivityGroup.java +++ b/core/java/android/app/ActivityGroup.java @@ -23,8 +23,13 @@ import android.os.Bundle; 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. */ +@Deprecated public class ActivityGroup extends Activity { private static final String TAG = "ActivityGroup"; private static final String STATES_KEY = "android:states"; diff --git a/core/java/android/app/LocalActivityManager.java b/core/java/android/app/LocalActivityManager.java index c958e1b..0a6b804 100644 --- a/core/java/android/app/LocalActivityManager.java +++ b/core/java/android/app/LocalActivityManager.java @@ -28,12 +28,17 @@ import java.util.HashMap; 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 * you as part of the {@link android.app.ActivityGroup} implementation. * * @see ActivityGroup */ +@Deprecated public class LocalActivityManager { private static final String TAG = "LocalActivityManager"; private static final boolean localLOGV = false; 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; diff --git a/docs/html/resources/resources-data.js b/docs/html/resources/resources-data.js index 77aee46..097d004 100644 --- a/docs/html/resources/resources-data.js +++ b/docs/html/resources/resources-data.js @@ -407,6 +407,26 @@ var ANDROID_RESOURCES = [ } }, { + 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'], path: 'samples/BackupRestore/index.html', title: { |