style.xml
java代码
Dialog dialog = new Dialog(context, R.style.share_dialog);
View v = LayoutInflater.from(context).inflate(R.layout.subject_share_dialog, null);
dialog.setContentView(v);
dialog.getWindow().setGravity(Gravity.BOTTOM);
开发中遇到的问题是对话框后面的遮罩层一直为黑色,原来是设置了
android:backgroundDimAmount 为0.95导致的缘故