half baked PayMV QR generate support
Auto Tag on Version Change / check-version (push) Successful in 3s
Auto Tag on Version Change / check-version (push) Successful in 3s
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
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"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:background="?attr/colorSurface">
|
||||
|
||||
<!-- QR card fills all available space above the inputs -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvQrPlaceholder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="Select an account"
|
||||
android:textAppearance="?attr/textAppearanceBodyLarge"
|
||||
android:textColor="?attr/colorOnSurfaceVariant" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivQrCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/pay_mv_qr" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Account dropdown -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/tilAccount"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:hint="@string/paymvqr_select_account">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/actvAccount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Amount (optional) -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/tilAmount"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:hint="@string/paymvqr_amount_hint"
|
||||
app:helperText="@string/paymvqr_amount_helper"
|
||||
app:prefixText="MVR ">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etAmount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:maxLines="1" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Action buttons — always visible; share/save disabled until QR is rendered -->
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutActions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnShare"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:enabled="false"
|
||||
android:text="@string/paymvqr_share" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnSave"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="4dp"
|
||||
android:enabled="false"
|
||||
android:text="@string/paymvqr_save_image" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnScanQr"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/transfer_scan_qr"
|
||||
app:icon="@drawable/ic_qr_scan" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -99,6 +99,15 @@
|
||||
<string name="transfer">Transfer</string>
|
||||
<string name="pay_mv_qr">PayMV QR</string>
|
||||
|
||||
<!-- PayMV QR Generator -->
|
||||
<string name="paymvqr_select_account">Select account</string>
|
||||
<string name="paymvqr_amount_hint">Amount (optional)</string>
|
||||
<string name="paymvqr_amount_helper">Leave empty to allow payer to enter any amount</string>
|
||||
<string name="paymvqr_share">Share</string>
|
||||
<string name="paymvqr_save_image">Save Image</string>
|
||||
<string name="paymvqr_saved">QR saved to gallery</string>
|
||||
<string name="paymvqr_save_failed">Failed to save image</string>
|
||||
|
||||
<!-- Toolbar -->
|
||||
<string name="action_lock">Lock app</string>
|
||||
<string name="autolock_warning_title">Locking soon</string>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths>
|
||||
<cache-path name="receipt_cache" path="receipts/" />
|
||||
<cache-path name="qr_cache" path="qr/" />
|
||||
</paths>
|
||||
|
||||
Reference in New Issue
Block a user