Android4.0 彻底隐藏状态栏

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

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

    <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
         autodetected from the Configuration. -->
    <bool name="config_showNavigationBar">true</bool>

将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

你可能感兴趣的:(Android4.0 彻底隐藏状态栏)