Gustavo Oliveira

Changing android system UI status bar height default values

Discussion created by Gustavo Oliveira on Mar 4, 2019
Latest reply on Mar 4, 2019 by Victor Linnik

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.

Attachments

Outcomes