Changing android system UI status bar height default values

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Changing android system UI status bar height default values

5,317 Views
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.

Labels (2)
Tags (1)
0 Kudos
Reply
1 Reply

3,841 Views
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 Kudos
Reply