Meine app funktioniert perfekt, aber ich habe dieses Problem, dass meine Symbolleiste auf die Schaltfläche Farbänderungen in Version 21-22 zu black.Here das Beispiel ist, wie es aussieht normal: Android 21-22 Toolbar-Taste wird schwarz
und hier ist der problematischste Teil auf 21-22:
hier ist meine Toolbar und mein Stil:
<?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>
die Symbolleiste:
<?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>
Ich habe versucht, die Farbe mit SpannableString ändern, aber es funktioniert nicht.
Immer noch nicht –
Arbeits ich verstehe ... Lassen Sie mich nachdenken ... –
Könnten Sie versuchen, mit- @ color/yourtextcolor
–