Reprint please indicate the source: http://blog.csdn.net/java201159416/article/details/51940074
general app has a demand to hide the Android default Title bar, is usually used before setConvertView call requestWindowFeature (Window. FEATURE_NO_TITLE), after can sometimes find call this line of code has no effect, Very depressed.
through observation, before the Activity is to inherit the Activity, so is valid, and I am AppCompatActivity inherited, so can’t hide.
solution:
1. Let xxxActivity inherit the Activity
2. Inherit AppCompatActivity and call it in the onCreate method
if (getSupportActionBar() != null){
getSupportActionBar().hide();
}
And then we’re done.
Read More:
- [Android] using request window feature( Window.FEATURE_ NO_ Title) method to remove the title invalid solution
- 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)
- Error record: this.requestWindowFeature ( Window.FEATURE_ NO_ Title) error or no effect
- About creo 4.0 license request failed for feature solution
- X Error of failed request: BadWindow (invalid Window parameter)
- Idea pop-up window out of memory, modify the parameters and start the no response solution
- cannot import name ‘Feature‘ from ‘setuptools‘
- Opening feature class.General function failure
- Android Studio Series: after Android studio is opened, the project window will not be displayed.
- TypeError: Failed to execute ‘fetch‘ on ‘Window‘: Request with GET/HEAD method cannot have body.
- Solution of OpenGL window flicker in MFC framework
- error: pathspec ‘feature_card‘ did not match any file(s) known to git
- Unity “Feature `out variable declaration’ cannot be used because it is not part of the C# 4.0” error
- VS2010 debugging window flash solution
- Problem solving – vs debugging window flash solution
- Solution to the flashback of visual studio output window
- Solution of command line window flashback when visual studio runs C + + program
- The solution to the black window flash of running program on Visual Studio
- Solution to the flash of visual studio console program output window