Popupwindow底部弹出

LinearLayout layout = (LinearLayout) LayoutInflater.from(this).inflate(R.layout.music_popwindow,

                    null);

            PopupWindow mPopupWindow = new PopupWindow(layout, LayoutParams.FILL_PARENT,

                    LayoutParams.WRAP_CONTENT);

            mPopupWindow.setAnimationStyle(R.style.AnimBottom);

            mPopupWindow.showAtLocation(findViewById(R.id.main), Gravity.RIGHT | Gravity.BOTTOM, 0, 0);

            // mPopupWindow.dismiss();

底部滑出:

demo下载:http://files.cnblogs.com/xyc20080413/PopupWindowTest.rar

左侧滑出:

demo下载:http://files.cnblogs.com/xyc20080413/%E5%B7%A6%E4%BE%A7%E5%BC%B9%E5%87%BAPopupWindow.rar

你可能感兴趣的:(PopupWindow)