1、在styles.xml中添加一个style:
<style name="Dialog_Fullscreen"> <item name="android:windowFullscreen">true</item> <item name="android:windowNoTitle">true</item> </style>
2、在代码中设置dialog的theme:
Dialog dialog=new Dialog(getApplicationContext(),R.style.Dialog_FullScreen); dialog.setContentView(R.layout.call_phone_layout);
//这句话与本章无关,用于在没有window的context上 dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); dialog.show();
转载于:https://www.cnblogs.com/libertycode/p/5680771.html