Android removes the app title bar and ActionBar

Problem Description:

Sometimes you don't want a title to appear at the top of the app, that is, app_name, you can refer to the following three ways to remove it.

First of all, the title bar of the app is our windowTitle in Qt or java, which is the name that will appear in the bangs at the top of the app. Generally, you see that most Apps do not have titles, because they are all removed. Many apps are made in the form of webview plus web pages, and the web pages can be compiled into the app together when they are placed in the assets directory. This is off topic.

Then we have to remove the title bar or ActionBar. ActionBar is a layer of Bar under the title bar, similar to the ToolBar of the window in Qt or java.

To remove this Bar, the main problem lies in the Style style. Of course, you can also use code to remove it.

First of all, we need to know what style our app is using, or called Theme, and check it in AndroidManifest.xml.

 Then, you can change it accordingly. Note that the Theme here can be changed, as long as it is available in Android, or you can completely customize it yourself. Therefore, when many companies make apps, they actually prefer to use web pages to embed webviews. After all, directly use web pages The style is more beautiful. Of course, there are many frames in the webpage, which is also an advantage.

Solution:

The first type :

Change the Theme currently used by the app in styles.xml in the styles directory under res. Note that sometimes your project may be in styles ࿰

Guess you like

Origin blog.csdn.net/poolooloo/article/details/128939577