VladMorzhanov
9/23/2017 - 3:31 PM

Android toolbar layout.

Android toolbar layout.

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/toolbarMain"
    style="@style/Widget.AppCompat.Toolbar"
    android:layout_width="match_parent"
    android:layout_height="56dp"
    android:background="@color/mevics_blue"
    android:gravity="center_vertical|center"
    android:minHeight="?attr/actionBarSize"
    android:paddingLeft="20dp">

    <FrameLayout
        android:id="@+id/toolbarIconWrapper"
        android:layout_width="wrap_content"
        android:layout_height="match_parent">

        <ImageView
            android:id="@+id/ivToolbarIcon"
            android:layout_width="50dp"
            android:layout_height="17dp"
            android:layout_gravity="center_vertical"
            android:contentDescription="Back"
            android:src="@drawable/toolbar_burger" />
    </FrameLayout>

    <TextView
        android:id="@+id/tvToolbarTitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:paddingRight="60dp"
        android:text="@string/home"
        android:textColor="@android:color/white"
        android:textSize="18sp" />

    <view
        android:id="@+id/batteryView"
        class="com.main.views.BatteryIndicatorView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center|end"
        android:layout_marginEnd="10dp"
        android:visibility="visible" />
</android.support.v7.widget.Toolbar>