关于在5.0上沉浸式布局虚拟按键的问题

来源:互联网 发布:导航仪端口 编辑:程序博客网 时间:2024/06/07 01:22
应产品经理要求在4.4上的手机上实现了,沉浸式布局,在小米的体验上很好,这是在<span style="font-family: Arial, Helvetica, sans-serif;">value-19下的style代码</span>
 <style name="AppBaseTheme" parent="Theme.AppCompat.Light">        <!-- API 19 theme customizations can go here. -->        <item name="android:windowTranslucentStatus">true</item>        <item name="android:windowTranslucentNavigation">true</item>    </style>

但是最近新入手了nexus在5.1上就有问题了,虚拟按键区域就出现了问题,虚拟按键盖住了布局,然后就百度了,尝试了很多方法,然并卵后来注意到了

android:windowTranslucentNavigation这个属性是设置navigation bar是否透明,我尝试新建了一个value-21新建了一个style,然后将<pre name="code" class="html">android:windowTranslucentNavigation值改为false,解决了。
下面贴上value-21下的style代码
<pre name="code" class="html"><style name="AppBaseTheme" parent="Theme.AppCompat.Light">        <!-- API 21 theme customizations can go here. -->        <item name="android:windowTranslucentStatus">true</item>        <item name="android:windowTranslucentNavigation">false</item></style>



0 0
原创粉丝点击