Я уже настроил свой цвет фона в виде фона, но он не работает.Android - tabhost не меняет цвет фона
styles.xml
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:actionBarTabStyle">@style/ActionBarTabStyle</item>
<item name="actionBarTabStyle">@style/ActionBarTabStyle</item>
</style>
<style name="ActionBarTabStyle"
parent="@style/Widget.AppCompat.ActionBar.TabView">
<item name="android:background">@drawable/tab_bg_selector</item>
<item name="background">@drawable/tab_bg_selector</item>
</style>
tab_bg_selector.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/blueLight" android:state_pressed="true"/>
<item android:drawable="@color/blueLight" android:state_selected="true"/>
<item android:drawable="@color/blueDark"/>
</selector>
bottom_tabs.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<FrameLayout
android:id="@+id/realtabcontent"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1" />
<android.support.v4.app.FragmentTabHost
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="0" />
</android.support.v4.app.FragmentTabHost>
</LinearLayout>
Мольба совет. Спасибо.
Вы используете библиотеку AppCompat? – shkschneider
да, скомпилируйте 'com.android.support:appcompat-v7:22.1.0' –
вы можете опубликовать код для tabvew –