From 7adb4c8a45772c380defdd4e6b42a95c0ceea1e6 Mon Sep 17 00:00:00 2001 From: Joe Fernandez Date: Mon, 28 Mar 2016 10:04:57 -0700 Subject: [PATCH] docs: InfoPros, Project 02, Batch 03 - Removing API 15 and lower work-arounds b/26490262 Change-Id: Ie8ca92bbff68ca3bc67d2b81164d970058a8a8a8 --- .../guide/practices/screens-distribution.jd | 2 -- docs/html/guide/topics/graphics/overview.jd | 2 +- docs/html/guide/topics/media/mediarouter.jd | 4 +-- .../guide/topics/resources/menu-resource.jd | 3 +-- .../html/guide/topics/search/search-dialog.jd | 26 +++---------------- .../guide/topics/ui/accessibility/apps.jd | 11 +------- .../guide/topics/ui/accessibility/services.jd | 2 +- docs/html/guide/topics/ui/controls/pickers.jd | 11 +------- docs/html/guide/topics/ui/declaring-layout.jd | 2 +- docs/html/guide/topics/ui/menus.jd | 24 ++++------------- .../topics/ui/notifiers/notifications.jd | 13 +++++----- docs/html/guide/topics/ui/settings.jd | 4 +-- docs/html/tools/building/building-cmdline.jd | 9 ++----- docs/html/tools/device.jd | 15 ++++------- docs/html/tools/projects/templates.jd | 4 +-- docs/html/training/accessibility/testing.jd | 6 ++--- 16 files changed, 38 insertions(+), 100 deletions(-) diff --git a/docs/html/guide/practices/screens-distribution.jd b/docs/html/guide/practices/screens-distribution.jd index 99eb04e6955ee..19fb3d3de105b 100644 --- a/docs/html/guide/practices/screens-distribution.jd +++ b/docs/html/guide/practices/screens-distribution.jd @@ -25,8 +25,6 @@ screen configuration
  1. Supporting Multiple Screens
  2. -
  3. Optimizing Apps for Android 3.0
diff --git a/docs/html/guide/topics/graphics/overview.jd b/docs/html/guide/topics/graphics/overview.jd index a53cd3f15936c..66a675dc6491b 100644 --- a/docs/html/guide/topics/graphics/overview.jd +++ b/docs/html/guide/topics/graphics/overview.jd @@ -8,7 +8,7 @@ page.title=Animation and Graphics Overview

Animation

