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
<application android:theme="@android:style/Theme.NoTitleBar">
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
<application
android:theme="@style/Theme.AppCompat.NoActionBar">
Read More:
- Fetch Error: Failed to execute ‘fetch’ on ‘Window’: Request with GET/HEAD method cannot have body
- JZVideo Error: Attempt to invoke virtual method ‘android.view.Window android.app.Activity.getWindow()’ on a null object reference
- [Solved] Arcgis Error: The number of points is less than required for feature
- [Solved] HALCON error #5190: Invalid window parameter
- [Solved] Halcon & C# Error: HalconDotNet.HOperatorException:“HALCON error #5190: Invalid window parameter in op
- QGC Error: Fail: No CPU load information [How to Solve]
- [Vagrant] When vagrant up, it stops at “SSH auth method: private key” and times out.
- [Solved] QGC Error: Fail: No CPU load information
- There was an unexpected error (type=Method Not Allowed, status=405). Request
- It can be opened with localhost, but not with IP address. The request host name is invalid
- React ant design pro Error reported in the background after removing internationalization
- jenkins pipeline Shared Library Error: No signature of method
- How to Solve “Status bar could not find cached time string image. Rendering in-process.” in Xcode
- [Solved] QT Warning: Slots named on_foo_bar are error prone
- Vscode pylint reported an error of “no member”, but it is running normally
- How to Solve Error: You need to use a Theme.AppCompat theme (or descendant) with this activity.
- [Solved] FileUploadException: the request was rejected because no multipart boundary was found
- Current request is not a multipart request [How to Solve]
- [Solved] Wechat IOS signature error config:fail
- [Solved] MindSpore Error: task_fail_info or current_graph_ is nullptr