<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/normal_toolbar_container"
    android:layout_width="match_parent"
    android:layout_height="@dimen/appbar_height">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/normal_toolbar"
        style="@style/Base_ToolbarStyle"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:contentInsetStart="0dp"
        app:contentInsetEnd="0dp"
        app:contentInsetStartWithNavigation="0dp"
        app:navigationIcon="@null">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="horizontal">

            <FrameLayout
                android:id="@+id/backContainer"
                android:layout_width="48dp"
                android:layout_height="48dp">

                <ImageView
                    android:id="@+id/backBtn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:clickable="true"
                    android:focusable="true"
                    app:srcCompat="@drawable/ic_bar_back" />
            </FrameLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/titleContainer"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:padding="8dp">

                <TextView
                    android:id="@+id/normal_title"
                    style="@style/toolbar_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    app:layout_constrainedWidth="true"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toStartOf="@+id/adLabelTv"
                    app:layout_constraintHorizontal_chainStyle="packed"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:id="@+id/adLabelTv"
                    android:layout_width="21dp"
                    android:layout_height="14dp"
                    android:layout_marginStart="4dp"
                    android:layout_marginLeft="4dp"
                    android:background="@drawable/bg_ad_label"
                    android:gravity="center"
                    android:text="AD"
                    android:textColor="@color/white"
                    android:textSize="@dimen/tag_text_size"
                    android:visibility="gone"
                    app:layout_constraintBottom_toBottomOf="@+id/normal_title"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toEndOf="@+id/normal_title"
                    app:layout_constraintTop_toTopOf="@+id/normal_title" />

            </androidx.constraintlayout.widget.ConstraintLayout>

            <LinearLayout
                android:id="@+id/iconTitleContainer"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:orientation="horizontal"
                android:visibility="gone">

                <RelativeLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content">

                    <com.facebook.drawee.view.SimpleDraweeView
                        android:id="@+id/userAvatar"
                        style="@style/frescoCircleStyle"
                        android:layout_width="28dp"
                        android:layout_height="28dp"
                        android:visibility="gone"
                        app:roundingBorderColor="@color/black_alpha_10"
                        app:roundingBorderWidth="0.5dp"
                        tools:visibility="visible" />
                </RelativeLayout>

                <TextView
                    android:id="@+id/iconTitle"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="8dp"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:textColor="@color/text_primary"
                    android:textSize="16sp"
                    android:textStyle="bold" />

            </LinearLayout>

            <androidx.appcompat.widget.ActionMenuView
                android:id="@+id/actionMenuView"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_gravity="end"
                android:minWidth="44dp" />

        </LinearLayout>

    </androidx.appcompat.widget.Toolbar>
</RelativeLayout>
