<?xml version="1.0" encoding="utf-8"?>
<com.vivo.unionpay.embedded.pay.core.customview.CommonTitleView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/title_bar"
    android:layout_width="match_parent"
    android:layout_height="@dimen/dp64"
    android:background="@android:color/white">
    <!-- 左侧布局，返回按钮 -->
    <RelativeLayout
        android:id="@+id/left_layout"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_alignParentStart="true"
        android:gravity="center_vertical"
        android:visibility="gone">

        <ImageView
            android:id="@+id/left_back_img"
            android:layout_width="@dimen/dp24"
            android:layout_height="@dimen/dp24"
            android:layout_alignParentStart="true"
            android:layout_marginStart="@dimen/dp20"
            android:layout_marginEnd="@dimen/dp8"
            android:scaleType="center"
            android:background="@drawable/vivo_pay_checkout_back"
            android:visibility="gone" />

        <ImageView
            android:id="@+id/left_close_img"
            android:layout_width="@dimen/dp24"
            android:layout_height="@dimen/dp24"
            android:layout_alignParentStart="true"
            android:layout_marginStart="@dimen/dp20"
            android:layout_marginEnd="@dimen/dp24"
            android:scaleType="center"
            android:background="@drawable/vivo_pay_checkout_close"
            android:visibility="gone" />

    </RelativeLayout>

    <!-- 中间布局，标题 -->

    <RelativeLayout
        android:id="@+id/middle_layout"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_alignParentStart="true"
        android:layout_toStartOf="@+id/right_layout"
        android:gravity="center_vertical"
        android:visibility="gone">

        <com.vivo.unionpay.embedded.pay.core.customview.RobotoMediumTextView
            android:id="@+id/tv_middle"
            android:layout_width="@dimen/dp156"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:ellipsize="end"
            android:layout_marginStart="@dimen/dp52"
            android:singleLine="true"
            android:textColor="@color/vivo_pay_carrier_select_title_color"
            android:textSize="@dimen/sp18"
            android:visibility="gone" />

        <com.vivo.unionpay.embedded.pay.core.customview.RobotoMediumTextView
            android:id="@+id/tv_left_middle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/dp52"
            android:ellipsize="end"
            android:singleLine="true"
            android:textColor="@color/vivo_pay_carrier_select_title_color"
            android:textSize="@dimen/sp18"
            android:visibility="gone" />

    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/right_layout"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_alignParentEnd="true"
        android:gravity="center_vertical"
        android:paddingEnd="@dimen/dp20"
        android:paddingStart="@dimen/dp0"
        android:visibility="gone"
        tools:visibility="visible">

        <LinearLayout
            android:id="@+id/right_button"
            android:layout_width="wrap_content"
            android:layout_height="@dimen/dp30"
            android:paddingStart="@dimen/dp16"
            android:paddingEnd="@dimen/dp16"
            android:gravity="center"
            android:background="@drawable/common_title_right_button_bg">

            <com.vivo.unionpay.embedded.pay.core.customview.RobotoMediumTextView
                android:id="@+id/tv_right"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:singleLine="true"
                android:textColor="@color/vivo_pay_title_right_text_color"
                android:textSize="@dimen/sp14"
                tools:text="country switch"/>

            <ImageView
                android:id="@+id/img_list_expand"
                android:layout_width="@dimen/dp8"
                android:layout_height="@dimen/dp8"
                android:scaleType="center"
                android:layout_marginStart="@dimen/dp6"
                android:background="@drawable/vivo_pay_list_expand_icon" />
        </LinearLayout>

    </RelativeLayout>

    <View
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp1"
        android:layout_alignParentBottom="true"
        android:background="@color/vivo_pay_title_line_color" />

</com.vivo.unionpay.embedded.pay.core.customview.CommonTitleView>