<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:background="@color/main_title_bg_color"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <ImageView
        android:layout_width="wrap_content"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:src="@mipmap/rma_left"
        android:id="@+id/id_left"
        android:layout_marginStart="16.5dp"
        android:layout_height="wrap_content"/>
<!--    文字title-->
    <TextView
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_width="wrap_content"
        android:textSize="17sp"
        android:id="@+id/id_title"
        android:text="Title"
        android:textColor="@color/white"
        android:layout_height="wrap_content"/>
<!--    可以设置一个VIew的title， 由外部传入-->
    <RelativeLayout
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_width="wrap_content"
        android:id="@+id/id_title_view"
        android:visibility="gone"
        android:layout_height="wrap_content"/>

<!--    右侧的按钮-->
    <ImageView
        android:id="@+id/id_right"
        android:layout_width="wrap_content"
        android:src="@mipmap/rma_search"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:layout_marginEnd="16.5dp"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_height="wrap_content"/>
</androidx.constraintlayout.widget.ConstraintLayout>