diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 006aff896223a..eca583f46b221 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -3457,11 +3457,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * The base LayoutParams class just describes how big the view wants to be * for both width and height. For each dimension, it can specify one of: *
layout_width: the width, either an exact value,
- * {@link #WRAP_CONTENT} or {@link #MATCH_PARENT}layout_height: the height, either an exact value,
- * {@link #WRAP_CONTENT} or {@link #MATCH_PARENT}All view groups include a width and height (layout_width and layout_height),
-and each view is required to define them.
-Many LayoutParams also include optional margins and
-borders. You can specify width and height with exact measurements, though you probably won't want
-to do this often. More often, you will tell your view to size itself either to
-the dimensions required by its content, or to become as big as its parent view group
-will allow (with the wrap_content and fill_parent values, respectively).
-The accepted measurement types are defined in the
-Available Resources document.
All view groups include a width and height (layout_width and
+layout_height), and each view is required to define them. Many
+LayoutParams also include optional margins and borders.
+ +
You can specify width and height with exact measurements, though you probably +won't want to do this often. More often, you will use one of these constants to +set the width or height:
+ +In general, specifying a layout width and height using absolute units such as +pixels is not recommended. Instead, using relative measurements such as +density-independent pixel units (dp), wrap_content, or +fill_parent, is a better approach, because it helps ensure that +your application will display properly across a variety of device screen sizes. +The accepted measurement types are defined in the + +Available Resources document.