Android Material Design: Der Style 'toolbarStyle' im aktuellen Theme konnte nicht gefunden werden
Ich versuche, verwenden Sie die Symbolleiste auf widget in android 21 mit einem benutzerdefinierten Stil, aber ich kann nicht get rid off dieser Fehler :
Failed to find style 'toolbarStyle' in current theme
.
Hier ist mein layout-xml-Datei :
<android.support.v7.widget.Toolbar
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/patient_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:theme="@style/AppTheme.Patient" />
Hier ist der Patient Thema :
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
<!-- Customize your theme here. -->
</style>
<style name="AppTheme.Patient" parent="AppTheme">
<item name="colorPrimary">@color/patient_primary</item>
<item name="colorPrimaryDark">@color/patient_primary_dark</item>
<item name="colorAccent">@color/patient_accent</item>
<item name="toolbarStyle"></item> <!-- what values to put here -->
</style>
Ich habe auch versucht, fügen Sie toolbarStyle
im Element in meinem Thema, aber ich weiß nicht, die möglichen Werte. Bin ich etwas fehlt?
InformationsquelleAutor der Frage Dimitri | 2014-11-17
Du musst angemeldet sein, um einen Kommentar abzugeben.
Können Sie den Widget-Stil.AppCompat.Toolbar.
InformationsquelleAutor der Antwort Hardian
Ich hatte das gleiche problem, Ereignis, obwohl mein xml korrekt war.
Die Lösung war: Set AppCompat Thema das Thema Wählen Sie Checkbox, siehe Abb.
InformationsquelleAutor der Antwort David A