手机只有虚拟键(例如:华为),并且还不能关闭,
导致的问题就是底部导航栏无法点击,
使用沉浸式就可以解决这种问题……
看代码:
不同的API使用不同的style即可;
styles
styles-v19
styles-v21
设置app theme:
隐藏状态栏、标题栏看这里……
- <!-- Application theme. -->
- <style name="AppTheme" parent="AppBaseTheme">
- <!-- All customizations that are NOT specific to a particular API-level can go here. -->
- <!-- 隐藏状态栏 -->
- <item name="android:windowFullscreen">true</item>
- <!-- 隐藏标题栏 -->
- <item name="android:windowNoTitle">true</item>
- </style>