From 87121accdb0ce318482ac51270763a6faab2ed63 Mon Sep 17 00:00:00 2001
From: Dianne Hackborn The titles fragment, showing a list of titles, is very simple, relying
+ * The titles fragment, showing a list of titles, is fairly simple, relying
* on {@link ListFragment} for most of its work. Note the implementation of
- * clicking an item, which can either update
- * the content of the details fragment or start a new activity show the
- * details depending on whether the current activity's layout can show the
- * details.
In this case when the user clicks on a title, there is no details - * fragment in the current activity, so the title title fragment's click code will + * container in the current activity, so the title title fragment's click code will * launch a new activity to display the details fragment:
* * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/FragmentLayout.java @@ -255,22 +254,25 @@ final class FragmentState implements Parcelable { * * {@sample development/samples/ApiDemos/res/layout-land/fragment_layout.xml layout} * - *Note how the prior code will adjust to this alternative UI flow: the - * titles fragment will now show its text inside of its activity, and the - * details activity will finish of it finds itself running in a configuration - * where the details can be shown inline. + *
Note how the prior code will adjust to this alternative UI flow: the titles + * fragment will now embed the details fragment inside of this activity, and the + * details activity will finish itself if it is running in a configuration + * where the details can be shown in-place. * *
When a configuration change causes the activity hosting these fragments * to restart, its new instance may use a different layout that doesn't * include the same fragments as the previous layout. In this case all of * the previous fragments will still be instantiated and running in the new - * instance; however, any that are no longer associated with a <fragment> - * tag in the view hierarchy will not have their content view created and will - * return false from {@link #isInLayout}. + * instance. However, any that are no longer associated with a <fragment> + * tag in the view hierarchy will not have their content view created + * and will return false from {@link #isInLayout}. (The code here also shows + * how you can determine if a fragment placed in a container is no longer + * running in a layout with that container and avoid creating its view hierarchy + * in that case.) * *
The attributes of the <fragment> tag are used to control the - * LayoutParams provider when attaching the fragment's view to the parent - * container. They can alse be parsed by the fragment in {@link #onInflate} + * LayoutParams provided when attaching the fragment's view to the parent + * container. They can also be parsed by the fragment in {@link #onInflate} * as parameters. * *
The fragment being instantiated must have some kind of unique identifier diff --git a/core/java/android/text/ClipboardManager.java b/core/java/android/text/ClipboardManager.java index 0b239cfe7a294..d0309100b0f2e 100644 --- a/core/java/android/text/ClipboardManager.java +++ b/core/java/android/text/ClipboardManager.java @@ -17,7 +17,7 @@ package android.text; /** - * @deprecated Old text-only interace to the clipboard. See + * @deprecated Old text-only interface to the clipboard. See * {@link android.content.ClipboardManager} for the modern API. */ @Deprecated diff --git a/core/java/android/widget/Adapters.java b/core/java/android/widget/Adapters.java index a71d4ab01ce34..3849aa42c9736 100644 --- a/core/java/android/widget/Adapters.java +++ b/core/java/android/widget/Adapters.java @@ -39,6 +39,8 @@ import java.util.ArrayList; import java.util.HashMap; /** + * @hide -- not sure if we really want this in the framework. + * *
This class can be used to load {@link android.widget.Adapter adapters} defined in * XML resources. XML-defined adapters can be used to easily create adapters in your * own application or to pass adapters to other processes.
@@ -239,18 +241,18 @@ import java.util.HashMap; * @see android.widget.Adapter * @see android.content.ContentProvider * - * @attr ref android.R.styleable#CursorAdapter_layout - * @attr ref android.R.styleable#CursorAdapter_selection - * @attr ref android.R.styleable#CursorAdapter_sortOrder - * @attr ref android.R.styleable#CursorAdapter_uri - * @attr ref android.R.styleable#CursorAdapter_BindItem_as - * @attr ref android.R.styleable#CursorAdapter_BindItem_from - * @attr ref android.R.styleable#CursorAdapter_BindItem_to - * @attr ref android.R.styleable#CursorAdapter_MapItem_fromValue - * @attr ref android.R.styleable#CursorAdapter_MapItem_toValue - * @attr ref android.R.styleable#CursorAdapter_SelectItem_column - * @attr ref android.R.styleable#CursorAdapter_TransformItem_withClass - * @attr ref android.R.styleable#CursorAdapter_TransformItem_withExpression + * attr ref android.R.styleable#CursorAdapter_layout + * attr ref android.R.styleable#CursorAdapter_selection + * attr ref android.R.styleable#CursorAdapter_sortOrder + * attr ref android.R.styleable#CursorAdapter_uri + * attr ref android.R.styleable#CursorAdapter_BindItem_as + * attr ref android.R.styleable#CursorAdapter_BindItem_from + * attr ref android.R.styleable#CursorAdapter_BindItem_to + * attr ref android.R.styleable#CursorAdapter_MapItem_fromValue + * attr ref android.R.styleable#CursorAdapter_MapItem_toValue + * attr ref android.R.styleable#CursorAdapter_SelectItem_column + * attr ref android.R.styleable#CursorAdapter_TransformItem_withClass + * attr ref android.R.styleable#CursorAdapter_TransformItem_withExpression */ @SuppressWarnings({"JavadocReference"}) public class Adapters { @@ -614,12 +616,12 @@ public class Adapters { throws IOException, XmlPullParserException { Resources resources = mResources; - TypedArray a = resources.obtainAttributes(mAttrs, android.R.styleable.CursorAdapter); + TypedArray a = resources.obtainAttributes(mAttrs, com.android.internal.R.styleable.CursorAdapter); - String uri = a.getString(android.R.styleable.CursorAdapter_uri); - String selection = a.getString(android.R.styleable.CursorAdapter_selection); - String sortOrder = a.getString(android.R.styleable.CursorAdapter_sortOrder); - int layout = a.getResourceId(android.R.styleable.CursorAdapter_layout, 0); + String uri = a.getString(com.android.internal.R.styleable.CursorAdapter_uri); + String selection = a.getString(com.android.internal.R.styleable.CursorAdapter_selection); + String sortOrder = a.getString(com.android.internal.R.styleable.CursorAdapter_sortOrder); + int layout = a.getResourceId(com.android.internal.R.styleable.CursorAdapter_layout, 0); if (layout == 0) { throw new IllegalArgumentException("The layout specified in " + resources.getResourceEntryName(mId) + " does not exist"); @@ -670,9 +672,9 @@ public class Adapters { private void parseSelectTag() { TypedArray a = mResources.obtainAttributes(mAttrs, - android.R.styleable.CursorAdapter_SelectItem); + com.android.internal.R.styleable.CursorAdapter_SelectItem); - String fromName = a.getString(android.R.styleable.CursorAdapter_SelectItem_column); + String fromName = a.getString(com.android.internal.R.styleable.CursorAdapter_SelectItem_column); if (fromName == null) { throw new IllegalArgumentException("A select item in " + mResources.getResourceEntryName(mId) + @@ -688,21 +690,21 @@ public class Adapters { private void parseBindTag() throws IOException, XmlPullParserException { Resources resources = mResources; TypedArray a = resources.obtainAttributes(mAttrs, - android.R.styleable.CursorAdapter_BindItem); + com.android.internal.R.styleable.CursorAdapter_BindItem); - String fromName = a.getString(android.R.styleable.CursorAdapter_BindItem_from); + String fromName = a.getString(com.android.internal.R.styleable.CursorAdapter_BindItem_from); if (fromName == null) { throw new IllegalArgumentException("A bind item in " + resources.getResourceEntryName(mId) + " does not have a 'from' attribute"); } - int toName = a.getResourceId(android.R.styleable.CursorAdapter_BindItem_to, 0); + int toName = a.getResourceId(com.android.internal.R.styleable.CursorAdapter_BindItem_to, 0); if (toName == 0) { throw new IllegalArgumentException("A bind item in " + resources.getResourceEntryName(mId) + " does not have a 'to' attribute"); } - String asType = a.getString(android.R.styleable.CursorAdapter_BindItem_as); + String asType = a.getString(com.android.internal.R.styleable.CursorAdapter_BindItem_as); if (asType == null) { throw new IllegalArgumentException("A bind item in " + resources.getResourceEntryName(mId) + " does not have an 'as' attribute"); @@ -796,9 +798,9 @@ public class Adapters { Resources resources = mResources; TypedArray a = resources.obtainAttributes(mAttrs, - android.R.styleable.CursorAdapter_MapItem); + com.android.internal.R.styleable.CursorAdapter_MapItem); - String from = a.getString(android.R.styleable.CursorAdapter_MapItem_fromValue); + String from = a.getString(com.android.internal.R.styleable.CursorAdapter_MapItem_fromValue); if (from == null) { throw new IllegalArgumentException("A map item in " + resources.getResourceEntryName(mId) + @@ -806,7 +808,7 @@ public class Adapters { } if (!drawable) { - String to = a.getString(android.R.styleable.CursorAdapter_MapItem_toValue); + String to = a.getString(com.android.internal.R.styleable.CursorAdapter_MapItem_toValue); if (to == null) { throw new IllegalArgumentException("A map item in " + resources.getResourceEntryName(mId) + @@ -814,7 +816,7 @@ public class Adapters { } transformation.addStringMapping(from, to); } else { - int to = a.getResourceId(android.R.styleable.CursorAdapter_MapItem_toValue, 0); + int to = a.getResourceId(com.android.internal.R.styleable.CursorAdapter_MapItem_toValue, 0); if (to == 0) { throw new IllegalArgumentException("A map item in " + resources.getResourceEntryName(mId) + @@ -830,12 +832,12 @@ public class Adapters { Resources resources = mResources; CursorTransformation transformation = null; TypedArray a = resources.obtainAttributes(mAttrs, - android.R.styleable.CursorAdapter_TransformItem); + com.android.internal.R.styleable.CursorAdapter_TransformItem); - String className = a.getString(android.R.styleable.CursorAdapter_TransformItem_withClass); + String className = a.getString(com.android.internal.R.styleable.CursorAdapter_TransformItem_withClass); if (className == null) { String expression = a.getString( - android.R.styleable.CursorAdapter_TransformItem_withExpression); + com.android.internal.R.styleable.CursorAdapter_TransformItem_withExpression); transformation = createExpressionTransformation(expression); } else if (!mContext.isRestricted()) { try { diff --git a/core/res/res/layout/preference_list_content.xml b/core/res/res/layout/preference_list_content.xml index a5f87d3a5fc64..5d034a5a6a1c4 100644 --- a/core/res/res/layout/preference_list_content.xml +++ b/core/res/res/layout/preference_list_content.xml @@ -65,7 +65,7 @@ android:layout_marginRight="@dimen/preference_screen_side_margin" android:layout_marginTop="16dp" android:layout_marginBottom="16dp" - android:background="?attr/preferencePanelBackground" + android:background="?attr/detailsElementBackground" android:orientation="vertical" android:visibility="gone" > diff --git a/core/res/res/values-xlarge/styles.xml b/core/res/res/values-xlarge/styles.xml index 489e5309a393b..ed05cb1cdb68d 100644 --- a/core/res/res/values-xlarge/styles.xml +++ b/core/res/res/values-xlarge/styles.xml @@ -40,7 +40,7 @@