Android: keine änderung der Farbe der zurück-Pfeil-navigation-Symbol
Ich bin mit der neuen android-appcompat-Symbolleiste. Ich brauche, um die gleichen benutzerdefinierten Farbe auf die beiden burger-Symbol, und "zurück" - Pfeil-Symbole. Mit drawerArrowStyle erlaubt, mich zu ändern burger-Symbol, aber nicht der Pfeil. Das Problem ist nur auf Lollipop-Geräte, alles pre-lollipop ist in Ordnung.
Hier ist der code:
Toolbar:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="@color/my_primary"
local:theme="@style/My.Toolbar"
local:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
Style.xml:
<style name="Theme.Base" parent="Theme.AppCompat.Light">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<item name="windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">@color/my_primary</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">@color/black</item>
</style>
<style name="My.Theme" parent="Theme.Base">
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
</style>
<style name="My.Toolbar" parent="Theme.AppCompat.NoActionBar">
<!-- color of the title text in the Toolbar, in the Theme.AppCompat theme: -->
<item name="android:textColorPrimary">@color/my_actionbartext</item>
<!-- necessary to support older Android versions.-->
<item name="actionMenuTextColor">@color/my_actionbartext</item>
<item name="android:textColorSecondary">@color/my_actionbartext</item>
</style>
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="color">@color/my_actionbartext</item>
</style>
Ich habe versucht, mit Lösung aus hier aber es hat nicht funktioniert. Hat jemand irgendwelche Ideen?
möglich, Duplikat der so ändern Sie die Farbe des "zurück" - Pfeil in das neue material-Design?
InformationsquelleAutor Sasha | 2015-02-24
Schreibe einen Kommentar Antworten abbrechen
Du musst angemeldet sein, um einen Kommentar abzugeben.
Nur tun dies in Ihrer Aktivität/Fragment:
InformationsquelleAutor ViksaaSkool
Den Weg, um die richtige Lösung für das problem fand ich hier
Allerdings ist diese immer noch nicht 100% arbeiten, die durch unsere Benutzung von DrawerLayout. Meine Kollegin schrieb eine hervorragende post auf die Lösung hier
Toller link, ich hatte nur um das Thema zu ändern mich, um es sich richtig, aber dies bringt den Punkt, dass, wenn eine Schublade wird verwendet, es hat eine interessante Wirkung gegen den drawables.
InformationsquelleAutor Sasha
Ich bin auch nicht in der Lage zu aktualisieren, zurück-Pfeil-button nach dem Upgrade auf 23.2.0 support library
InformationsquelleAutor silentsudo
Es ist die Farbe der actionMenuTextColor. Fügen Sie folgende Zeile zu Ihrem Thema.
InformationsquelleAutor zek_w