android:如何向tabhost和标签添加样式或背景

use*_*ser 2 android android-layout android-style-tabhost android-tabs

像android的联系人中的标签,我想添加样式(或者可能是背景或我不知道的东西)请问怎么样?

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"/>
    </LinearLayout>
</TabHost>
Run Code Online (Sandbox Code Playgroud)

你能告诉我在哪里可以找到好的背景或标签因为我不擅长设计:)

Tom*_*lav 5

在这里你可以获得关于标签的所有内容.适用于Android 1.6及更高版本:http://joshclemm.com/blog/?p = 136

您必须在TabSpec上调用setIndicator并将其传递给视图而不仅仅是文本.然后,您可以使用选择器等自定义该视图.