Changing android system UI status bar height default values

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Changing android system UI status bar height default values

5,683件の閲覧回数
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,207件の閲覧回数
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 件の賞賛
返信