Reputation: 11608
I'm creating an application for android 4.0 and above. I use the Holo.Light theme with dark ActionBar
(Tabs
as navigation mode).
The problem: there are too many icons (tabs) I'd need to place into the ActionBar, so I'm thinking about creating a custom TitleBar
and placing some Buttons
there to keep the functionality whilst not overspamming the ActionBar
.
I tried the following:
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.main);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle);
This causes the app to crash with following message:
08:00:24.063: E/AndroidRuntime(11283): java.lang.RuntimeException: Unable to start activity ComponentInfo{net.maver1ck.test/net.maver1ck.test.Main}: android.util.AndroidRuntimeException: You cannot combine custom titles with other title features
What are "other title features"? Is that possible to use the ActionBar and a custom title?
Upvotes: 0
Views: 449
Reputation: 671
This is not so good idea to combine such bars. Insted of it use custom layout only.
Upvotes: 1