195 lines
8.0 KiB
XML
195 lines
8.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<FrameLayout
|
|
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:background="?attr/colorSurface">
|
|
|
|
<!-- Main content when cards exist -->
|
|
<LinearLayout
|
|
android:id="@+id/contentLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:visibility="gone">
|
|
|
|
<!-- Top spacer: pushes card to vertical center -->
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1" />
|
|
|
|
<!-- Horizontal card stack. Width/padding set programmatically for centering + peek. -->
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/rvCards"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:clipToPadding="false"
|
|
android:overScrollMode="never" />
|
|
|
|
<!-- Page indicator dots -->
|
|
<LinearLayout
|
|
android:id="@+id/pageIndicator"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
android:orientation="horizontal"
|
|
android:paddingTop="12dp"
|
|
android:paddingBottom="2dp" />
|
|
|
|
<!-- Selected card type / product name -->
|
|
<TextView
|
|
android:id="@+id/tvSelectedCardType"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center"
|
|
android:paddingHorizontal="16dp"
|
|
android:paddingTop="6dp"
|
|
android:paddingBottom="2dp"
|
|
android:textAppearance="?attr/textAppearanceLabelLarge"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<!-- Flexible spacer: absorbs remaining space, pushes buttons to bottom -->
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1" />
|
|
|
|
<!-- Divider -->
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:layout_marginHorizontal="24dp"
|
|
android:layout_marginBottom="4dp"
|
|
android:background="?attr/colorOutlineVariant" />
|
|
|
|
<!-- Primary pay actions -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:paddingHorizontal="16dp"
|
|
android:paddingTop="8dp"
|
|
android:paddingBottom="4dp">
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnScanToPay"
|
|
style="@style/Widget.Material3.Button.TonalButton"
|
|
android:layout_width="0dp"
|
|
android:layout_weight="1"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="8dp"
|
|
android:minWidth="0dp"
|
|
android:minHeight="0dp"
|
|
android:paddingTop="14dp"
|
|
android:paddingBottom="14dp"
|
|
android:text="@string/card_pay_qr"
|
|
android:textSize="13sp"
|
|
app:icon="@drawable/ic_qr_scan"
|
|
app:iconSize="22dp"
|
|
app:iconGravity="top"
|
|
app:iconPadding="6dp" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnTapToPay"
|
|
style="@style/Widget.Material3.Button.TonalButton"
|
|
android:layout_width="0dp"
|
|
android:layout_weight="1"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8dp"
|
|
android:minWidth="0dp"
|
|
android:minHeight="0dp"
|
|
android:paddingTop="14dp"
|
|
android:paddingBottom="14dp"
|
|
android:text="@string/card_pay_nfc"
|
|
android:textSize="13sp"
|
|
app:icon="@drawable/ic_nfc"
|
|
app:iconSize="22dp"
|
|
app:iconGravity="top"
|
|
app:iconPadding="6dp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Secondary card management actions -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:paddingHorizontal="8dp"
|
|
android:paddingTop="4dp"
|
|
android:paddingBottom="8dp">
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnChangePin"
|
|
style="@style/Widget.Material3.Button.TextButton"
|
|
android:layout_width="0dp"
|
|
android:layout_weight="1"
|
|
android:layout_height="wrap_content"
|
|
android:minWidth="0dp"
|
|
android:minHeight="0dp"
|
|
android:text="@string/card_action_change_pin"
|
|
android:textSize="11sp"
|
|
app:icon="@drawable/ic_edit"
|
|
app:iconSize="16dp"
|
|
app:iconPadding="3dp" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnFreeze"
|
|
style="@style/Widget.Material3.Button.TextButton"
|
|
android:layout_width="0dp"
|
|
android:layout_weight="1"
|
|
android:layout_height="wrap_content"
|
|
android:minWidth="0dp"
|
|
android:minHeight="0dp"
|
|
android:text="@string/card_action_freeze"
|
|
android:textSize="11sp"
|
|
app:icon="@drawable/ic_freeze"
|
|
app:iconSize="16dp"
|
|
app:iconPadding="3dp" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnBlock"
|
|
style="@style/Widget.Material3.Button.TextButton"
|
|
android:layout_width="0dp"
|
|
android:layout_weight="1"
|
|
android:layout_height="wrap_content"
|
|
android:minWidth="0dp"
|
|
android:minHeight="0dp"
|
|
android:text="@string/card_action_block"
|
|
android:textSize="11sp"
|
|
app:icon="@drawable/ic_block"
|
|
app:iconSize="16dp"
|
|
app:iconPadding="3dp" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Loading state -->
|
|
<LinearLayout
|
|
android:id="@+id/loadingView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center"
|
|
android:orientation="vertical"
|
|
android:visibility="gone">
|
|
<ProgressBar
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
</LinearLayout>
|
|
|
|
<!-- Empty state -->
|
|
<TextView
|
|
android:id="@+id/emptyView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center"
|
|
android:text="@string/cards_empty"
|
|
android:textAppearance="?attr/textAppearanceBodyMedium"
|
|
android:textColor="?attr/colorOnSurfaceVariant"
|
|
android:visibility="gone" />
|
|
|
|
|
|
</FrameLayout>
|