1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?xml version="1.0" encoding="utf-8"?>
- <layout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools">
-
- <data>
- <import type="android.view.View"/>
- <variable
- name="viewmodel"
- type="com.chameth.yaotp.viewmodel.OtpItemViewModel"/>
- </data>
-
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="16dp">
-
- <TextView
- android:id="@+id/otpLabel"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentStart="true"
- android:layout_toStartOf="@id/otpTimeLeft"
- android:textSize="16sp"
- android:text="@{viewmodel.label}"
- tools:text="Label" />
-
- <TextView
- android:id="@+id/otpValue"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/otpLabel"
- android:layout_alignParentStart="true"
- android:layout_toStartOf="@id/otpTimeLeft"
- android:textSize="32sp"
- android:text="@{viewmodel.otp.otp}"
- tools:text="012345" />
-
- <TextView
- android:id="@+id/otpTimeLeft"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentEnd="true"
- android:textSize="24sp"
- android:layout_margin="16dp"
- android:visibility="@{viewmodel.showTime ? View.VISIBLE : View.GONE}"
- android:text="@{viewmodel.timeLeft}"
- tools:text="20s"/>
-
- </RelativeLayout>
- </layout>
|