AppCompatPopupWindowpublic class AppCompatPopupWindow extends android.widget.PopupWindow
Fields Summary |
---|
private final boolean | mOverlapAnchor |
Constructors Summary |
---|
public AppCompatPopupWindow(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)
super(context, attrs, defStyleAttr);
TintTypedArray a = TintTypedArray.obtainStyledAttributes(context, attrs,
R.styleable.PopupWindow, defStyleAttr, 0);
mOverlapAnchor = a.getBoolean(R.styleable.PopupWindow_overlapAnchor, false);
// We re-set this for tinting purposes
setBackgroundDrawable(a.getDrawable(R.styleable.PopupWindow_android_popupBackground));
a.recycle();
|
Methods Summary |
---|
public void | showAsDropDown(android.view.View anchor, int xoff, int yoff)
if (Build.VERSION.SDK_INT < 21 && mOverlapAnchor) {
// If we're pre-L, emulate overlapAnchor by modifying the yOff
yoff -= anchor.getHeight();
}
super.showAsDropDown(anchor, xoff, yoff);
| public void | showAsDropDown(android.view.View anchor, int xoff, int yoff, int gravity)
if (Build.VERSION.SDK_INT < 21 && mOverlapAnchor) {
// If we're pre-L, emulate overlapAnchor by modifying the yOff
yoff -= anchor.getHeight();
}
super.showAsDropDown(anchor, xoff, yoff, gravity);
| public void | update(android.view.View anchor, int xoff, int yoff, int width, int height)
if (Build.VERSION.SDK_INT < 21 && mOverlapAnchor) {
// If we're pre-L, emulate overlapAnchor by modifying the yOff
yoff -= anchor.getHeight();
}
super.update(anchor, xoff, yoff, width, height);
|
|