onCreate(Bundle bundle){ Window theWindow = getWindow(); theWindow.setGravity(Gravity.BOTTOM | Gravity.FILL_HORIZONTAL); //window是 每个view都有一个window来控制,通过Window来和底层通讯 设置当前窗口的Gravity为 底部&水平fill theWindow.requestFeature(Window.FEATURE_NO_TITLE); //不要title的 //设置dilog的 setContentView(R.layou.main); theWindow.setLayout(ViewGroup.LayoutParams.FILL_PARENT, hight);//width为fill_parent. //hight 就是你想设置的宽度。 } 这样设置就可也把dilaog设置成你想要的高度