diff options
| author | Scott Main <smain@google.com> | 2011-07-27 13:22:35 -0700 |
|---|---|---|
| committer | Scott Main <smain@google.com> | 2011-07-27 13:22:35 -0700 |
| commit | 812634c236b83e100c8473d607e44f8d8c48e805 (patch) | |
| tree | 93befd60b6c48adf9130641a26b7f4368125d2b2 /core/java/android/widget/FrameLayout.java | |
| parent | 88409f84bf44ee07e2ad6fdf0dca6ee7e8f6fe1f (diff) | |
cherrypick Change-Id: I213711f4b5d867ba91c961a2f098b6cc415cfcb3
docs: clarify framelayout class summary, issue 5055437
Conflicts:
core/java/android/view/View.java
core/java/android/widget/FrameLayout.java
Change-Id: Ia446d2d4cc798757d7aea104cfaf75fc2315dc50
Diffstat (limited to 'core/java/android/widget/FrameLayout.java')
| -rw-r--r-- | core/java/android/widget/FrameLayout.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java index 5eba1a0b2e3f..0b0b812c9079 100644 --- a/core/java/android/widget/FrameLayout.java +++ b/core/java/android/widget/FrameLayout.java @@ -34,12 +34,17 @@ import android.widget.RemoteViews.RemoteView; /** * FrameLayout is designed to block out an area on the screen to display - * a single item. You can add multiple children to a FrameLayout and control their - * position within the FrameLayout using {@link android.widget.FrameLayout.LayoutParams#gravity}. - * Children are drawn in a stack, with the most recently added child on top. - * The size of the frame layout is the size of its largest child (plus padding), visible - * or not (if the FrameLayout's parent permits). Views that are GONE are used for sizing - * only if {@link #setMeasureAllChildren(boolean) setMeasureAllChildren()} + * a single item. Generally, FrameLayout should be used to hold a single child view, because it can + * be difficult to organize child views in a way that's scalable to different screen sizes without + * the children overlapping each other. You can, however, add multiple children to a FrameLayout + * and control their position within the FrameLayout by assigning gravity to each child, using the + * <a href="FrameLayout.LayoutParams.html#attr_android:layout_gravity">{@code + * android:layout_gravity}</a> attribute. + * <p>Child views are drawn in a stack, with the most recently added child on top. + * The size of the FrameLayout is the size of its largest child (plus padding), visible + * or not (if the FrameLayout's parent permits). Views that are {@link android.view.View#GONE} are + * used for sizing + * only if {@link #setMeasureAllChildren(boolean) setConsiderGoneChildrenWhenMeasuring()} * is set to true. * * @attr ref android.R.styleable#FrameLayout_foreground |