The Android framework provides two animation systems: property animation - (introduced in Android 3.0) and view animation. Both animation systems are viable options, + and view animation. Both animation systems are viable options, but the property animation system, in general, is the preferred method to use, because it is more flexible and offers more features. In addition to these two systems, you can utilize Drawable animation, which allows you to load drawable resources and display them one frame after diff --git a/docs/html/guide/topics/media/mediarouter.jd b/docs/html/guide/topics/media/mediarouter.jd index e0bf88914899b..f5e4f141ebe55 100644 --- a/docs/html/guide/topics/media/mediarouter.jd +++ b/docs/html/guide/topics/media/mediarouter.jd @@ -458,8 +458,8 @@ public class MediaRouterPlaybackActivity extends ActionBarActivity {

Note: In order for Wireless Display routes to show up in the media route selection dialog, users must enable this option in the Settings app. The option is under - the Display category and is called Cast screen on Android 4.4 (KitKat) and higher - devices and Wireless Display on Android 4.2.x (Jelly Bean) devices. For more information + the Display category and is called Cast screen on Android 4.4 (KitKat) + and higher devices. For more information on enabling this feature see this Wireless display support page.

diff --git a/docs/html/guide/topics/resources/menu-resource.jd b/docs/html/guide/topics/resources/menu-resource.jd index 53ff27615a3e7..3c4c8b87e3f93 100644 --- a/docs/html/guide/topics/resources/menu-resource.jd +++ b/docs/html/guide/topics/resources/menu-resource.jd @@ -300,8 +300,7 @@ public void onGroupItemClick(MenuItem item) { // All other menu item clicks are handled by {@link android.app.Activity#onOptionsItemSelected onOptionsItemSelected()} } -

Note: The {@code android:showAsAction} attribute is -available only on Android 3.0 (API Level 11) and greater.

+ diff --git a/docs/html/guide/topics/search/search-dialog.jd b/docs/html/guide/topics/search/search-dialog.jd index 1cf82493a74da..cde1920c388d4 100644 --- a/docs/html/guide/topics/search/search-dialog.jd +++ b/docs/html/guide/topics/search/search-dialog.jd @@ -102,8 +102,7 @@ handle searches. The dialog can also provide search suggestions while the user t you can place anywhere in your layout. By default, the search widget behaves like a standard {@link android.widget.EditText} widget and doesn't do anything, but you can configure it so that the Android system handles all input events, delivers queries to the appropriate activity, and provides -search suggestions (just like the search dialog). However, the search widget is available only in -Android 3.0 (API Level 11) and higher. +search suggestions (just like the search dialog).

Note: If you want, you can handle all user input into the search widget yourself, using various callback methods and listeners. This document, however, @@ -376,30 +375,13 @@ for an a complete demonstration of how to search an SQLite database and use an

Using the Search Dialog

-

The search dialog provides a floating search box at the top of the screen, with the application icon on the left. The search dialog can provide search suggestions as the user types and, when the user executes a search, the system sends the search query to a searchable activity that performs the search. However, if you are developing your application for devices running Android 3.0, you should consider using the search widget -instead (see the side box).

+instead (see Using the Search Widget section).

The search dialog is always hidden by default, until the user activates it. Your application can activate the search dialog by calling {@link @@ -685,14 +667,14 @@ layout). For example, figure 2 shows the search widget in the app bar.

The search widget provides the same functionality as the search dialog. It starts the appropriate activity when the user executes a search, and it can provide search suggestions and perform voice -search.

+search. If it's not an option for you to put the search widget in the Action Bar, you can instead +put the search widget somewhere in your activity layout.

Note: When you use the search widget as an action view, you still might need to support using the search dialog, for cases in which the search widget does not fit in the Action Bar. See the following section about Using both the widget and the dialog.

-

Configuring the search widget

After you've created a searchable configuration and a -

In applications targeting Android 4.0 (API Level 14) and higher, you can implement these methods +

You can implement these methods directly in your custom view class. For another example of this approach, see the Android Support Library (revision 5 or higher) sample {@code AccessibilityDelegateSupportActivity} in ({@code <sdk>/extras/android/support/v4/samples/Support4Demos/}).

-

Note: You may find information on implementing accessibility for -custom views written prior to Android 4.0 that describes the use of the -{@link android.view.View#dispatchPopulateAccessibilityEvent dispatchPopulateAccessibilityEvent()} -method for populating AccessibilityEvents. As of the Android 4.0 release, however, the recommended -approach is to use the -{@link android.view.View#onPopulateAccessibilityEvent onPopulateAccessibilityEvent()} and -{@link android.view.View#onInitializeAccessibilityEvent onInitializeAccessibilityEvent()} -methods.

-

Providing a customized accessibility context

diff --git a/docs/html/guide/topics/ui/accessibility/services.jd b/docs/html/guide/topics/ui/accessibility/services.jd index d69af9f1ca868..8620f1596ead1 100644 --- a/docs/html/guide/topics/ui/accessibility/services.jd +++ b/docs/html/guide/topics/ui/accessibility/services.jd @@ -409,7 +409,7 @@ public class MyAccessibilityService extends AccessibilityService {

Using focus types

Android 4.1 (API Level 16) introduces a new type of user interface focus called Accessibility - Focus. This type of focus can be used by accessibility services to select any visible user + Focus. Accessibility services can used this type of focus to select any visible user interface element and act on it. This focus type is different from the more well known Input Focus, which determines what on-screen user interface element receives input when a user types characters, presses Enter on a keyboard or pushes the center button of a diff --git a/docs/html/guide/topics/ui/controls/pickers.jd b/docs/html/guide/topics/ui/controls/pickers.jd index 31e4d3f521418..c0667add65aaa 100644 --- a/docs/html/guide/topics/ui/controls/pickers.jd +++ b/docs/html/guide/topics/ui/controls/pickers.jd @@ -170,10 +170,6 @@ android.support.v4.app.DialogFragment}, you need to define a fragment class that android.support.v4.app.DialogFragment} and return a {@link android.app.DatePickerDialog} from the fragment's {@link android.support.v4.app.DialogFragment#onCreateDialog onCreateDialog()} method.

-

Note: If your app supports versions of Android older than 3.0, -be sure you've set up your Android project with the support library as described in Setting Up a Project to Use a -Library.

Extending DialogFragment for a date picker

@@ -250,9 +246,4 @@ android.support.v4.app.DialogFragment} defined above. The {@link android.support.v4.app.DialogFragment#show show()} method requires an instance of {@link android.support.v4.app.FragmentManager} and a unique tag name for the fragment.

-

Caution: If your app supports versions of Android lower than -3.0, be sure that you call {@link -android.support.v4.app.FragmentActivity#getSupportFragmentManager()} to acquire an instance of -{@link android.support.v4.app.FragmentManager}. Also make sure that your activity that displays the -time picker extends {@link android.support.v4.app.FragmentActivity} instead of the standard {@link -android.app.Activity} class.

+ diff --git a/docs/html/guide/topics/ui/declaring-layout.jd b/docs/html/guide/topics/ui/declaring-layout.jd index 2d4134d2405fc..bf0db576cf2eb 100755 --- a/docs/html/guide/topics/ui/declaring-layout.jd +++ b/docs/html/guide/topics/ui/declaring-layout.jd @@ -211,7 +211,7 @@ set the width or height:

diff --git a/docs/html/guide/topics/ui/menus.jd b/docs/html/guide/topics/ui/menus.jd index 11e84f11de6ce..ad2aa9b8bf290 100644 --- a/docs/html/guide/topics/ui/menus.jd +++ b/docs/html/guide/topics/ui/menus.jd @@ -75,14 +75,6 @@ versions of Android:

The options menu is the primary collection of menu items for an activity. It's where you should place actions that have a global impact on the app, such as "Search," "Compose email," and "Settings." -

If you're developing for Android 2.3 or lower, users can -reveal the options menu panel by pressing the Menu button.

-

On Android 3.0 and higher, items from the options menu are presented by the - app bar as a combination of on-screen action -items and overflow options. Beginning with Android 3.0, the Menu button is deprecated (some -devices -don't have one), so you should migrate toward using the action bar to provide access to actions and -other options.

See the section about Creating an Options Menu.

@@ -91,8 +83,7 @@ other options.

A context menu is a floating menu that appears when the user performs a long-click on an element. It provides actions that affect the selected content or context frame. -

When developing for Android 3.0 and higher, you should instead use the contextual action mode to enable actions on selected content. This mode displays +

The contextual action mode displays action items that affect the selected content in a bar at the top of the screen and allows the user to select multiple items.

See the section about Creating Contextual Menus.

@@ -278,8 +269,8 @@ properties with {@link android.view.MenuItem} APIs.

If you've developed your application for Android 2.3.x and lower, the system calls {@link android.app.Activity#onCreateOptionsMenu(Menu) onCreateOptionsMenu()} to create the options menu -when the user opens the menu for the first time. If you've developed for Android 3.0 and higher, the -system calls {@link android.app.Activity#onCreateOptionsMenu(Menu) onCreateOptionsMenu()} when +when the user opens the menu for the first time. If you've developed for Android 3.0 and higher, +the system calls {@link android.app.Activity#onCreateOptionsMenu(Menu) onCreateOptionsMenu()} when starting the activity, in order to show items to the app bar.

@@ -504,10 +495,6 @@ associated with the app bar. They operate independently, even though the contextual action bar visually overtakes the app bar position.

-

If you're developing for Android 3.0 (API level 11) or higher, you -should usually use the contextual action mode to present contextual actions, instead of the floating context menu.

-

For views that provide contextual actions, you should usually invoke the contextual action mode upon one of two events (or both):