I have a project in which I installed:
- minSdkversion set to 10
- MainActivity is TabActivity
The code in the onCreate method is as follows:
super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.main); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title); ...
With the previous settings, everything works well! But if I set minSdkVersion to 11 or higher, this exception will occur:
android.util.AndroidRuntimeException: You cannot combine custom titles with other title features
I do not understand why this just changes minSdkVersion. I talk a lot about this problem on this site. I tried setting:
- Theme.NoTitleBar in the main layout and in the Manifest file too
- I put these 3 lines in all possible positions
- If I comment on the first line, a NullPointerException error occurs when I call something on my TextView link of my CustomTitle layout.
- I tried setting in the declaration of theme.xml file, "windowNoTitle" = true
Since I use functions that are available only from API 11, I want to set minSdk to 11 before loading the application into the Store. How can i do ?? I need help
Change When using minSdkVersion = 10 and Theme.NoTitleBar in the manifest, the same error occurs. Removing this, everything works as before. Can someone provide a working code (manifest and activity code) to set a custom header when the API is 11 or higher? thanks a lot
kinghomer
source share