<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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="@dimen/nav_header_height"
    android:background="@drawable/side_nav_bar"
    android:gravity="bottom"
    android:orientation="vertical"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:theme="@style/ThemeOverlay.AppCompat.Dark">

    <!-- Image user badge (shown alternatively to text one) -->
    <com.google.android.material.imageview.ShapeableImageView
        android:id="@+id/nav_header_user_badge"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:contentDescription="@string/nav_header_desc"
        android:scaleType="centerCrop"
        app:shapeAppearanceOverlay="@style/roundedImageViewRounded"
        app:srcCompat="@drawable/ic_user"
        android:visibility="gone"/>

    <!-- Text user badge (shown alternatively to image one) -->
    <TextView
        android:id="@+id/nav_header_user_text_badge"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:contentDescription="@string/nav_header_desc"
        android:background="@drawable/user_badge"
        android:textSize="42dp"
        style="@style/TextUserBadge"
        android:gravity="center"
        android:text="A"
        android:visibility="gone"/>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingTop="@dimen/nav_header_vertical_spacing">

        <TextView
            android:id="@+id/nav_header_user_name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_gravity="center_vertical"
            android:text="@string/nav_header_title"
            android:textAppearance="@style/TextSubtitle"
            android:textColor="@color/nav_header_user_name"/>

        <ImageView
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:padding="10dp"
            android:layout_gravity="center_vertical"
            app:srcCompat="@drawable/ic_logout"
            app:tint="@color/button_foreground"
            android:background="@drawable/button_background_secondary"
            android:onClick="onLogoutButtonClicked"/>

    </LinearLayout>

</LinearLayout>
