Merge "Rename methods for PopupWindow"
This commit is contained in:
committed by
Android (Google) Code Review
commit
6deeabb6bc
@@ -56394,10 +56394,10 @@ package android.widget {
|
||||
method public int getWindowLayoutType();
|
||||
method public boolean isAboveAnchor();
|
||||
method public boolean isAttachedInDecor();
|
||||
method public boolean isClipToScreenEnabled();
|
||||
method public boolean isClippedToScreen();
|
||||
method public boolean isClippingEnabled();
|
||||
method public boolean isFocusable();
|
||||
method public boolean isLayoutInScreenEnabled();
|
||||
method public boolean isLaidOutInScreen();
|
||||
method public boolean isOutsideTouchable();
|
||||
method public boolean isShowing();
|
||||
method public boolean isSplitTouchEnabled();
|
||||
@@ -56406,7 +56406,6 @@ package android.widget {
|
||||
method public void setAnimationStyle(int);
|
||||
method public void setAttachedInDecor(boolean);
|
||||
method public void setBackgroundDrawable(android.graphics.drawable.Drawable);
|
||||
method public void setClipToScreenEnabled(boolean);
|
||||
method public void setClippingEnabled(boolean);
|
||||
method public void setContentView(android.view.View);
|
||||
method public void setElevation(float);
|
||||
@@ -56417,7 +56416,8 @@ package android.widget {
|
||||
method public void setHeight(int);
|
||||
method public void setIgnoreCheekPress();
|
||||
method public void setInputMethodMode(int);
|
||||
method public void setLayoutInScreenEnabled(boolean);
|
||||
method public void setIsClippedToScreen(boolean);
|
||||
method public void setIsLaidOutInScreen(boolean);
|
||||
method public void setOnDismissListener(android.widget.PopupWindow.OnDismissListener);
|
||||
method public void setOutsideTouchable(boolean);
|
||||
method public void setOverlapAnchor(boolean);
|
||||
|
||||
@@ -702,7 +702,7 @@ public class ListPopupWindow implements ShowableListMenu {
|
||||
|
||||
mPopup.setWidth(widthSpec);
|
||||
mPopup.setHeight(heightSpec);
|
||||
mPopup.setClipToScreenEnabled(true);
|
||||
mPopup.setIsClippedToScreen(true);
|
||||
|
||||
// use outside touchable to dismiss drop down when touching outside of it, so
|
||||
// only set this if the dropdown is not always visible
|
||||
|
||||
@@ -887,9 +887,9 @@ public class PopupWindow {
|
||||
*
|
||||
* @return true if popup will be clipped to the screen instead of the window, false otherwise
|
||||
*
|
||||
* @see #setClipToScreenEnabled(boolean)
|
||||
* @see #setIsClippedToScreen(boolean)
|
||||
*/
|
||||
public boolean isClipToScreenEnabled() {
|
||||
public boolean isClippedToScreen() {
|
||||
return mClipToScreen;
|
||||
}
|
||||
|
||||
@@ -902,9 +902,9 @@ public class PopupWindow {
|
||||
*
|
||||
* @param enabled true to clip to the screen.
|
||||
*
|
||||
* @see #isClipToScreenEnabled()
|
||||
* @see #isClippedToScreen()
|
||||
*/
|
||||
public void setClipToScreenEnabled(boolean enabled) {
|
||||
public void setIsClippedToScreen(boolean enabled) {
|
||||
mClipToScreen = enabled;
|
||||
}
|
||||
|
||||
@@ -961,9 +961,9 @@ public class PopupWindow {
|
||||
*
|
||||
* @return true if the window will always be positioned in screen coordinates.
|
||||
*
|
||||
* @see #setLayoutInScreenEnabled(boolean)
|
||||
* @see #setIsLaidOutInScreen(boolean)
|
||||
*/
|
||||
public boolean isLayoutInScreenEnabled() {
|
||||
public boolean isLaidOutInScreen() {
|
||||
return mLayoutInScreen;
|
||||
}
|
||||
|
||||
@@ -974,9 +974,9 @@ public class PopupWindow {
|
||||
*
|
||||
* @param enabled true if the popup should always be positioned in screen coordinates
|
||||
*
|
||||
* @see #isLayoutInScreenEnabled()
|
||||
* @see #isLaidOutInScreen()
|
||||
*/
|
||||
public void setLayoutInScreenEnabled(boolean enabled) {
|
||||
public void setIsLaidOutInScreen(boolean enabled) {
|
||||
mLayoutInScreen = enabled;
|
||||
}
|
||||
|
||||
@@ -1016,7 +1016,7 @@ public class PopupWindow {
|
||||
* 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)}.
|
||||
* <p>This will often be combined with {@link #setIsLaidOutInScreen(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.
|
||||
@@ -2114,7 +2114,7 @@ public class PopupWindow {
|
||||
* <li>{@link #setTouchable(boolean)}</li>
|
||||
* <li>{@link #setAnimationStyle(int)}</li>
|
||||
* <li>{@link #setTouchModal(boolean)} (boolean)}</li>
|
||||
* <li>{@link #setClipToScreenEnabled(boolean)}</li>
|
||||
* <li>{@link #setIsClippedToScreen(boolean)}</li>
|
||||
* </ul>
|
||||
*/
|
||||
public void update() {
|
||||
|
||||
@@ -33,7 +33,6 @@ import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Size;
|
||||
import android.util.TypedValue;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -593,7 +592,7 @@ public final class FloatingToolbar {
|
||||
refreshCoordinatesAndOverflowDirection(contentRectOnScreen);
|
||||
preparePopupContent();
|
||||
// We need to specify the position in window coordinates.
|
||||
// TODO: Consider to use PopupWindow.setLayoutInScreenEnabled(true) so that we can
|
||||
// TODO: Consider to use PopupWindow.setIsLaidOutInScreen(true) so that we can
|
||||
// specify the popup position in screen coordinates.
|
||||
mPopupWindow.showAtLocation(
|
||||
mParent, Gravity.NO_GRAVITY, mCoordsOnWindow.x, mCoordsOnWindow.y);
|
||||
@@ -661,7 +660,7 @@ public final class FloatingToolbar {
|
||||
refreshCoordinatesAndOverflowDirection(contentRectOnScreen);
|
||||
preparePopupContent();
|
||||
// We need to specify the position in window coordinates.
|
||||
// TODO: Consider to use PopupWindow.setLayoutInScreenEnabled(true) so that we can
|
||||
// TODO: Consider to use PopupWindow.setIsLaidOutInScreen(true) so that we can
|
||||
// specify the popup position in screen coordinates.
|
||||
mPopupWindow.update(
|
||||
mCoordsOnWindow.x, mCoordsOnWindow.y,
|
||||
@@ -755,7 +754,7 @@ public final class FloatingToolbar {
|
||||
// and screen coordiantes, where the offset between them should be equal to the window
|
||||
// origin, and 2) we can use an arbitrary for this calculation while calculating the
|
||||
// location of the rootview is supposed to be least expensive.
|
||||
// TODO: Consider to use PopupWindow.setLayoutInScreenEnabled(true) so that we can avoid
|
||||
// TODO: Consider to use PopupWindow.setIsLaidOutInScreen(true) so that we can avoid
|
||||
// the following calculation.
|
||||
mParent.getRootView().getLocationOnScreen(mTmpCoords);
|
||||
int rootViewLeftOnScreen = mTmpCoords[0];
|
||||
@@ -1722,7 +1721,7 @@ public final class FloatingToolbar {
|
||||
private static PopupWindow createPopupWindow(ViewGroup content) {
|
||||
ViewGroup popupContentHolder = new LinearLayout(content.getContext());
|
||||
PopupWindow popupWindow = new PopupWindow(popupContentHolder);
|
||||
// TODO: Use .setLayoutInScreenEnabled(true) instead of .setClippingEnabled(false)
|
||||
// TODO: Use .setIsLaidOutInScreen(true) instead of .setClippingEnabled(false)
|
||||
// unless FLAG_LAYOUT_IN_SCREEN has any unintentional side-effects.
|
||||
popupWindow.setClippingEnabled(false);
|
||||
popupWindow.setWindowLayoutType(
|
||||
|
||||
Reference in New Issue
Block a user