使用CardView作为dialog的布局,设置圆角度后发现背景还有直角,这是因为dialog默认内容背景是白色,需要把背景设为透明。
如:
AlertDialog.Builder builder = new AlertDialog.Builder(this);
AlertDialog circularDialog = builder.create();
circularDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);












网友评论