<layout xmlns:android="http://schemas.android.com/apk/res/android" >

    <data >

        <variable
            name="tab"
            type="com.ysnows.base.widget.tablayout.Tab" />

    </data >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:orientation="vertical" >

        <ImageView
            android:id="@+id/img_icon"
            android:layout_width="24dp"
            android:layout_height="23.84dp"
            android:src="@{tab.selected?tab.selectedDrawable:tab.normalDrawable}" />

        <TextView
            android:id="@+id/tv_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="2.33dp"
            android:gravity="center_horizontal"
            android:text="@{tab.text}"
            android:textColor="@{tab.selected?tab.selectColor:tab.normalColor}"
            android:textSize="@dimen/sp_12" />

    </LinearLayout >
</layout >

        