diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 025cf69e87ebb..c7c007ec001f8 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -16172,6 +16172,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return mLayoutInsets; } + /** + * 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