FileDocCategorySizeDatePackage
AppCompatPopupWindow.javaAPI DocAndroid 5.1 API2678Thu Mar 12 22:22:56 GMT 2015android.support.v7.internal.widget

AppCompatPopupWindow

public class AppCompatPopupWindow extends android.widget.PopupWindow
hide

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 voidshowAsDropDown(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 voidshowAsDropDown(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 voidupdate(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);