forked from thijooree/android
166 lines
6.5 KiB
XML
166 lines
6.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<com.google.android.material.card.MaterialCardView
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
style="@style/Widget.Material3.CardView.Filled"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="16dp"
|
|
android:layout_marginBottom="12dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
app:cardCornerRadius="24dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:paddingHorizontal="20dp"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="12dp">
|
|
|
|
<!-- Header: logo, bank + holder name, countdown ring -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical">
|
|
|
|
<com.google.android.material.imageview.ShapeableImageView
|
|
android:id="@+id/ivBankLogo"
|
|
android:layout_width="40dp"
|
|
android:layout_height="40dp"
|
|
android:layout_marginEnd="12dp"
|
|
android:scaleType="fitCenter"
|
|
app:shapeAppearanceOverlay="@style/ShapeAppearance.Circle" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/tvOtpBank"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?attr/textAppearanceTitleSmall"
|
|
android:textColor="?attr/colorOnSurface" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvOtpLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
</LinearLayout>
|
|
|
|
<FrameLayout
|
|
android:layout_width="40dp"
|
|
android:layout_height="40dp">
|
|
|
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
|
android:id="@+id/otpProgress"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:indeterminate="false"
|
|
android:max="30"
|
|
app:indicatorSize="40dp"
|
|
app:trackThickness="3dp"
|
|
app:trackCornerRadius="2dp"
|
|
app:indicatorColor="?attr/colorPrimary"
|
|
app:trackColor="?attr/colorOutlineVariant" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvOtpCountdown"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:textAppearance="?attr/textAppearanceLabelMedium"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
</FrameLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Current code + copy -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="12dp"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/tvOtpCode"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:fontFamily="monospace"
|
|
android:letterSpacing="0.12"
|
|
android:textAppearance="?attr/textAppearanceDisplaySmall"
|
|
android:textColor="?attr/colorPrimary"
|
|
android:textStyle="bold" />
|
|
|
|
<Button
|
|
android:id="@+id/btnCopyOtp"
|
|
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:contentDescription="Copy OTP"
|
|
android:tooltipText="Copy OTP"
|
|
app:icon="@drawable/ic_copy" />
|
|
|
|
</LinearLayout>
|
|
|
|
<com.google.android.material.divider.MaterialDivider
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginBottom="4dp" />
|
|
|
|
<!-- Next code + copy -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="8dp"
|
|
android:text="Next"
|
|
android:textAppearance="?attr/textAppearanceLabelMedium"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvNextOtpCode"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:fontFamily="monospace"
|
|
android:letterSpacing="0.1"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<Button
|
|
android:id="@+id/btnCopyNextOtp"
|
|
style="@style/Widget.Material3.Button.IconButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:contentDescription="Copy next OTP"
|
|
android:tooltipText="Copy next OTP"
|
|
app:icon="@drawable/ic_copy"
|
|
app:iconTint="?attr/colorOnSurfaceVariant" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|