Changing android system UI status bar height default values

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Changing android system UI status bar height default values

5,688 次查看
gmmo
Contributor I

I am trying to change the system UI status bar height by messing around with the SystemUI values. We are currently building the NXP BSP nougat on our embedded system.  Under the SystemUI\res\values\internal.xml I found:

<dimen name="status_bar_height">@*android:dimen/status_bar_height</dimen>
<dimen name="navigation_bar_height">@*android:dimen/navigation_bar_height</dimen>
<dimen name="navigation_bar_height_car_mode">@*android:dimen/navigation_bar_height_car_mode</dimen>
<color name="screen_pinning_primary_text">@*android:color/primary_text_default_material_light</color>


then tried this:

<!-- this is an experiment -->
<dimen name="status_bar_height">50dp</dimen>
<dimen name="navigation_bar_height">@*android:dimen/navigation_bar_height</dimen>
<dimen name="navigation_bar_height_car_mode">@*android:dimen/navigation_bar_height_car_mode</dimen>
<color name="screen_pinning_primary_text">@*android:color/primary_text_default_material_light</color>

By changing the value to a random 50dp, I got the status bar to be wider. Yet, the drawing area now overlaps the status bar.

Does anyone now if I can safely change the drawing area with simple changes? I don't want to change too many things in the OS. I am hoping to find a centralized place when I can easily change.

Does anyone know a way or a good keyword to search? The status bar always go under the drawing area as shown in the attached picture.

I also post the same question on stackoverflow, if you can answer an earn few points here it is:

Changing android system UI status bar height default values - Stack Overflow 

thank you.

标签 (2)
标记 (1)
0 项奖励
回复
1 回复

4,212 次查看
b36401
NXP Employee
NXP Employee

Possibly the option takes effect only in portrait mode.
Please try to change (or add) status_bar_height_car_mode option as well (similar to navigation_bar_height_car_mode one).

0 项奖励
回复