im using android:Theme.NoTitleBar.Fullscreen
in my styles.xml
and everything works fine with most phones. but on some phones with front camera/ear speaker under the screen (like xiaomi redmi note 7) it doesn't get fullscreen(statusbar is still there but with no status and its color is dark). when i use <item name="android:statusBarColor">@color/myColor</item>
while the parent theme is full screen it doesn't work and can't change the statusbar color, neither through java nor xml. (android:colorPrimaryDark
doesnt affect statusbar color too when fullscreen theme is in effect)
How can i keep the theme fullScreen for all phones and at the same time only change the statusbar color for these types of phones? should i compare (app window height + navigation bar height) < real screen height and then set the theme based on the result?
(my immediate solution was using fullscreen for all api below 26 and since phones with this underscreen hidden/nonhidden camera feature come with android apis above 26 and have bigger screens i used notitlebar theme without fullscreen and then changed statusbar color)