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
- Error record: this.requestWindowFeature ( Window.FEATURE_ NO_ Title) error or no effect
- Request window feature for Android Development( Window.FEATURE_ NO_ Title) does not take effect
- Solutions to Django is not importable in this environment
- An error is reported for the new Android project. Rejecting re init on previously failed
- Get the startup activity of Android apk
- Derivation process of gradient descent method based on house price
- React bootstrap loading and how to use modules
- An example of drawing rotating cube with OpenGL
- window.open () several ways to open windows
- Runtime error: terminate called after throwing an instance of ‘STD:: Logic_ error’
- Running bat batch file in background
- The sum of the two numbers of leetcode
- HTML using title attribute to display text with mouse hover
- Execution failed for task ‘:app:processDebugManifest’
- MySQL partitions the existing tables of the data table
- OpenGL learning notes and other learning thinking
- Android has applied for permission and still prompts open failed: eacces (permission denied)
- Session app error launching activity solution
- Unity “Feature `out variable declaration’ cannot be used because it is not part of the C# 4.0” error