質問

I want to build a tabbed interface, so I took the Tabs3 view from the API demos sample project, however for some reason the Holo theme is not being applied to my app It should look like this But it looks like this.

This is the relevant bit in my manifest:

<application 
  android:label="@string/app_name" 
  android:icon="@drawable/ic_launcher"
  android:theme="@android:style/Theme.Holo.Light">
       <activity android:name="Tabs"
           android:label="@string/app_name" >

At this point all I have done is copy over the Tabs3 class (renamed to Tabs), List1, List8 and Controls1, along with the related layouts and strings.

Thanks for the help!

役に立ちましたか?

解決

You use the wrong tabs. Here is a full tutorial how to use ActionBar.Tab. Click me!
Remind, ActionBar.Tab is only available on API Level 11 or higher, if you want to support Android API Level 10 (Android 2.3) or lower, you have to use ActionBarSherlock.

The Holo theme is only available in Android since API Level 15. If you want to use the Holo theme on lower API levels you should take a look at HoloEverywhere.

他のヒント

Holo Theme is available for API level 11 and up. That might be the reason for it not working. If anything you can use ActionBarSherlock for lower API levels.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top