I have a project in which i setted:
Code in onCreate method is this:
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.main);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title);
...
With previous settings, all works well! But, if i set minSdkVersion to 11 or above, this exception occurs:
android.util.AndroidRuntimeException: You cannot combine custom titles with other title features
I don't understand why happens this just changing minSdkVersion. I red a lot about this problem on this site. I tried setting:
Since i'm using functions available from API 11 only, i want to set minSdk to 11 before loading App on Store. How can i do ?? I need Help
Edit: With minSdkVersion = 10 and Theme.NoTitleBar in Manifest, same error occurs. Removing it, all works as before. Can anyone provide a working code (manifest and activity code) for setting a custom title when API is 11 or above ? Thx much
Fixed by my self. I don't know why, but simply adding in manifest file "theme" property for each activity's declaration, all works:
From this:
<activity
android:name=".CheckActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"
</activity>
To this:
<activity
android:name=".CheckActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"
android:theme="@android:style/Theme" >
</activity>
@kinghomer I have tried CUSTOM_TITLE its on 2.2 (API 8) actually. Let me try on API 11 and get back to you!
Before that, you need not make Theme.NoTitleBar anywhere, can be controlled in .java file directly. Give me some time, will be back!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With