Ich habe versucht, ein Logo in meiner Symbolleiste zu zentrieren. Wenn ich zur nächsten Aktivität navigiere, ist das "upfantance" -Symbol vorhanden, und mein Logo wird leicht nach rechts verschoben. Wie kann ich mein Logo in der Mitte der Symbolleiste beibehalten, ohne das Symbol "Affordanz" zu entfernen?Wie kann ImageView in einer Symbolleiste zentriert werden?
Das ist mein toolbar-Tag ist
<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/primaryColor"
android:paddingTop="@dimen/app_bar_top_padding"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"
app:theme="@style/CustomToolBarTheme">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/ic_android_logo"
android:layout_gravity="center"
android:paddingBottom="3dp"/>
</android.support.v7.widget.Toolbar>
fand ich dieses eine clevere Lösung sein http://stackoverflow.com/a/33082083/1544047 – nmdias