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());
Stop searching for code, let great code find you!  Add Codota to your java IDE