今天发现在5.0以下版本dialog是可以填满屏幕的,5.0以上就不行,解决方法: 创建的时候指定一个主题: AlertDialog.Builder builder = new AlertDialog.Builder(activity, R.style.MyDialogStyle); //直接修改主题的背景色就可以了(可采用随意一种色系,为了方便我采用系统自带的透明) <stylename="MyDialogStyle" parent="Theme.AppCompat.Dialog"> <itemname="android:windowBackground">@android:color/transparent</item> </style>