AlertDialog 透明全屏
来源:互联网 发布:网络胜利组漫画在线 编辑:程序博客网 时间:2024/05/17 23:13
在 drawable 下面建一个 xml 文件
<style name="dialog" parent="@android:style/Theme.Dialog">
<item name="android:windowFrame">@null</item>
<!--边框-->
<item name="android:windowIsFloating">true</item>
<!--是否浮现在activity之上-->
<item name="android:windowIsTranslucent">true</item>
<!--无标题-->
<item name="android:windowBackground">@color/transparent</item>
<!--背景透明-->
<item name="android:backgroundDimEnabled">false</item>
<!--模糊-->
<item name="android:background">#00ffffff</item>
<!-- 设置自定义布局的背景透明 -->
</style>
代码
dialog = new AlertDialog.Builder(context, R.style.dialog).create();
View view = LayoutInflater.from(context).inflate(R.layout.dialog, null);dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
dialog.setCanceledOnTouchOutside(false);
dialog.show();
dialog.getWindow().setContentView(view);
dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
0 0
- AlertDialog 透明全屏
- alertdialog全屏
- AlertDialog 宽度全屏
- AlertDialog 背景透明
- AlertDialog背景透明
- 全屏透明背景对话框
- 应用全屏状态栏透明
- 状态栏全屏透明
- AlertDialog 背景颜色透明设置
- 全屏展示透明背景ViewController
- android activity非全屏、透明
- NavigationBar 全透明。全屏背景图片
- 【Android】【Theme】Activity 全屏,透明
- Android AlertDialog全屏显示去除白色边框
- AlertDialog的使用及全屏显示
- 全屏透明遮罩(lightBox)简单实例
- Android SurfaceView 透明、全屏等问题
- 设置activity为透明并且全屏显示
- 虚函数运行机制-虚函数表
- Android 启动页面引导页面登陆注册主页通用框架
- Android Studio 配置
- fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
- C++资源汇总
- AlertDialog 透明全屏
- Spring AOP 管理事务
- 人脸检测
- 调用系统相机拍照、调用相册、调用系统录像并获取缩略图
- 设计模式-建造者模式(Builder)
- 最新Android & iOS设计尺寸规范
- iOS,面试必看,最全梳理
- 请问java中,抽象类里的抽象方法都要在它的子类中全部实现吗?能不能有些抽象方法不实现?
- ScrapyJS Splash 400 bad request原因及解决方法