layout_pay_item.xml 1.51 KB
<?xml version="1.0" encoding="utf-8"?>
<layout>
    <data>
        <variable
            name="viewModel"
            type="com.naji.xiaotao.pay.vm.PayItemViewModel"/>
    </data>
    <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:binding="http://schemas.android.com/apk/res-auto"
        android:layout_width="@dimen/dp_150"
        android:layout_height="@dimen/dp_44"
        android:background="@{viewModel.entity.selected?@drawable/border_pay_item_selected:@drawable/border_pay_item}"
        android:orientation="horizontal"
        android:gravity="center_vertical"
        android:layout_marginRight="@dimen/dp_10"
        android:layout_marginTop="@dimen/dp_10"
        binding:onClickCommand="@{viewModel.OnItemClickCommand}"
        >
        <com.othershe.library.NiceImageView
            android:layout_width="@dimen/dp_17"
            android:layout_height="@dimen/dp_17"
            binding:url="@{viewModel.entity.image}"
            app:is_circle="true"
            app:corner_radius="@dimen/dp_17"
            android:layout_marginLeft="@dimen/dp_34"
            />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@{viewModel.entity.payment}"
            android:textColor="@color/text1"
            android:textSize="@dimen/sp_15"
            android:layout_marginLeft="@dimen/dp_10"
            />
    </LinearLayout>
</layout>