From a1bd1712d55c2adf737ca9327e3bec826808191e Mon Sep 17 00:00:00 2001 From: Joe Fernandez Date: Tue, 25 Apr 2017 22:28:27 -0700 Subject: [PATCH] docs: Update RelativeLayout.LayoutParams JavaDoc comments Added changes to make purpose/usage of RelativeLayout.LayoutParams more clear: - clarify the attributes are set on a view contained in a relative layout - clarify that relative layout uses these values to position the view - add note that these values are ignored if view is not contained in a relative layout - cross-link code sample in Relative Layout guide - cross-link guide Layout guide to clarify layout params vs regular attributes Test: docs change only. Tested with a docs test build. Change-Id: I4fe1088594c998cee4ff0b2f6295579956c19d6f --- core/java/android/widget/RelativeLayout.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java index 67bfe5e606c5..181ad31deddc 100644 --- a/core/java/android/widget/RelativeLayout.java +++ b/core/java/android/widget/RelativeLayout.java @@ -1174,7 +1174,19 @@ public class RelativeLayout extends ViewGroup { } /** - * Per-child layout information associated with RelativeLayout. + * Specifies how a view is positioned within a {@link RelativeLayout}. + * The relative layout containing the view uses the value of these layout parameters to + * determine where to position the view on the screen. If the view is not contained + * within a relative layout, these attributes are ignored. + * + * See the + * Relative Layout guide for example code demonstrating how to use relative layout’s + * layout parameters in a layout XML. + * + * To learn more about layout parameters and how they differ from typical view attributes, + * see the + * Layouts guide. + * * * @attr ref android.R.styleable#RelativeLayout_Layout_layout_alignWithParentIfMissing * @attr ref android.R.styleable#RelativeLayout_Layout_layout_toLeftOf -- 2.11.0