I have this code for my custom toolbar:
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/login_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/new_logo"
android:adjustViewBounds="true"
android:padding="5dp"
android:id="@+id/app_logo" />
</android.support.v7.widget.Toolbar>
What I need to do is this one:
How will I implement that?
try this:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/login_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="90dp"
android:src="@mipmap/ic_launcher"
android:layout_centerHorizontal="true"
android:id="@+id/app_logo" />
</RelativeLayout>