Günler için özel bir Sekme Stili için Holo Teması'nı geçersiz kılmak için uğraşıyorum ancak değişikliklerin hiçbir etkisi yok.Özel 'actionBarTabStyle' özel olarak neden varsayılan stili/temayı geçersiz kılmaz?
İşte bu
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Non focused states -->
<item android:drawable="@drawable/tab_unselected_holo" android:state_focused="false" android:state_pressed="false" android:state_selected="false"/>
<item android:drawable="@drawable/tab_selected_holo" android:state_focused="false" android:state_pressed="false" android:state_selected="true"/>
<!-- Focused states -->
<item android:drawable="@drawable/tab_unselected_focused_holo" android:state_focused="true" android:state_pressed="false" android:state_selected="false"/>
<item android:drawable="@drawable/tab_selected_focused_holo" android:state_focused="true" android:state_pressed="false" android:state_selected="true"/>
<!-- Pressed -->
<!-- Non focused states -->
<item android:drawable="@drawable/tab_unselected_pressed_holo" android:state_focused="false" android:state_pressed="true" android:state_selected="false"/>
<item android:drawable="@drawable/tab_selected_pressed_holo" android:state_focused="false" android:state_pressed="true" android:state_selected="true"/>
<!-- Focused states -->
<item android:drawable="@drawable/tab_unselected_pressed_holo" android:state_focused="true" android:state_pressed="true" android:state_selected="false"/>
<item android:drawable="@drawable/tab_selected_pressed_holo" android:state_focused="true" android:state_pressed="true" android:state_selected="true"/>
</selector>
benim aktivitesinde TabHost kullanarak sekmeleri ekledik benim tabselector.xml benim styles.xml
<!-- the theme applied to the application or activity -->
<style name="CustomActionBarTheme" parent="@android:style/Theme.Holo">
<item name="android:tabWidgetStyle">@style/MyActionBarTabs</item>
</style>
<!-- ActionBar tabs styles -->
<style name="MyActionBarTabs" parent="@android:style/Widget.Holo.ActionBar.TabView">
<!-- tab indicator -->
<item name="android:background">@drawable/tabselector</item>
</style>>
var ve planın
<android.support.v4.app.FragmentTabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:orientation="horizontal" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="0" />
<FrameLayout
android:id="@+id/realtabcontent"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
</android.support.v4.app.FragmentTabHost>
benziyor
'daki örnekleri takip ettim
Sekmelerim hala aynı görünüyor. Sekme göstergelerinin, benim pembe özel rengim olması gerekiyordu. Ancak, hiçbir değişiklik yok, hala mavi.
Unutulmaması gereken nokta:
- Benim bildirim dosyası benim uygulama etiketleri güncellenen tema başvuran Benim styles.xml her bir değer klasöründe güncellenir
- (değerler, değerler-v11, değerler-V14) Bütün bu yaptığımız
- benim ic_launcher görüntü ve başlık eksik veya yanlış yapıyorum
ile benim uygulama üstünde bir eylem çubuğu eklemek oldu? Herhangi bir yardım için teşekkür ederiz. Hepinize teşekkür ederim!
Teşekkür sonuç. Bunu yaptım. Sekmelerin altındaki saç çizgisiyle kesinlikle bir şey değişti ... Bununla birlikte, mavi gösterge rengi hala orada. Sanırım mavinin altında pembe saklamayı görebiliyorum ... ama hala üst üste geliyor. –
Kodumu style.xml içinde güncellemenizi önerilerinde görüntülemek üzere güncellendi –
@MarkBarrasso Tam bir örnekle bir düzenleme yaptım. – adneal