Code example for PopupWindow

Methods: setAnimationStyle

    protected void showWindowAtLocation(View parent, int gravity, int x, int y) {
        this.window.showAtLocation(parent,  gravity,  x, y);
    protected void setWindowAnimationStyle(int animationStyle) {
    protected void onCreate() {} 
    protected void onShow() {} 
    protected void preShow() { 
        if (root == null) {
            throw new IllegalStateException("setContentView was not called with a view to display");
        if (background == null) {
            window.setBackgroundDrawable(new BitmapDrawable());
Contextual code suggestions in your IDE  Get Codota for Java