Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -22232,6 +22232,7 @@ package android.view { method public final android.view.View findViewWithTag(java.lang.Object); method public void findViewsWithText(java.util.ArrayList<android.view.View>, java.lang.CharSequence); method protected boolean fitSystemWindows(android.graphics.Rect); method public boolean fitsSystemWindows(); method public android.view.View focusSearch(int); method public void forceLayout(); method public float getAlpha(); Loading Loading @@ -22473,6 +22474,7 @@ package android.view { method public void setEnabled(boolean); method public void setFadingEdgeLength(int); method public void setFilterTouchesWhenObscured(boolean); method public void setFitsSystemWindows(boolean); method public void setFocusable(boolean); method public void setFocusableInTouchMode(boolean); method public void setHapticFeedbackEnabled(boolean); core/java/android/view/View.java +30 −0 Original line number Diff line number Diff line Loading @@ -4279,6 +4279,36 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit return false; } /** * Set whether or not this view should account for system screen decorations * such as the status bar and inset its content. This allows this view to be * positioned in absolute screen coordinates and remain visible to the user. * * <p>This should only be used by top-level window decor views. * * @param fitSystemWindows true to inset content for system screen decorations, false for * default behavior. * * @attr ref android.R.styleable#View_fitsSystemWindows */ public void setFitsSystemWindows(boolean fitSystemWindows) { setFlags(fitSystemWindows ? FITS_SYSTEM_WINDOWS : 0, FITS_SYSTEM_WINDOWS); } /** * Check for the FITS_SYSTEM_WINDOWS flag. If this method returns true, this view * will account for system screen decorations such as the status bar and inset its * content. This allows the view to be positioned in absolute screen coordinates * and remain visible to the user. * * @return true if this view will adjust its content bounds for system screen decorations. * * @attr ref android.R.styleable#View_fitsSystemWindows */ public boolean fitsSystemWindows() { return (mViewFlags & FITS_SYSTEM_WINDOWS) == FITS_SYSTEM_WINDOWS; } /** * Returns the visibility status for this view. * Loading core/java/android/widget/PopupWindow.java +21 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ public class PopupWindow { private boolean mLayoutInScreen; private boolean mClipToScreen; private boolean mAllowScrollingAnchorParent = true; private boolean mLayoutInsetDecor = false; private OnTouchListener mTouchInterceptor; Loading Loading @@ -657,6 +658,22 @@ public class PopupWindow { mLayoutInScreen = enabled; } /** * Allows the popup window to force the flag * {@link WindowManager.LayoutParams#FLAG_LAYOUT_INSET_DECOR}, overriding default behavior. * This will cause the popup to inset its content to account for system windows overlaying * the screen, such as the status bar. * * <p>This will often be combined with {@link #setLayoutInScreenEnabled(boolean)}. * * @param enabled true if the popup's views should inset content to account for system windows, * the way that decor views behave for full-screen windows. * @hide */ public void setLayoutInsetDecor(boolean enabled) { mLayoutInsetDecor = enabled; } /** * Set the layout type for this window. Should be one of the TYPE constants defined in * {@link WindowManager.LayoutParams}. Loading Loading @@ -942,6 +959,7 @@ public class PopupWindow { if (mContext != null) { p.packageName = mContext.getPackageName(); } mPopupView.setFitsSystemWindows(mLayoutInsetDecor); mWindowManager.addView(mPopupView, p); } Loading Loading @@ -1012,6 +1030,9 @@ public class PopupWindow { if (mLayoutInScreen) { curFlags |= WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN; } if (mLayoutInsetDecor) { curFlags |= WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR; } return curFlags; } Loading policy/src/com/android/internal/policy/impl/PhoneWindow.java +2 −1 Original line number Diff line number Diff line Loading @@ -2040,13 +2040,14 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { mActionModePopup = new PopupWindow(mContext, null, com.android.internal.R.attr.actionModePopupWindowStyle); mActionModePopup.setLayoutInScreenEnabled(true); mActionModePopup.setLayoutInsetDecor(true); mActionModePopup.setClippingEnabled(false); mActionModePopup.setContentView(mActionModeView); mActionModePopup.setWidth(MATCH_PARENT); TypedValue heightValue = new TypedValue(); mContext.getTheme().resolveAttribute( com.android.internal.R.attr.actionBarSize, heightValue, false); com.android.internal.R.attr.actionBarSize, heightValue, true); final int height = TypedValue.complexToDimensionPixelSize(heightValue.data, mContext.getResources().getDisplayMetrics()); mActionModePopup.setHeight(height); Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -22232,6 +22232,7 @@ package android.view { method public final android.view.View findViewWithTag(java.lang.Object); method public void findViewsWithText(java.util.ArrayList<android.view.View>, java.lang.CharSequence); method protected boolean fitSystemWindows(android.graphics.Rect); method public boolean fitsSystemWindows(); method public android.view.View focusSearch(int); method public void forceLayout(); method public float getAlpha(); Loading Loading @@ -22473,6 +22474,7 @@ package android.view { method public void setEnabled(boolean); method public void setFadingEdgeLength(int); method public void setFilterTouchesWhenObscured(boolean); method public void setFitsSystemWindows(boolean); method public void setFocusable(boolean); method public void setFocusableInTouchMode(boolean); method public void setHapticFeedbackEnabled(boolean);
core/java/android/view/View.java +30 −0 Original line number Diff line number Diff line Loading @@ -4279,6 +4279,36 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit return false; } /** * Set whether or not this view should account for system screen decorations * such as the status bar and inset its content. This allows this view to be * positioned in absolute screen coordinates and remain visible to the user. * * <p>This should only be used by top-level window decor views. * * @param fitSystemWindows true to inset content for system screen decorations, false for * default behavior. * * @attr ref android.R.styleable#View_fitsSystemWindows */ public void setFitsSystemWindows(boolean fitSystemWindows) { setFlags(fitSystemWindows ? FITS_SYSTEM_WINDOWS : 0, FITS_SYSTEM_WINDOWS); } /** * Check for the FITS_SYSTEM_WINDOWS flag. If this method returns true, this view * will account for system screen decorations such as the status bar and inset its * content. This allows the view to be positioned in absolute screen coordinates * and remain visible to the user. * * @return true if this view will adjust its content bounds for system screen decorations. * * @attr ref android.R.styleable#View_fitsSystemWindows */ public boolean fitsSystemWindows() { return (mViewFlags & FITS_SYSTEM_WINDOWS) == FITS_SYSTEM_WINDOWS; } /** * Returns the visibility status for this view. * Loading
core/java/android/widget/PopupWindow.java +21 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ public class PopupWindow { private boolean mLayoutInScreen; private boolean mClipToScreen; private boolean mAllowScrollingAnchorParent = true; private boolean mLayoutInsetDecor = false; private OnTouchListener mTouchInterceptor; Loading Loading @@ -657,6 +658,22 @@ public class PopupWindow { mLayoutInScreen = enabled; } /** * Allows the popup window to force the flag * {@link WindowManager.LayoutParams#FLAG_LAYOUT_INSET_DECOR}, overriding default behavior. * This will cause the popup to inset its content to account for system windows overlaying * the screen, such as the status bar. * * <p>This will often be combined with {@link #setLayoutInScreenEnabled(boolean)}. * * @param enabled true if the popup's views should inset content to account for system windows, * the way that decor views behave for full-screen windows. * @hide */ public void setLayoutInsetDecor(boolean enabled) { mLayoutInsetDecor = enabled; } /** * Set the layout type for this window. Should be one of the TYPE constants defined in * {@link WindowManager.LayoutParams}. Loading Loading @@ -942,6 +959,7 @@ public class PopupWindow { if (mContext != null) { p.packageName = mContext.getPackageName(); } mPopupView.setFitsSystemWindows(mLayoutInsetDecor); mWindowManager.addView(mPopupView, p); } Loading Loading @@ -1012,6 +1030,9 @@ public class PopupWindow { if (mLayoutInScreen) { curFlags |= WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN; } if (mLayoutInsetDecor) { curFlags |= WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR; } return curFlags; } Loading
policy/src/com/android/internal/policy/impl/PhoneWindow.java +2 −1 Original line number Diff line number Diff line Loading @@ -2040,13 +2040,14 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { mActionModePopup = new PopupWindow(mContext, null, com.android.internal.R.attr.actionModePopupWindowStyle); mActionModePopup.setLayoutInScreenEnabled(true); mActionModePopup.setLayoutInsetDecor(true); mActionModePopup.setClippingEnabled(false); mActionModePopup.setContentView(mActionModeView); mActionModePopup.setWidth(MATCH_PARENT); TypedValue heightValue = new TypedValue(); mContext.getTheme().resolveAttribute( com.android.internal.R.attr.actionBarSize, heightValue, false); com.android.internal.R.attr.actionBarSize, heightValue, true); final int height = TypedValue.complexToDimensionPixelSize(heightValue.data, mContext.getResources().getDisplayMetrics()); mActionModePopup.setHeight(height); Loading