diff --git a/docs/html/distribute/googleplay/quality/tablet.jd b/docs/html/distribute/googleplay/quality/tablet.jd index c80c3cc978bae..885f713c79aae 100644 --- a/docs/html/distribute/googleplay/quality/tablet.jd +++ b/docs/html/distribute/googleplay/quality/tablet.jd @@ -312,7 +312,7 @@ without blurring or other scaling artifacts.
Figure 1. Example of the selection dialog that appears when more than one app can handle an intent.
@@ -211,11 +211,9 @@ if (isIntentSafe) {
- Figure 2. Example of the chooser dialog that appears -when you use {@link android.content.Intent#createChooser createChooser()} to ensure -that the user is always shown a list of apps that respond to your intent.
+Figure 2. A chooser dialog.
Notice that when you start an activity by passing your {@link android.content.Intent} to {@link @@ -223,11 +221,13 @@ android.app.Activity#startActivity startActivity()} and there is more than one a the intent, the user can select which app to use by default (by selecting a checkbox at the bottom of the dialog; see figure 1). This is nice when performing an action for which the user generally wants to use the same app every time, such as when opening a web page (users -likely use just one web browser) or taking a photo (users likely prefer one camera). However, if -the action to be performed could be handled by multiple apps and the user might +likely use just one web browser) or taking a photo (users likely prefer one camera).
+ +However, if the action to be performed could be handled by multiple apps and the user might prefer a different app each time—such as a "share" action, for which users might have several -apps through which they might share an item—you should explicitly show a chooser dialog, -which forces the user to select which app to use for the action every time (the user cannot select a +apps through which they might share an item—you should explicitly show a chooser dialog +as shown in figure 2. The chooser dialog +forces the user to select which app to use for the action every time (the user cannot select a default app for the action).
To show the chooser, create an {@link android.content.Intent} using {@link @@ -238,8 +238,9 @@ android.app.Activity#startActivity startActivity()}. For example:
Intent intent = new Intent(Intent.ACTION_SEND); ... -// Always use string resources for UI text. This says something like "Share this photo with" -String title = getResources().getText(R.string.chooser_title); +// Always use string resources for UI text. +// This says something like "Share this photo with" +String title = (String) getResources().getText(R.string.chooser_title); // Create and start the chooser Intent chooser = Intent.createChooser(intent, title); startActivity(chooser); diff --git a/docs/html/training/displaying-bitmaps/cache-bitmap.jd b/docs/html/training/displaying-bitmaps/cache-bitmap.jd index b1608c3a49bc2..25efe1ebbae02 100644 --- a/docs/html/training/displaying-bitmaps/cache-bitmap.jd +++ b/docs/html/training/displaying-bitmaps/cache-bitmap.jd @@ -324,14 +324,14 @@ private LruCache<String, Bitmap> mMemoryCache; @Override protected void onCreate(Bundle savedInstanceState) { ... - RetainFragment mRetainFragment = + RetainFragment retainFragment = RetainFragment.findOrCreateRetainFragment(getFragmentManager()); - mMemoryCache = RetainFragment.mRetainedCache; + mMemoryCache = retainFragment.mRetainedCache; if (mMemoryCache == null) { mMemoryCache = new LruCache<String, Bitmap>(cacheSize) { ... // Initialize cache here as usual } - mRetainFragment.mRetainedCache = mMemoryCache; + retainFragment.mRetainedCache = mMemoryCache; } ... }