initialize success sreen dan receipt screen

This commit is contained in:
riz081 2025-05-30 11:47:53 +07:00
parent 290f3015d9
commit 46fb81b6a7
7 changed files with 874 additions and 8 deletions

View File

@ -39,6 +39,9 @@
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
android:exported="false" />
<activity
android:name=".ReceiptActivity"
android:exported="false" />
</application>
</manifest>

View File

@ -35,6 +35,11 @@ public class PinActivity extends AppCompatActivity {
private ImageView backArrow;
private TextView toolbarTitle;
// Success screen views
private View successScreen;
private ImageView successIcon;
private TextView successMessage;
// Numpad buttons
private TextView btn1, btn2, btn3, btn4, btn5, btn6, btn7, btn8, btn9, btn0, btn000;
private ImageView btnDelete;
@ -66,6 +71,7 @@ public class PinActivity extends AppCompatActivity {
initializeViews();
setupClickListeners();
setupInitialStates();
setupSuccessScreen();
}
private void setStatusBarColor() {
@ -98,6 +104,11 @@ public class PinActivity extends AppCompatActivity {
backArrow = findViewById(R.id.backArrow);
toolbarTitle = findViewById(R.id.toolbarTitle);
// Success screen views
successScreen = findViewById(R.id.success_screen);
successIcon = findViewById(R.id.success_icon);
successMessage = findViewById(R.id.success_message);
// Numpad buttons
btn1 = findViewById(R.id.btn1);
btn2 = findViewById(R.id.btn2);
@ -113,6 +124,13 @@ public class PinActivity extends AppCompatActivity {
btnDelete = findViewById(R.id.btnDelete);
}
private void setupSuccessScreen() {
// Initially hide success screen
if (successScreen != null) {
successScreen.setVisibility(View.GONE);
}
}
private void setupClickListeners() {
// Back navigation - entire LinearLayout is clickable
backNavigation.setOnClickListener(v -> {
@ -283,7 +301,7 @@ public class PinActivity extends AppCompatActivity {
// In real implementation, this would call backend API
if (isValidPin(pin)) {
showToast("PIN berhasil diverifikasi!");
// Don't show toast, show success screen instead
handleSuccessfulVerification();
} else {
showToast("PIN tidak valid. Silakan coba lagi.");
@ -302,7 +320,66 @@ public class PinActivity extends AppCompatActivity {
}
private void handleSuccessfulVerification() {
// Return result to calling activity
// Show full screen success message
showSuccessScreen();
// Navigate to receipt page after 2-3 seconds
animationHandler.postDelayed(() -> {
navigateToReceiptPage();
}, 2500); // 2.5 seconds delay
}
private void showSuccessScreen() {
if (successScreen != null) {
// Set success message
if (successMessage != null) {
successMessage.setText("Pembayaran berhasil!");
}
// Show success screen with fade in animation
successScreen.setVisibility(View.VISIBLE);
successScreen.setAlpha(0f);
ObjectAnimator fadeIn = ObjectAnimator.ofFloat(successScreen, "alpha", 0f, 1f);
fadeIn.setDuration(500);
fadeIn.start();
// Add scale animation to success icon
if (successIcon != null) {
ObjectAnimator scaleX = ObjectAnimator.ofFloat(successIcon, "scaleX", 0f, 1f);
ObjectAnimator scaleY = ObjectAnimator.ofFloat(successIcon, "scaleY", 0f, 1f);
AnimatorSet iconAnimation = new AnimatorSet();
iconAnimation.playTogether(scaleX, scaleY);
iconAnimation.setDuration(600);
iconAnimation.setStartDelay(200);
iconAnimation.start();
}
}
}
private void navigateToReceiptPage() {
// Create intent to navigate to receipt/struk page
Intent intent = new Intent(this, ReceiptActivity.class);
// Pass transaction data
intent.putExtra("transaction_amount", amount);
intent.putExtra("pin_verified", true);
intent.putExtra("source_activity", sourceActivity);
// Add transaction details (you can customize these)
intent.putExtra("merchant_name", "TOKO KLONTONG PAK EKO");
intent.putExtra("merchant_location", "Ciputat Baru, Tangsel");
intent.putExtra("transaction_id", generateTransactionId());
intent.putExtra("transaction_date", getCurrentDateTime());
intent.putExtra("payment_method", "Kartu Kredit");
intent.putExtra("card_type", "BCA");
intent.putExtra("tax_percentage", "11%");
intent.putExtra("service_fee", "500");
startActivity(intent);
// Set result for calling activity
Intent resultIntent = new Intent();
resultIntent.putExtra("pin_verified", true);
resultIntent.putExtra("pin_length", currentPin.length());
@ -313,15 +390,21 @@ public class PinActivity extends AppCompatActivity {
setResult(RESULT_OK, resultIntent);
// Navigate back or to next screen based on source activity
if ("PaymentActivity".equals(sourceActivity)) {
// Could navigate to payment success screen
showToast("Pembayaran berhasil diproses!");
}
// Finish this activity
finish();
}
private String generateTransactionId() {
// Generate a simple transaction ID (in real app, this would come from backend)
return String.valueOf(System.currentTimeMillis() % 1000000000L);
}
private String getCurrentDateTime() {
// Get current date and time (in real app, use proper date formatting)
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("dd MMMM yyyy HH:mm", java.util.Locale.getDefault());
return sdf.format(new java.util.Date());
}
private void resetPinState() {
currentPin = new StringBuilder();
updatePinDisplay();
@ -370,6 +453,10 @@ public class PinActivity extends AppCompatActivity {
@Override
public void onBackPressed() {
// Prevent back press when success screen is showing
if (successScreen != null && successScreen.getVisibility() == View.VISIBLE) {
return;
}
navigateBack();
}

View File

@ -0,0 +1,214 @@
package com.example.bdkipoc;
import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
public class ReceiptActivity extends AppCompatActivity {
// Views
private LinearLayout backNavigation;
private ImageView backArrow;
private TextView toolbarTitle;
// Receipt details
private TextView merchantName;
private TextView merchantLocation;
private TextView midText;
private TextView tidText;
private TextView transactionNumber;
private TextView transactionDate;
private TextView paymentMethod;
private TextView cardType;
private TextView transactionTotal;
private TextView taxPercentage;
private TextView serviceFee;
private TextView finalTotal;
// Action buttons
private Button printButton;
private Button emailButton;
private Button finishButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Set status bar color
setStatusBarColor();
setContentView(R.layout.activity_receipt);
initializeViews();
setupClickListeners();
loadTransactionData();
}
private void setStatusBarColor() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(Color.parseColor("#E31937")); // Red color
// Make status bar icons white (for dark red background)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
View decorView = window.getDecorView();
decorView.setSystemUiVisibility(0); // Clear light status bar flag
}
}
}
private void initializeViews() {
// Navigation
backNavigation = findViewById(R.id.back_navigation);
backArrow = findViewById(R.id.backArrow);
toolbarTitle = findViewById(R.id.toolbarTitle);
// Receipt details
merchantName = findViewById(R.id.merchant_name);
merchantLocation = findViewById(R.id.merchant_location);
midText = findViewById(R.id.mid_text);
tidText = findViewById(R.id.tid_text);
transactionNumber = findViewById(R.id.transaction_number);
transactionDate = findViewById(R.id.transaction_date);
paymentMethod = findViewById(R.id.payment_method);
cardType = findViewById(R.id.card_type);
transactionTotal = findViewById(R.id.transaction_total);
taxPercentage = findViewById(R.id.tax_percentage);
serviceFee = findViewById(R.id.service_fee);
finalTotal = findViewById(R.id.final_total);
// Action buttons
printButton = findViewById(R.id.print_button);
emailButton = findViewById(R.id.email_button);
finishButton = findViewById(R.id.finish_button);
}
private void setupClickListeners() {
// Back navigation
backNavigation.setOnClickListener(v -> navigateBack());
backArrow.setOnClickListener(v -> navigateBack());
toolbarTitle.setOnClickListener(v -> navigateBack());
// Action buttons
printButton.setOnClickListener(v -> handlePrintReceipt());
emailButton.setOnClickListener(v -> handleEmailReceipt());
finishButton.setOnClickListener(v -> handleFinish());
}
private void loadTransactionData() {
Intent intent = getIntent();
if (intent != null) {
// Load transaction data from intent
String amount = intent.getStringExtra("transaction_amount");
String merchantNameStr = intent.getStringExtra("merchant_name");
String merchantLocationStr = intent.getStringExtra("merchant_location");
String transactionId = intent.getStringExtra("transaction_id");
String transactionDateStr = intent.getStringExtra("transaction_date");
String paymentMethodStr = intent.getStringExtra("payment_method");
String cardTypeStr = intent.getStringExtra("card_type");
String taxPercentageStr = intent.getStringExtra("tax_percentage");
String serviceFeeStr = intent.getStringExtra("service_fee");
// Set merchant info
if (!TextUtils.isEmpty(merchantNameStr)) {
merchantName.setText(merchantNameStr);
}
if (!TextUtils.isEmpty(merchantLocationStr)) {
merchantLocation.setText(merchantLocationStr);
}
// Set transaction details
if (!TextUtils.isEmpty(transactionId)) {
transactionNumber.setText(transactionId);
}
if (!TextUtils.isEmpty(transactionDateStr)) {
transactionDate.setText(transactionDateStr);
}
if (!TextUtils.isEmpty(paymentMethodStr)) {
paymentMethod.setText(paymentMethodStr);
}
if (!TextUtils.isEmpty(cardTypeStr)) {
cardType.setText(cardTypeStr);
}
if (!TextUtils.isEmpty(taxPercentageStr)) {
taxPercentage.setText(taxPercentageStr);
}
if (!TextUtils.isEmpty(serviceFeeStr)) {
serviceFee.setText(serviceFeeStr);
}
// Calculate and set amounts
if (!TextUtils.isEmpty(amount)) {
try {
long amountValue = Long.parseLong(amount);
String formattedAmount = formatCurrency(amountValue);
transactionTotal.setText(formattedAmount);
// Calculate total with tax and service fee
long serviceFeeLong = TextUtils.isEmpty(serviceFeeStr) ? 0 : Long.parseLong(serviceFeeStr);
long totalWithFee = amountValue + serviceFeeLong;
finalTotal.setText(formatCurrency(totalWithFee));
} catch (NumberFormatException e) {
transactionTotal.setText(amount);
finalTotal.setText(amount);
}
}
// Set MID and TID (you can customize these)
midText.setText("1234567890");
tidText.setText("1234567890");
}
}
private String formatCurrency(long amount) {
return String.format("%,d", amount).replace(',', '.');
}
private void handlePrintReceipt() {
// Handle print receipt action
// In real app, this would integrate with printer
showToast("Mencetak struk...");
}
private void handleEmailReceipt() {
// Handle email receipt action
// In real app, this would open email intent
showToast("Mengirim email...");
}
private void handleFinish() {
// Finish and return to main screen
navigateBack();
}
private void navigateBack() {
// You can navigate back to main activity or finish
Intent intent = new Intent(this, PaymentActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
finish();
}
private void showToast(String message) {
android.widget.Toast.makeText(this, message, android.widget.Toast.LENGTH_SHORT).show();
}
@Override
public void onBackPressed() {
navigateBack();
}
}

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#F5F5F5" />
<stroke
android:width="1dp"
android:color="#E0E0E0" />
<corners android:radius="8dp" />
</shape>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorOnPrimary">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z"/>
</vector>

View File

@ -255,6 +255,43 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintVertical_bias="0"/>
<!-- Success Screen (Full Screen Overlay) -->
<LinearLayout
android:id="@+id/success_screen"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:background="#E31937"
android:visibility="gone"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<!-- Success Icon -->
<ImageView
android:id="@+id/success_icon"
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@drawable/ic_check_circle"
android:tint="@android:color/white"
android:layout_marginBottom="24dp"/>
<!-- Success Message -->
<TextView
android:id="@+id/success_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pembayaran berhasil!"
android:textColor="@android:color/white"
android:textSize="24sp"
android:textStyle="bold"
android:fontFamily="@font/inter"
android:gravity="center"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

View File

@ -0,0 +1,502 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:overScrollMode="never"
android:scrollbars="none"
android:background="#F5F5F5">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
tools:context=".ReceiptActivity">
<!-- Red Status Bar (Override purple) -->
<View
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 -->
<View
android:id="@+id/red_header_background"
android:layout_width="match_parent"
android:layout_height="80dp"
android:background="#E31937"
app:layout_constraintTop_toBottomOf="@id/red_status_bar"/>
<!-- Header with Back Navigation -->
<LinearLayout
android:id="@+id/back_navigation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginStart="16dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/red_status_bar"
app:layout_constraintBottom_toBottomOf="@id/red_header_background">
<!-- Back Arrow -->
<ImageView
android:id="@+id/backArrow"
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/ic_arrow_back"
android:contentDescription="Kembali" />
<!-- Title Text -->
<TextView
android:id="@+id/toolbarTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="Kembali"
android:textColor="@android:color/white"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
</LinearLayout>
<!-- Receipt Card -->
<androidx.cardview.widget.CardView
android:id="@+id/receipt_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:layout_marginTop="8dp"
app:cardBackgroundColor="@android:color/white"
app:cardCornerRadius="12dp"
app:cardElevation="4dp"
app:layout_constraintTop_toBottomOf="@id/red_header_background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="20dp">
<!-- Header Section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:layout_marginBottom="16dp">
<!-- EDC Merchant Logo/Text -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="EDC"
android:textColor="#E31937"
android:textSize="24sp"
android:textStyle="bold"
android:fontFamily="@font/inter"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Merchant"
android:textColor="#3F51B5"
android:textSize="20sp"
android:textStyle="bold"
android:fontFamily="@font/inter"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BANK BRI"
android:textColor="#333333"
android:textSize="12sp"
android:fontFamily="@font/inter"
android:layout_marginTop="4dp"/>
</LinearLayout>
<!-- Merchant Info -->
<TextView
android:id="@+id/merchant_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TOKO KLONTONG PAK EKO"
android:textColor="#333333"
android:textSize="16sp"
android:textStyle="bold"
android:fontFamily="@font/inter"
android:gravity="center"
android:layout_marginBottom="4dp"/>
<TextView
android:id="@+id/merchant_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Ciputat Baru, Tangsel"
android:textColor="#666666"
android:textSize="14sp"
android:fontFamily="@font/inter"
android:gravity="center"
android:layout_marginBottom="16dp"/>
<!-- Separator Line -->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#E0E0E0"
android:layout_marginBottom="16dp"/>
<!-- Transaction Details -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="MID: "
android:textColor="#666666"
android:textSize="12sp"
android:fontFamily="@font/inter"/>
<TextView
android:id="@+id/mid_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="1234567890"
android:textColor="#333333"
android:textSize="12sp"
android:fontFamily="@font/inter"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TID: "
android:textColor="#666666"
android:textSize="12sp"
android:fontFamily="@font/inter"/>
<TextView
android:id="@+id/tid_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="1234567890"
android:textColor="#333333"
android:textSize="12sp"
android:fontFamily="@font/inter"/>
</LinearLayout>
<!-- Separator Line -->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#E0E0E0"
android:layout_marginVertical="12dp"/>
<!-- Transaction Number -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Nomor transaksi"
android:textColor="#666666"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
<TextView
android:id="@+id/transaction_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="3429483635"
android:textColor="#333333"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
</LinearLayout>
<!-- Transaction Date -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Tanggal transaksi"
android:textColor="#666666"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
<TextView
android:id="@+id/transaction_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="13 Januari 2025 13:46"
android:textColor="#333333"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
</LinearLayout>
<!-- Payment Method -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Metode pembayaran"
android:textColor="#666666"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
<TextView
android:id="@+id/payment_method"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Kartu Kredit"
android:textColor="#333333"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
</LinearLayout>
<!-- Card Type -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="16dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Jenis Kartu"
android:textColor="#666666"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
<TextView
android:id="@+id/card_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BCA"
android:textColor="#333333"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
</LinearLayout>
<!-- Separator Line -->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#E0E0E0"
android:layout_marginBottom="16dp"/>
<!-- Transaction Amount -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Total transaksi"
android:textColor="#666666"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
<TextView
android:id="@+id/transaction_total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="3.500.000"
android:textColor="#333333"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
</LinearLayout>
<!-- Tax -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Pajak (%)"
android:textColor="#666666"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
<TextView
android:id="@+id/tax_percentage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="11%"
android:textColor="#333333"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
</LinearLayout>
<!-- Service Fee -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="16dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Biaya Layanan"
android:textColor="#666666"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
<TextView
android:id="@+id/service_fee"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="500"
android:textColor="#333333"
android:textSize="14sp"
android:fontFamily="@font/inter"/>
</LinearLayout>
<!-- Separator Line -->
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#E0E0E0"
android:layout_marginBottom="16dp"/>
<!-- Final Total -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="20dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TOTAL"
android:textColor="#333333"
android:textSize="18sp"
android:textStyle="bold"
android:fontFamily="@font/inter"/>
<TextView
android:id="@+id/final_total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="3.506.500"
android:textColor="#333333"
android:textSize="18sp"
android:textStyle="bold"
android:fontFamily="@font/inter"/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- Action Buttons -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_margin="16dp"
android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@id/receipt_card">
<!-- Print Button -->
<Button
android:id="@+id/print_button"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:layout_marginEnd="8dp"
android:text="📄 Cetak Ulang"
android:textColor="#666666"
android:textSize="14sp"
android:background="@drawable/button_secondary_background"
android:fontFamily="@font/inter"/>
<!-- Email Button -->
<Button
android:id="@+id/email_button"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:layout_marginStart="8dp"
android:text="📧 Email"
android:textColor="#666666"
android:textSize="14sp"
android:background="@drawable/button_secondary_background"
android:fontFamily="@font/inter"/>
</LinearLayout>
<!-- Finish Button -->
<Button
android:id="@+id/finish_button"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_margin="16dp"
android:layout_marginTop="8dp"
android:text="Selesai"
android:textColor="@android:color/white"
android:textSize="16sp"
android:textStyle="bold"
android:background="@drawable/button_active_background"
android:fontFamily="@font/inter"
app:layout_constraintTop_toBottomOf="@id/receipt_card"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintVertical_bias="0"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>