Skip to content

Instantly share code, notes, and snippets.

@varundwarkani
Created June 13, 2021 08:30
Show Gist options
  • Save varundwarkani/76ea5fb4ba8b26214ea6168d9720070d to your computer and use it in GitHub Desktop.
Save varundwarkani/76ea5fb4ba8b26214ea6168d9720070d to your computer and use it in GitHub Desktop.
<?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">
<data>
<variable
name="viewModel"
type="com.dwarsoft.criccrak.appModules.wallet.viewModel.UPIViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center"
android:text="UPI Details"
android:textColor="@color/black"
android:textSize="15sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/UPIID"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="15dp"
android:hint="UPI ID"
android:maxLength="30"
android:imeOptions="actionDone"
android:inputType="textPersonName"
android:maxLines="1"
android:text="@={viewModel.upiID}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/title" />
<com.google.android.material.button.MaterialButton
android:id="@+id/materialButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:onClick="@{ () -> viewModel.onSubmit()}"
android:text="Okay"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/materialButton3"
app:layout_constraintTop_toBottomOf="@+id/UPIID" />
<com.google.android.material.button.MaterialButton
android:id="@+id/materialButton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:onClick="@{ () -> viewModel.onCancel()}"
android:text="Cancel"
app:layout_constraintEnd_toStartOf="@+id/materialButton2"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/UPIID" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment