Reputation: 3229
I got few Activities
that use "@android:style/Theme.Holo.Light.NoActionBar"
as theme. API levels above 11 work without a problem, but when I set my minimumSdkVerison
to "8"
in manifest it tells me that it requires API level 13.
If I understood correct there is no ActionBar
or "Theme.Holo" in API levels below 8, so there will be no ActionBar
by default, but however if I leave "@android:style/Theme.Holo.Light.NoActionBar"
out then in API levels above 11 my Activities
will have the ActionBar
. Is there any simple way to get rid of ActionBar
in all the Activities
? I tried using Sherlock ActionBar, but found it too complicated for my needs, as I only want to get rid of ActionBar
above API 11 devices.
Upvotes: 4
Views: 4391
Reputation: 3390
To fix that that use AppCompat support library and add this code to the activity you don't want to show Actiobar in the AndroidManifest file
android:theme="@style/Theme.AppCompat.NoActionBar"
Upvotes: 2
Reputation: 5453
When you create a new project with the Eclipse wizard, it creates the theme AppTheme
for you, which inherits from AppBaseTheme
. This theme is replaced depending on the API Level. So you can use android:Theme.Light.NoTitleBar
as your default theme and android:Theme.Holo.Light.NoActionBar
from API Level 11 upwards.
If you don't care about using Holo, just use android:Theme.Light.NoTitleBar
as your theme.
Upvotes: 6