228 lines
10 KiB
XML
228 lines
10 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<androidx.appcompat.widget.Toolbar
|
|
android:id="@+id/toolbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="?attr/actionBarSize"
|
|
android:background="?attr/colorPrimary"
|
|
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
|
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
|
app:title="QRIS Payment" />
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<ProgressBar
|
|
android:id="@+id/progressBar"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
android:visibility="gone" />
|
|
|
|
<TextView
|
|
android:id="@+id/statusTextView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
android:gravity="center"
|
|
android:text="Ready to make a payment"
|
|
android:textSize="18sp" />
|
|
|
|
<!-- Initial Payment Form -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="8dp"
|
|
app:cardBackgroundColor="@color/light_blue"
|
|
app:cardCornerRadius="8dp"
|
|
app:cardElevation="4dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Amount"
|
|
android:textColor="@color/primary_blue"
|
|
android:textSize="16sp" />
|
|
|
|
<EditText
|
|
android:id="@+id/editTextAmount"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:hint="Enter amount"
|
|
android:inputType="number"
|
|
android:maxLength="12"
|
|
android:importantForAutofill="no"
|
|
android:singleLine="true"
|
|
android:textColor="@color/primary_blue"
|
|
android:textSize="24sp"
|
|
android:textStyle="bold"
|
|
android:gravity="end" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:text="Reference ID"
|
|
android:textColor="@color/primary_blue"
|
|
android:textSize="16sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/referenceIdTextView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:text="ref-abcd1234"
|
|
android:textColor="@color/primary_blue"
|
|
android:textSize="16sp" />
|
|
</LinearLayout>
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<Button
|
|
android:id="@+id/initiatePaymentButton"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="8dp"
|
|
android:backgroundTint="@color/primary_blue"
|
|
android:text="Start Payment" />
|
|
</LinearLayout>
|
|
|
|
<!-- QR Code and Payment Details -->
|
|
<LinearLayout
|
|
android:id="@+id/paymentDetailsLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:visibility="gone">
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="8dp"
|
|
app:cardCornerRadius="8dp"
|
|
app:cardElevation="4dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_horizontal"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<ImageView
|
|
android:id="@+id/qrCodeImageView"
|
|
android:layout_width="250dp"
|
|
android:layout_height="250dp"
|
|
android:contentDescription="QRIS Code"
|
|
android:scaleType="fitCenter" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:gravity="center"
|
|
android:text="Scan with your banking app or e-wallet to pay"
|
|
android:textSize="14sp" />
|
|
</LinearLayout>
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<Button
|
|
android:id="@+id/simulatePaymentButton"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="8dp"
|
|
android:backgroundTint="@color/accent_green"
|
|
android:text="Confirm Payment" />
|
|
</LinearLayout>
|
|
|
|
<!-- Payment Success -->
|
|
<LinearLayout
|
|
android:id="@+id/paymentSuccessLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:visibility="gone">
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="8dp"
|
|
app:cardBackgroundColor="@color/light_gray"
|
|
app:cardCornerRadius="8dp"
|
|
app:cardElevation="4dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_horizontal"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<ImageView
|
|
android:layout_width="64dp"
|
|
android:layout_height="64dp"
|
|
android:contentDescription="Success Icon"
|
|
android:src="@android:drawable/ic_dialog_info"
|
|
android:tint="@color/accent_green" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:gravity="center"
|
|
android:text="Payment Successful!"
|
|
android:textColor="@color/accent_green"
|
|
android:textSize="20sp"
|
|
android:textStyle="bold" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:gravity="center"
|
|
android:text="Your transaction has been completed successfully."
|
|
android:textSize="14sp" />
|
|
</LinearLayout>
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<Button
|
|
android:id="@+id/returnToMainButton"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="8dp"
|
|
android:backgroundTint="@color/primary_blue"
|
|
android:text="Return to Main" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</androidx.core.widget.NestedScrollView>
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|