Translucent system UI styling
To get the most impact out of your content, you can now use new window styles and themes to request translucent system UI, including both the status bar and navigation bar. To ensure the legibility of navigation bar buttons or status bar information, subtle gradients is shown behind the system bars. A typical use-case would be an app that needs to show through to a wallpaper.

这个是Android Developer上的原文 反正我也看得不是很懂 我知道的就是实现和导航栏和状态栏的透明 带一些渐变效果

1. 设置主题


添加了这两个属性之后 就是是这个效果了 可以看到 listview已经被顶到上面去了 不知道是不是bug 查了下资料 目前的解决办法好像都是给layout设置padding来解决

2.设置颜色和设置padding

private void initSystemBar() {    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {        setTranslucentStatus(true);        SystemBarTintManager tintManager = new SystemBarTintManager(this);        tintManager.setStatusBarTintEnabled(true);        tintManager.setStatusBarTintResource(R.color.actionbar_bg);        SystemBarConfig config = tintManager.getConfig();        listViewDrawer.setPadding(0, config.getPixelInsetTop(true), 0, config.getPixelInsetBottom());    }}

3.最终效果

参考资料:

http://mindofaandroiddev.wordpress.com/2013/12/28/making-the-status-bar-and-navigation-bar-transparent-with-a-listview-on-android-4-4-kitkat/

http://stackoverflow.com/questions/20781014/translucent-system-bars-and-content-margin-in-kitkat

更多相关文章

  1. Android—文字轮播
  2. Android中登录布局展示Activity
  3. Android(安卓)自定义dialog 设置宽度
  4. [Android]listview图文混排
  5. Android闹钟设置
  6. android中popupwindow的点滴
  7. android 幕滑动效果
  8. android density
  9. Android加载html实现文件上传功能

随机推荐

  1. 查看基于Android(安卓)系统单个进程内存
  2. android 开发学习笔记 (一)
  3. android 创建数字签名应用程序
  4. "Uses or overrides a deprecated API" i
  5. android 多版本打包之productFlavors 用
  6. Android(java)学习笔记126:Android(安卓)Stu
  7. Android(安卓)中的单元测试(使用AndroidT
  8. Android深入浅出系列课程---Lesson9 AAF1
  9. Android应用开发试题(收集)
  10. 安卓开发38:安卓的滚动条相关属性