Android(安卓)AlertDialog去掉系统黑色背景
16lz
2021-01-25
其实代码就这么几行,研究的时候需要花费较多时间。注意这里new的一定是Dialog不是它的子类,然后它的背景设置为透明就可以了
Dialog dialog=new Dialog(this);AlertCustom custom=new AlertCustom();dialog.setContentView(custom.getView());dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);custom.setDialog(dialog);dialog.show();
更多相关文章
- 没有一行代码,「2020 新冠肺炎记忆」这个项目却登上了 GitHub 中
- Android答题app
- Android(安卓)百分比布局详解及实例代码
- 采用Scroller实现任意布局的上下左右弹性效果
- Ubuntu 将adb加入环境变量 及adb shell 无法启动
- 【Android(安卓)开发教程】Spinner
- Android使用Handler实现打地鼠游戏
- Android(安卓)网络显示图片 通过代理访问
- android 中对apache httpclient及httpurlconnection的选择