public class MyDialog extends Dialog {
private Activity mContext;
public MyDialog (@NonNull Activity context)
{
super(context);
this.mContext = context;
}
public MyDialog (@NonNull Activity context, int themeResId)
{
super(context, themeResId);
this.mContext = context;
//去掉Dialog自带的样式
Window windows = getWindow();
WindowManager.LayoutParams params = windows.getAttributes();
params.dimAmount = 0;
windows.setAttributes(params);
windows.setBackgroundDrawable(new ColorDrawable(0));
}
}
Android自定义Dialog,去掉Dialog自带的样式
最新推荐文章于 2023-09-25 16:26:09 发布
关键词由CSDN通过智能技术生成