Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbb06e0c authored by Adam Powell's avatar Adam Powell
Browse files

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
parent ddc93ce3
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -16172,6 +16172,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        return mLayoutInsets;
    }
    /**
     * Set this view's optical insets.
     *
     * <p>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.
     * </p>
     * @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