Use RequestWindowFeature (window.feature_no_title) to hide the cause of the title bar failure.
might be an activity that inherits from AppCompatActivity.
Create an activity that inherits an activity. Create an activity that inherits an activity.
The first method is often used when getting started:
requestWindowFeature(Window.FEATURE_NO_TITLE); //Remove the title bar Note that this sentence must be written in front of the setContentView() method, otherwise it will report an error
The second is defined in the AndroidManifest.xml file
Wrote, then the application will remove the title bar, if just want to get rid of a certain Activity of the title bar, you can add this property to the Activity inside the tag
the third: this is not commonly used in general application, is in the res/values below to create a new style. The XML file
<?xml version="1.0" encoding="UTF-8" ?> <resources> <style name="notitle"> <item name="android:windowNoTitle"> true </item> </style> </resources>
In this way, we have a custom style, which is equivalent to a theme, and then define it in the AndroidManifest.xml file, which also removes the title bar
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/notitle">
Create an Activity that inherits AppCompatActivity by default
getSupportActionBar().hide(); //Remove the title bar Note that this sentence must be written after the setContentView() method
2 You can do the following configuration in AndroidManifest.xml so that there is no title bar
- Remember an android app startup error Error running: Default Activity not found
- How to Solve Error: You need to use a Theme.AppCompat theme (or descendant) with this activity.
- flutter | W/zipro(12512): Error opening archive D:\…Invalid file ERROR: dump failed because…
- Eclipse Graphical Layout Error: Failed to find the style corresponding to the id 2130772027
- AS: How to Fix “XML tag has empty body” Error
- Ionic3 update open apk android 8.0 error FileUriExposedException
- How to Solve Error inflating class android.support.design.widget.FloatingActionButton
- Android Error: Consumer closed input channel or an error occurred. events=0x9
- How to Solve Android Error: gps requires ACCESS_FINE_LOCATION
- [Solved] Error in inherits(x, “theme”): argument “e2” is missing, with no default
- Rendering Problems The following classes could not be instantiated: xml layout file could not be loaded
- Android Working Directory：NULL Environment：NULL Error
- Download and save uniapp pictures to Android error reporting app
- Android 10 open file exception open failed: eacces (permission denied) android:requestLegacyExternalStorage= “true“
- Flash back problem when Android studio plays music in sdcard through intent
- [Solved] AS Warning: String literal in setText can not be translated. Use Android resources instead.
- Runtime error prompt in Android Studio: arrayadapter requires the resource ID to be a textview problem
- [Solved] Flutter – AAPT: error: resource android:attr/dialogCornerRadius not found.
- Springboot package error: failed to execute goal org.apache.maven.plugins:maven-resources-plugin: 3.2.0…
- Google Play googleapi: Error 403: Google Play Android Developer API has not been used in project