ANDROID 4.1.1系统中去掉状态栏

本文介绍了一种根据客户需求去除Android设备状态栏的方法。通过修改dimens.xml文件中与状态栏高度相关的尺寸值来实现这一目标。具体步骤包括将状态栏、导航栏及图标等的高度设为0。

             最近客户定制要求:去掉状态栏

             更改方法:修改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>

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值