Improve UI Pin Page

This commit is contained in:
riz081 2025-05-28 21:31:57 +07:00
parent f1228db89a
commit 290f3015d9
3 changed files with 87 additions and 70 deletions

View File

@ -33,7 +33,7 @@ public class PinActivity extends AppCompatActivity {
private Button confirmButton;
private LinearLayout backNavigation;
private ImageView backArrow;
private TextView backText;
private TextView toolbarTitle;
// Numpad buttons
private TextView btn1, btn2, btn3, btn4, btn5, btn6, btn7, btn8, btn9, btn0, btn000;
@ -96,7 +96,7 @@ public class PinActivity extends AppCompatActivity {
confirmButton = findViewById(R.id.confirmButton);
backNavigation = findViewById(R.id.back_navigation);
backArrow = findViewById(R.id.backArrow);
backText = findViewById(R.id.back_text);
toolbarTitle = findViewById(R.id.toolbarTitle);
// Numpad buttons
btn1 = findViewById(R.id.btn1);
@ -126,8 +126,8 @@ public class PinActivity extends AppCompatActivity {
navigateBack();
});
// Back text (also clickable for back navigation)
backText.setOnClickListener(v -> {
// Toolbar title (also clickable for back navigation)
toolbarTitle.setOnClickListener(v -> {
addClickAnimation(v);
navigateBack();
});

View File

@ -92,7 +92,7 @@
android:layout_height="wrap_content"
android:text="TOTAL PEMBAYARAN"
android:textColor="@android:color/white"
android:textSize="16sp"
android:textSize="18sp"
android:textStyle="bold"
android:fontFamily="@font/inter"
android:layout_marginBottom="24dp" />

View File

@ -13,122 +13,139 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F5F5F5"
android:background="#FFFFFF"
tools:context=".PinActivity">
<!-- Status Bar Area -->
<!-- Red Status Bar (Override purple) -->
<View
android:id="@+id/status_bar_background"
android:id="@+id/red_status_bar"
android:layout_width="match_parent"
android:layout_height="24dp"
android:background="#E31937"
app:layout_constraintTop_toTopOf="parent"/>
<!-- Red Background Header (Extended height untuk back navigation) -->
<View
android:id="@+id/red_header_background"
android:layout_width="match_parent"
android:layout_height="160dp"
android:background="#E31937"
app:layout_constraintTop_toBottomOf="@id/red_status_bar"/>
<!-- Header with Back Navigation -->
<LinearLayout
android:id="@+id/header_container"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="#E31937"
android:id="@+id/back_navigation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingStart="16dp"
android:paddingEnd="16dp"
app:layout_constraintTop_toBottomOf="@id/status_bar_background">
android:layout_marginStart="16dp"
android:layout_marginBottom="5dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/red_status_bar">
<LinearLayout
android:id="@+id/back_navigation"
<!-- Back Arrow -->
<ImageView
android:id="@+id/backArrow"
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/ic_arrow_back"
android:contentDescription="Back" />
<!-- Title Text -->
<TextView
android:id="@+id/toolbarTitle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingEnd="8dp"
android:background="?android:attr/selectableItemBackground">
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="Kembali"
android:textColor="@android:color/white"
android:textSize="12sp"
android:fontFamily="@font/inter"/>
<ImageView
android:id="@+id/backArrow"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_arrow_back"
android:tint="@android:color/white"
android:layout_marginEnd="8dp"/>
<TextView
android:id="@+id/back_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Kembali"
android:textColor="@android:color/white"
android:textSize="16sp"/>
</LinearLayout>
</LinearLayout>
<!-- PIN Card -->
<androidx.cardview.widget.CardView
android:id="@+id/pin_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="191dp"
android:layout_margin="16dp"
android:layout_marginTop="5dp"
app:cardBackgroundColor="#3498DB"
app:cardCornerRadius="12dp"
app:cardElevation="4dp"
app:cardBackgroundColor="#4A90E2"
app:layout_constraintTop_toBottomOf="@id/header_container">
app:cardElevation="8dp"
app:layout_constraintTop_toBottomOf="@id/back_navigation">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="24dp"
android:gravity="center">
android:padding="20dp">
<!-- Title Text -->
<TextView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="SILAKAN MASUKAN PIN"
android:textColor="@android:color/white"
android:textSize="18sp"
android:textStyle="bold"
android:layout_marginBottom="24dp"/>
android:fontFamily="@font/inter"
android:layout_marginBottom="24dp"
android:gravity="center"
android:textAlignment="center"/>
<!-- PIN Input Display -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginBottom="16dp">
android:orientation="horizontal"
android:layout_marginBottom="8dp"
android:gravity="center">
<View
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_weight="1"
android:background="@android:color/white"
android:layout_marginEnd="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="20sp"
android:textStyle="bold"
android:fontFamily="@font/inter"
android:layout_marginEnd="8dp"
android:layout_gravity="center_vertical" />
<EditText
android:id="@+id/editTextPin"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="3"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@android:color/transparent"
android:textColor="@android:color/white"
android:textColorHint="#CCFFFFFF"
android:textSize="24sp"
android:textColorHint="#80FFFFFF"
android:textSize="20sp"
android:textStyle="bold"
android:gravity="center"
android:inputType="numberPassword"
android:maxLength="6"
android:fontFamily="@font/inter"
android:hint=""
android:inputType="none"
android:focusable="false"
android:clickable="false"
android:cursorVisible="false"
android:letterSpacing="0.5"/>
<View
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_weight="1"
android:background="@android:color/white"
android:layout_marginStart="8dp"/>
android:text=""
android:gravity="center"
android:textAlignment="center"
android:paddingBottom="4dp" />
</LinearLayout>
<!-- White Underline -->
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@android:color/white"
android:layout_marginBottom="16dp" />
</LinearLayout>
</androidx.cardview.widget.CardView>