From dbb06e0c8c60ade44d38cda0dc570ccf588d324f Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Mon, 2 Jun 2014 14:24:47 -0700 Subject: Add an internal method for setting optical insets. This will allow views to calculate their own optical insets e.g. during measurement. Candidate for public API down the road once it proves itself for framework views. Change-Id: I098d7b7b52e5aaf7eccc8ef34d79791d127d8c77 --- core/java/android/view/View.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'core/java/android') diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 025cf69..c7c007e 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -16173,6 +16173,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** + * Set this view's optical insets. + * + *

This method should be treated similarly to setMeasuredDimension and not as a general + * property. Views that compute their own optical insets should call it as part of measurement. + * This method does not request layout. If you are setting optical insets outside of + * measure/layout itself you will want to call requestLayout() yourself. + *

+ * @hide + */ + public void setOpticalInsets(Insets insets) { + mLayoutInsets = insets; + } + + /** * Changes the selection state of this view. A view can be selected or not. * Note that selection is not the same as focus. Views are typically * selected in the context of an AdapterView like ListView or GridView; -- cgit v1.1