Android AlertDialog去除白色边框

使用styles.xml风格:

 

 

 使用AlertDialog的上层接口类:

 

Dialog reNameDialog = new Dialog(getContext(), R.style.FullScreenDialog);
LayoutInflater mLayoutInflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View reNameView = mLayoutInflater.inflate(R.layout.audiorecord_rename, null);
LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
reNameDialog.addContentView(reNameView, params);
reNameDialog.show();
 

 

你可能感兴趣的:(Android)