1:style文件设置

 

@android:color/transparent

这个属性一定要加,否则在你的dialog周围会有一圈黑色较重的背景,因为你没有设置窗口bei'背景透明(windowBackground).

Dialog全屏设置:

1:(隐藏状态栏)参考上一篇:https://blog.csdn.net/u013908616/article/details/81396497

2:取消dialog自带的padding造成的边框,可添加如下代码

@Override    protected void onCreate(Bundle savedInstanceState)    {        super.onCreate(savedInstanceState);        Window window = getWindow();        window.getDecorView().setPadding(0, 0, 0, 0);        WindowManager.LayoutParams layoutParams = window.getAttributes();        layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;        layoutParams.height = WindowManager.LayoutParams.MATCH_PARENT;        window.setAttributes(layoutParams);    }

 

更多相关文章

  1. android studio不能运行
  2. android WebView html网页设置长按的时候不出现复制粘贴
  3. Android多媒体分析(六)对AudioManager的一点补充
  4. android设置定时关闭的dialog
  5. Android实现的视频背景
  6. Android(安卓)Tab类型主界面总结
  7. Android(安卓)LinearLayout 点击背景颜色改变
  8. Android开发菜鸟——RecyclerView
  9. android 铃声设置流程

随机推荐

  1. linux命令
  2. commonsware-Android平台可复用代码仓库
  3. Android之Dialog集合
  4. Android在Adapter里面调用Activity的方法
  5. android百度地图:ItemizedOverlay
  6. ffmepg x264 fdk-aac android ndk全CPU编
  7. Android(安卓)实现微信,微博,微信朋友圈,QQ
  8. android 调试 报错
  9. android 渐变的半圆进度条
  10. Android(安卓): 反射机制获取或设置系统