当前位置: 代码迷 >> 综合 >> Android4.0 彻底隐藏状态栏
  详细解决方案

Android4.0 彻底隐藏状态栏

热度:30   发布时间:2024-01-15 02:30:34.0

去掉导航条的话可以这样修改:

./frameworks/base/core/res/res/values/config.xml

[html] view plain copy
  1. <span style="font-size:14px;">    <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be  
  2.          autodetected from the Configuration. -->  
  3.     <bool name="config_showNavigationBar">true</bool></span>  

将true改成false就大功告成。

去掉状态栏只需要修改./frameworks/base/core/res/res/values/dimens.xml

status_bar_height设置为0dip即可。



//

hide statusbar

grep "status_bar_height" * -nR

grep -nsr "status_bar_height" ./ /*这样不至于有那么多不存在的文件出现*/

将下面文件中关于status_bar_height定义的改为0dip.
android4.0/frameworks/base/core/res/res/values-large/dimens.xml
android4.0/frameworks/base/core/res/res/values-sw480dp/dimens.xml
android4.0/frameworks/base/core/res/res/values-sw600dp/dimens.xml

android4.0/frameworks/base/core/res/res/values/dimens.xml

    PS:我在amlogic平台还需要修改这个文件里面的system_bar_height的值为0。


android4.0/packages/apps/Launcher2/res/values-sw480dp/dimens.xml
android4.0/packages/apps/Launcher2/res/values-sw600dp/dimens.xml
android4.0/packages/apps/Launcher2/res/values/dimens.xml

测试通过 sdvch
  相关解决方案