Problems with Android hiding the top status bar

Let's take a look at the general method of hiding the status bar:

Method 1:

Pit 1: the code set to hide the top status bar above must be placed in setcontentview (r.layout. Video_view); before

Method 2:

Put this line of code: Android: theme = "@ Android: style / theme. Notitlebar. Fullscreen" in a separate activity, which is only valid for the current activity. If you want to make the whole app work, put it in the application

Pit 2: Android: theme = "@ Android: style / theme. Notitlebar. Fullscreen" if this line of code is configured in the application, the activity of the whole app can only inherit from the activity, not appcompatactivity, because Theme under appcompatactivity can only be actionbar like;

Keng 3: Android: theme = "@ Android: style / theme. Notitlebar. Fullscreen" if this line of code is only set under a certain activity, just ensure that the current activity does not inherit the activity rather than the appcompatactivity, and other activities are free;

The above is what Xiaobian introduced to you about the problems encountered by Android hiding the top status bar. I hope it will help you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>