android.Unterstützung.v7.- widget.Symbol in der Symbolleiste alignment-Problem
Über das neue Android 5.0 Symbolleiste Ansatz, und nach der Google IO Beispiel, ich werde ein Navigations-icon und ein spinner in der Symbolleiste.
Das Problem ist, die navigation ist nach UNTEN ausgerichtet werden. Ich kann nicht finden, einen Grund, warum dies passiert ist...
[Beachten Sie, dass ich mich bewusst setzen Sie auf ein solides Quadrat, um die Ausrichtung Problem mehr klar]
Mein code ist wie folgt:
toolbar.xml
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:theme="@style/ActionBarThemeOverlay"
app:popupTheme="@style/ActionBarPopupThemeOverlay"
android:id="@+id/toolbar_actionbar"
android:layout_width="match_parent"
android:layout_height="?android:actionBarSize"
/>
Wichtigsten Stil
<style name="ActionBarThemeOverlay" parent="">
<item name="android:background">@color/appMainColor</item>
<item name="android:textColorPrimary">#fff</item>
<item name="colorControlNormal">#ffff</item>
<item name="colorControlHighlight">#3fff</item>
</style>
ActivityMain
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if (mActionBarToolbar != null)
mActionBarToolbar.setNavigationIcon(R.drawable.ic_drawer);
InformationsquelleAutor der Frage Alchete | 2014-10-19
Schreibe einen Kommentar Antworten abbrechen
Du musst angemeldet sein, um einen Kommentar abzugeben.
Versuchen ?attr/actionBarSize statt android:layout_height="?android:actionBarSize"
InformationsquelleAutor der Antwort Gabriele Mariotti