| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?xml version="1.0" encoding="utf-8"?>
- <layout 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">
- <data>
- <variable
- name="paymentWayName"
- type="String" />
- <variable
- name="paymentWayIcon"
- type="android.graphics.drawable.Drawable" />
- <variable
- name="position"
- type="Integer" />
- <variable
- name="selectedPosition"
- type="androidx.lifecycle.LiveData<Integer>" />
- </data>
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@drawable/bg_ripple_common_mask">
- <Space
- android:id="@+id/space1"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintDimensionRatio="360:10"
- app:layout_constraintTop_toTopOf="parent" />
- <ImageView
- android:id="@+id/item_payment_icon"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_marginStart="@dimen/app_common_page_horizontal_padding"
- android:src="@{paymentWayIcon}"
- app:layout_constraintDimensionRatio="1:1"
- app:layout_constraintLeft_toLeftOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/space1"
- app:layout_constraintWidth_percent="0.0666666666666667"
- tools:src="@drawable/icon_wechat_payment" />
- <Space
- android:id="@+id/space2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintDimensionRatio="360:10"
- app:layout_constraintTop_toBottomOf="@+id/item_payment_icon" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="12dp"
- android:text="@{paymentWayName}"
- android:textColor="#202020"
- android:textSize="14sp"
- app:layout_constraintBottom_toBottomOf="@id/item_payment_icon"
- app:layout_constraintLeft_toRightOf="@id/item_payment_icon"
- app:layout_constraintTop_toTopOf="@id/item_payment_icon"
- tools:text="微信支付" />
- <ImageView
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_marginEnd="20dp"
- android:src="@{position == selectedPosition ? @drawable/icon_login_check_box_checked : @drawable/icon_login_check_box_unchecked}"
- app:layout_constraintBottom_toBottomOf="@+id/item_payment_icon"
- app:layout_constraintDimensionRatio="1:1"
- app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintTop_toTopOf="@+id/item_payment_icon"
- app:layout_constraintWidth_percent="0.0555555555555556"
- tools:src="@drawable/icon_login_check_box_checked" />
- </androidx.constraintlayout.widget.ConstraintLayout>
- </layout>
|