最近客户定制要求:去掉状态栏
更改方法:修改frameworks\base\core\res\res\values\dimens.xml,将其中的所有涉及到HEIGHT得项目全部设置为:0dip
下面附上更改的PATCH:
diff --git a/frameworks/base/core/res/res/values/dimens.xml b/frameworks/base/core/res/res/values/dimens.xml
old mode 100644
new mode 100755
index f30943a..6a1afa7
--- a/frameworks/base/core/res/res/values/dimens.xml
+++ b/frameworks/base/core/res/res/values/dimens.xml
@@ -31,22 +31,22 @@
<integer name="max_action_buttons">2</integer>
<dimen name="toast_y_offset">64dip</dimen>
<!-- Height of the status bar -->
- <dimen name="status_bar_height">25dip</dimen>
+ <dimen name="status_bar_height">0dip</dimen>
<!-- Height of the bottom navigation / system bar. -->
- <dimen name="navigation_bar_height">48dp</dimen>
+ <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">48dp</dimen>
+ <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">42dp</dimen>
<!-- Height of notification icons in the status bar -->
- <dimen name="status_bar_icon_size">24dip</dimen>
+ <dimen name="status_bar_icon_size">0dip</dimen>
<!-- Size of the giant number (unread count) in the notifications -->
<dimen name="status_bar_content_number_size">48sp</dimen>
<!-- Height of the system bar (combined status & navigation); used by
SystemUI internally, not respected by the window manager. -->
<dimen name="system_bar_height">@dimen/navigation_bar_height</dimen>
<!-- Height of notification icons in the system bar -->
- <dimen name="system_bar_icon_size">32dip</dimen>
+ <dimen name="system_bar_icon_size">0dip</dimen>
<!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
<dimen name="status_bar_edge_ignore">5dp</dimen>
@@ -55,7 +55,7 @@
<!-- Width of the fastscroll thumb -->
<dimen name="fastscroll_thumb_width">64dp</dimen>
<!-- Height of the fastscroll thumb -->
- <dimen name="fastscroll_thumb_height">52dp</dimen>
+ <dimen name="fastscroll_thumb_height">0dp</dimen>
<!-- Min width for a tablet device -->
<dimen name="min_xlarge_screen_width">800dp</dimen>
本文介绍了一种根据客户需求去除Android设备状态栏的方法。通过修改dimens.xml文件中与状态栏高度相关的尺寸值来实现这一目标。具体步骤包括将状态栏、导航栏及图标等的高度设为0。
1429

被折叠的 条评论
为什么被折叠?



