diff options
| author | Adam Powell <adamp@google.com> | 2012-12-07 18:04:51 -0800 |
|---|---|---|
| committer | Adam Powell <adamp@google.com> | 2012-12-10 11:02:54 -0800 |
| commit | 2c8cc972c3b03b76a80db517dde1e68895bbdd66 (patch) | |
| tree | d19481710c65f5c8871884bddc453bf1bc8c6325 /core/java/android/widget/RelativeLayout.java | |
| parent | 7da4b73a236b7c72d1337696949df7a00776dd06 (diff) | |
Update documentation to mention compatibility versioning
Mention changes involving MeasureSpec/RelativeLayout/ImageView
behavior changes when apps target SDK > 17.
Change-Id: I232492a76ac048f7b460d28a87bd84cbbec4e4d7
Diffstat (limited to 'core/java/android/widget/RelativeLayout.java')
| -rw-r--r-- | core/java/android/widget/RelativeLayout.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java index 6021975050ad..66f8fe914973 100644 --- a/core/java/android/widget/RelativeLayout.java +++ b/core/java/android/widget/RelativeLayout.java @@ -54,6 +54,21 @@ import static android.util.Log.d; * {@link #ALIGN_PARENT_BOTTOM}. * </p> * + * <p><strong>Note:</strong> In platform version 17 and lower, RelativeLayout was affected by + * a measurement bug that could cause child views to be measured with incorrect + * {@link android.view.View.MeasureSpec MeasureSpec} values. (See + * {@link android.view.View.MeasureSpec#makeMeasureSpec(int, int) MeasureSpec.makeMeasureSpec} + * for more details.) This was triggered when a RelativeLayout container was placed in + * a scrolling container, such as a ScrollView or HorizontalScrollView. If a custom view + * not equipped to properly measure with the MeasureSpec mode + * {@link android.view.View.MeasureSpec#UNSPECIFIED UNSPECIFIED} was placed in a RelativeLayout, + * this would silently work anyway as RelativeLayout would pass a very large + * {@link android.view.View.MeasureSpec#AT_MOST AT_MOST} MeasureSpec instead.</p> + * + * <p>This behavior has been preserved for apps that set <code>android:targetSdkVersion="17"</code> + * or older in their manifest's <code>uses-sdk</code> tag for compatibility. Apps targeting SDK + * version 18 or newer will receive the correct behavior</p> + * * <p>See the <a href="{@docRoot}guide/topics/ui/layout/relative.html">Relative * Layout</a> guide.</p> * |
