如何在 Android 4.4.X 及更高版本上使导航栏透明?
我在文档中进行了搜索,但没有找到任何相关内容。
我已从更改日志中获取了此内容安卓奇巧 (4.4) http://developer.android.com/about/versions/android-4.4.html:
半透明系统栏
您现在可以使用新主题使系统栏部分半透明,Theme.Holo.NoActionBar.TranslucentDecor http://developer.android.com/reference/android/R.style.html#Theme_Holo_NoActionBar_TranslucentDecor and Theme.Holo.Light.NoActionBar.TranslucentDecor http://developer.android.com/reference/android/R.style.html#Theme_Holo_Light_NoActionBar_TranslucentDecor。通过启用半透明系统栏,您的布局将填充系统栏后面的区域,因此您还必须启用fitsSystemWindows http://developer.android.com/reference/android/R.attr.html#fitsSystemWindows用于布局中不应被系统栏覆盖的部分。
如果您要创建自定义主题,请将这些主题之一设置为父主题或包含windowTranslucentNavigation http://developer.android.com/reference/android/R.attr.html#windowTranslucentNavigation and windowTranslucentStatus http://developer.android.com/reference/android/R.attr.html#windowTranslucentStatus主题中的样式属性。
希望这有助于您入门。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)