先看效果
主要代码
Window window = dialog.getWindow();
window.setBackgroundDrawable(null); // 注意,没有这一行对话框是没法填充屏幕的
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
lp.copyFrom(window.getAttributes());
lp.windowAnimations = R.style.SlideDialogAnimation;
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
lp.gravity = Gravity.BOTTOM; // 设置位置为屏幕底部
window.setAttributes(lp);
参考
http://stackoverflow.com/questions/18315343/android-make-a-dialog-appear-in-fullscreen