第一种方法:
修改:frameworks/base/core/res/res/values/dimens.xml 把下面这些值都修改成0即可,编译验证。
<resources>
// 省略部分
<!-- Height of the status bar -->
<dimen name="status_bar_height">0dip</dimen>
<!-- Height of the bottom navigation / system bar. -->
<dimen name="navigation_bar_height">0dp</dimen>
<!-- Height of the bottom navigation bar in portrait; often the same as @dimen/navigation_bar_height -->
<dimen name="navigation_bar_height_landscape">0dp</dimen>
<!-- Width of the navigation bar when it is placed vertically on the screen -->
<dimen name="navigation_bar_width">0dp</dimen>
<!-- Height of notification icons in the status bar -->
<dimen name="status_bar_icon_size">0dip</dimen>
<!-- Size of the giant