2016-04-01 14 views
0

uygulamam mükemmel çalışıyor ama black.Here sürüm 21-22 benim araç çubuğu düğmesi renk değişiklikleri normal görünüyor nasıl örneğidir bu sorun var: enter image description hereAndroid 21-22 Çubuğu düğmesi döner siyah

ve burada 21-22 sorunlu bir parçasıdır: burada enter image description here

benim Çubuğu ve benim stilim:

<?xml version="1.0" encoding="utf-8"?> 
<resources> 

    <!-- Base application theme. --> 
    <style name="AppTheme" parent="AppTheme.Base"> 

    </style> 

    <style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar"> 

     <!-- Customize your theme here. --> 
     <item name="colorPrimary">@color/colorPrimary</item> 
     <item name="colorPrimaryDark">@color/colorPrimaryDark</item> 
     <item name="colorAccent">@color/white</item> 
     <item name="android:windowTranslucentStatus">true</item> 

    </style> 

    <style name="CustomToolBarTheme" parent="ThemeOverlay.AppCompat.Light"> 

     <item name="android:textColorPrimary">@color/white</item> 
     <item name="android:textColorSecondary">@color/white</item> 
     <item name="colorAccent">@color/white</item> 
     <item name="android:windowTranslucentStatus">true</item> 

    </style> 

    <style name="Toolbar.TitleText" parent="TextAppearance.Widget.AppCompat.Toolbar.Title"> 
     <item name="android:textSize">18sp</item> 
    </style> 

</resources> 

araç çubuğu:

<?xml version="1.0" encoding="utf-8"?> 
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:background="@color/colorPrimary" 
    android:paddingTop="@dimen/app_bar_top_padding" 
    app:theme="@style/CustomToolBarTheme"> 

    <TextView 
     android:id="@+id/toolbar_title" 
     android:layout_width="wrap_content" 
     android:maxLines="1" 
     android:layout_height="wrap_content" 
     android:textColor="@color/white" 
     android:textSize="19dp" /> 
</android.support.v7.widget.Toolbar> 

Rengi SpannableString ile değiştirmeye çalıştım ancak çalışmıyor.

cevap

0

Cevabı buldum, araç çubuğunda sadece tema ve popupTheme gibi kodları ekleyin ve işe yarayacak. Ve bu stil ve daha fazla gerek yok:

<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:background="@color/colorPrimary" 
    android:paddingTop="@dimen/app_bar_top_padding" 
    app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> 
0

Stilinizde <item name="colorControlNormal">@color/colorwhatever</item> denediniz mi? (ToolBar metin biçiminde olmalıdır)

+0

Yine gördüğüm –

+0

çalışmıyor ... –

+0

sen ile denemek Could ... düşüneyim @ rengi/yourtextcolor Ondan değil

İlgili konular