Summary of the problem that the title bar cannot be cancelled in Android (two methods)

We all know that there are two ways to cancel the title bar: one is to cancel it in Java code, and the other is to set theme in styles.xml file; As shown below:

First:

Second:

However, after running Android 5.0, it is found that the desired effect can not be achieved. What can be done at this time? Just change one line of code.

We can achieve this by changing theme inheritance in the styles.xml file, as shown in the following figure:

The above is a summary of the problem that the title bar cannot be cancelled in Android introduced by Xiaobian. 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
分享
二维码
< <上一篇
下一篇>>