Merge "Revert deletion and deprecate few PopupWindow methods"

This commit is contained in:
Matvei Malkov
2019-03-14 19:23:26 +00:00
committed by Android (Google) Code Review
2 changed files with 56 additions and 0 deletions

View File

@@ -56414,10 +56414,12 @@ package android.widget {
method public int getWindowLayoutType();
method public boolean isAboveAnchor();
method public boolean isAttachedInDecor();
method @Deprecated public boolean isClipToScreenEnabled();
method public boolean isClippedToScreen();
method public boolean isClippingEnabled();
method public boolean isFocusable();
method public boolean isLaidOutInScreen();
method @Deprecated public boolean isLayoutInScreenEnabled();
method public boolean isOutsideTouchable();
method public boolean isShowing();
method public boolean isSplitTouchEnabled();
@@ -56426,6 +56428,7 @@ package android.widget {
method public void setAnimationStyle(int);
method public void setAttachedInDecor(boolean);
method public void setBackgroundDrawable(android.graphics.drawable.Drawable);
method @Deprecated public void setClipToScreenEnabled(boolean);
method public void setClippingEnabled(boolean);
method public void setContentView(android.view.View);
method public void setElevation(float);
@@ -56438,6 +56441,7 @@ package android.widget {
method public void setInputMethodMode(int);
method public void setIsClippedToScreen(boolean);
method public void setIsLaidOutInScreen(boolean);
method @Deprecated public void setLayoutInScreenEnabled(boolean);
method public void setOnDismissListener(android.widget.PopupWindow.OnDismissListener);
method public void setOutsideTouchable(boolean);
method public void setOverlapAnchor(boolean);

View File

@@ -881,6 +881,32 @@ public class PopupWindow {
mClippingEnabled = enabled;
}
/**
* <p>Indicates whether this popup will be clipped to the screen and not to the
* containing window<p/>
*
* @return true if popup will be clipped to the screen instead of the window, false otherwise
* @deprecated Use {@link #isClippedToScreen()} instead
*/
@Deprecated
public boolean isClipToScreenEnabled() {
return mClipToScreen;
}
/**
* <p>Clip this popup window to the screen, but not to the containing window.</p>
*
* <p>If the popup is showing, calling this method will take effect only
* the next time the popup is shown or through a manual call to one of
* the {@link #update()} methods.</p>
*
* @deprecated Use {@link #setIsClippedToScreen(boolean)} instead
*/
@Deprecated
public void setClipToScreenEnabled(boolean enabled) {
mClipToScreen = enabled;
}
/**
* <p>Indicates whether this popup will be clipped to the screen and not to the
* containing window<p/>
@@ -955,6 +981,32 @@ public class PopupWindow {
mSplitTouchEnabled = enabled ? 1 : 0;
}
/**
* <p>Indicates whether the popup window will be forced into using absolute screen coordinates
* for positioning.</p>
*
* @return true if the window will always be positioned in screen coordinates.
*
* @deprecated Use {@link #isLaidOutInScreen()} instead
*/
@Deprecated
public boolean isLayoutInScreenEnabled() {
return mLayoutInScreen;
}
/**
* <p>Allows the popup window to force the flag
* {@link WindowManager.LayoutParams#FLAG_LAYOUT_IN_SCREEN}, overriding default behavior.
* This will cause the popup to be positioned in absolute screen coordinates.</p>
*
* @param enabled true if the popup should always be positioned in screen coordinates
* @deprecated Use {@link #setIsLaidOutInScreen(boolean)} instead
*/
@Deprecated
public void setLayoutInScreenEnabled(boolean enabled) {
mLayoutInScreen = enabled;
}
/**
* <p>Indicates whether the popup window will be forced into using absolute screen coordinates
* for positioning.</p>