The requestWindowFeature method must be placed before the content view is initialized. I checked that this is the first one, but later I found that I changed the class inheritance. Before I inherited the Activity, I changed the class inheritance to AppCompatActivity.
At first I wondered if it was possible that AppCompatActivity had done something in its own super.onCreate. So the
At first I wondered if it was possible that AppCompatActivity had done something in its own super.onCreate. So the
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
On the
super.onCreate(savedInstanceState);
Finally, in the manifests file, we add an attribute to the Activity:
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
solves the problem.
The title bar is not an ordinary title bar. It is called ActionBar. Another solution is to call it after setContentView
getSupportActionBar().hide();
solves the problem.
Read More:
- Request window feature for Android Development( Window.FEATURE_ NO_ Title) does not take effect
- How to remove the title bar (using the request window feature)( Window.FEATURE_ NO_ Title); why it fails)
- [Android] using request window feature( Window.FEATURE_ NO_ Title) method to remove the title invalid solution
- Android set request window feature( Window.FEATURE_ NO_ Title) invalid solution
- Solve the problem that better scroll lateral scrolling has no effect
- Property or field ‘Title‘ cannot be found on object of type
- Idea pop-up window out of memory, modify the parameters and start the no response solution
- [tools] vscode debug report G + +. Exe no such file or directory fatal error no input files
- Record pyinnstaller package file execution error modulenotfoundererror: no module named ‘cmath’ solution
- No code, a solution to the error in the path of reading CSV file by Python: filenotfounderror: [errno 2] no such file or directory: ‘XX. CSV‘
- Idea has installed markdown, open it or will not show preview effect
- Solution to error opening trace file: no such file or directory (2) in Android
- Solve syntax error: unexpected end of file or /bin/bash^m: bad interpeneter: no match file or directory
- Record a problem of no module named ‘tensorflow. Examples’ and’ tensorflow. Examples. Tutorials’ in tensorflow 2.0
- Xcode – pbxcp Error Repair – no such file or directory
- No such file or directory
- Error: enoent: no such file or directory
- Docker load loading mirror message JSON no such file or directory error
- Failed to get D-Bus connection: No such file or directory
- sh: 0: getcwd() failed: No such file or directory