I've been trying to center a logo (an ImageView) in the ToolBar. I finally did it but the main reason it took so long, I couldn't find layout_gravity property in auto-complete or in Android Studio's Design pane> Properties table. Only gravity related property is foregroundGravity.
Now, I think ImageView is an ImageView. It must have layout_gravity where ever it is but not being able to find the property made me think it is not available when you use android.support.v7.widget.Toolbar.. Has anyone had a similar experience or do you know why it happens?
Below is my code and the min API level is 10.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/ColorPrimary"
    android:theme="@style/ThemeOverlay.AppCompat.Dark"
    android:layout_gravity="top"
    >
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@mipmap/comp_logo"
            android:layout_gravity="center_vertical|center_horizontal"
            />
</android.support.v7.widget.Toolbar>
 
     
    