Removed ActionBar in API below 11
I have several Activity
uses "@android:style/Theme.Holo.Light.NoActionBar"
as a theme. API levels above 11 work without issues, but when I set "8"
my minimumSdkVerison
to tells me it requires API level 13.
If I understand correctly, there is no or “Theme.Holo” under API level 8 , so there ActionBar
won’t be ActionBar
by default, but if I leave "@android:style/Theme.Holo.Light.NoActionBar"
then at API level < strong>11 my Activities
will have ActionBar
. Is there any easy way to get rid of all of Activities
them ActionBar
? I tried using Sherlock ActionBar, but found it too complicated for my needs because I just wanted to get rid of API 11 devices above ActionBar
.
Solution
When you use the Eclipse wizard to create a new project, it creates a theme AppTheme
for you, which inherits from AppBaseTheme
. Replace this topic based on the API level. Therefore, you can use android:Theme.Light.NoTitleBar
as your default theme and from android:Theme.Holo.Light.NoActionBar
API level 11 upwards.
If you don’t care about using Holo, just use as android:Theme.Light.NoTitleBar
your theme.