Lines Matching refs:insets

882      * requested system UI flags that ignore those insets for layout.
2401 * Flag indicating that we're in the process of applying window insets.
2666 * flags, we would like a stable view of the content insets given to
2667 * {@link #fitSystemWindows(Rect)}. This means that the insets seen there
2694 * insets it adds to those given to the application.
3250 * The layout insets in pixels, that is the distance in pixels between the
7067 * Called by the view hierarchy when the content insets for a window have
7069 * The content insets tell you the space that the status bar, input method,
7081 * insets to the view's padding, consuming that content (modifying the
7082 * insets to be 0), and returning true. This behavior is off by default, but can
7086 * insets object is propagated down the hierarchy, so any changes made to it will
7093 * apply the appropriate insets to its content on all edges. If you need
7096 * you can override the method and handle the insets however you would like.
7097 * Note that the insets provided by the framework are always relative to the
7114 * @param insets Current content insets of the window. Prior to
7116 * the insets or else you and Android will be unhappy.
7118 * @return {@code true} if this view applied the insets and it should not
7125 * insets to views. Views should override {@link #onApplyWindowInsets(WindowInsets)} or use
7127 * to implement handling their own insets.
7129 protected boolean fitSystemWindows(Rect insets) {
7131 if (insets == null) {
7132 // Null insets by definition have already been consumed.
7133 // This call cannot apply insets since there are none to apply,
7137 // If we're not in the process of dispatching the newer apply insets call,
7139 // apply insets path and take things from there.
7142 return dispatchApplyWindowInsets(new WindowInsets(insets)).isConsumed();
7147 // We're being called from the newer apply insets path.
7149 return fitSystemWindowsInt(insets);
7153 private boolean fitSystemWindowsInt(Rect insets) {
7162 boolean res = computeFitSystemWindows(insets, localInsets);
7177 * to apply insets should call {@link #dispatchApplyWindowInsets(WindowInsets)}.</p>
7182 * insets policy in addition to its own.</p>
7184 * <p>Implementations of this method should either return the insets parameter unchanged
7185 * or a new {@link WindowInsets} cloned from the supplied insets with any insets consumed
7191 * property is set then the view will consume the system window insets and apply them
7194 * @param insets Insets to apply
7195 * @return The supplied insets with any applied insets consumed
7197 public WindowInsets onApplyWindowInsets(WindowInsets insets) {
7202 if (fitSystemWindows(insets.getSystemWindowInsets())) {
7203 return insets.consumeSystemWindowInsets();
7207 if (fitSystemWindowsInt(insets.getSystemWindowInsets())) {
7208 return insets.consumeSystemWindowInsets();
7211 return insets;
7216 * window insets to this view. The listener's
7230 * Request to apply the given window insets to this view or another view in its subtree.
7232 * <p>This method should be called by clients wishing to apply insets corresponding to areas
7235 * The method returns the insets provided minus any that were applied by this view or its
7247 * @param insets Insets to apply
7248 * @return The provided insets minus the insets that were consumed
7250 public WindowInsets dispatchApplyWindowInsets(WindowInsets insets) {
7254 return mListenerInfo.mOnApplyWindowInsetsListener.onApplyWindowInsets(this, insets);
7256 return onApplyWindowInsets(insets);
7264 * Provide original WindowInsets that are dispatched to the view hierarchy. The insets are
7277 * @hide Compute the insets that should be consumed by this view and the ones
7302 * Compute insets that should be consumed by this view and the ones that should propagate
7307 * @param outLocalInsets A Rect that will receive the insets that should be consumed
9682 * then and covered insets are used for the window to position its content
9703 final Rect insets = mAttachInfo.mVisibleInsets;
9704 outRect.left += insets.left;
9705 outRect.top += insets.top;
9706 outRect.right -= insets.right;
9707 outRect.bottom -= insets.bottom;
17944 * Set this view's optical insets.
17947 * property. Views that compute their own optical insets should call it as part of measurement.
17948 * This method does not request layout. If you are setting optical insets outside of
17953 public void setOpticalInsets(Insets insets) {
17954 mLayoutInsets = insets;
18770 Insets insets = getOpticalInsets();
18771 int oWidth = insets.left + insets.right;
18772 int oHeight = insets.top + insets.bottom;
18888 Insets insets = getOpticalInsets();
18889 int opticalWidth = insets.left + insets.right;
18890 int opticalHeight = insets.top + insets.bottom;
21413 * Listener for applying window insets on a view in a custom way.
21416 * to the way that window insets are treated for a view. If an OnApplyWindowInsetsListener
21430 * @param v The view applying window insets
21431 * @param insets The insets to apply
21432 * @return The insets supplied, minus any insets that were consumed
21434 public WindowInsets onApplyWindowInsets(View v, WindowInsets insets);
21596 * For windows that are full-screen but using insets to layout inside
21597 * of the screen areas, these are the current insets to appear inside
21603 * For windows that are full-screen but using insets to layout inside
21604 * of the screen decorations, these are the current insets for the
21610 * For windows that are full-screen but using insets to layout inside
21611 * of the screen decorations, these are the current insets for the
21617 * For windows that are full-screen but using insets to layout inside
21618 * of the screen decorations, these are the current insets for the
21630 * The internal insets given by this window. This value is