refactor credit card
This commit is contained in:
parent
f4e5e03077
commit
174a1461fd
@ -71,9 +71,17 @@
|
||||
<activity
|
||||
android:name=".HistoryDetailActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".kredit.CreateTransactionActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".kredit.EmvTransactionActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".kredit.CreditCardActivity"
|
||||
style="@style/Theme.AppCompat"
|
||||
android:exported="false" />
|
||||
|
||||
<activity android:name="com.sunmi.emv.l2.view.AppSelectActivity"/>
|
||||
|
@ -19,6 +19,8 @@ import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
|
||||
import com.example.bdkipoc.kredit.CreateTransactionActivity;
|
||||
import com.example.bdkipoc.kredit.EmvTransactionActivity;
|
||||
import com.example.bdkipoc.kredit.CreditCardActivity;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
@ -160,7 +162,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
if (cardView != null) {
|
||||
cardView.setOnClickListener(v -> {
|
||||
if (cardId == R.id.card_kartu_kredit) {
|
||||
startActivity(new Intent(MainActivity.this, CreditCardActivity.class));
|
||||
startActivity(new Intent(MainActivity.this, CreateTransactionActivity.class));
|
||||
} else if (cardId == R.id.card_kartu_debit) {
|
||||
startActivity(new Intent(MainActivity.this, PaymentActivity.class));
|
||||
} else if (cardId == R.id.card_qris) {
|
||||
|
@ -0,0 +1,179 @@
|
||||
package com.example.bdkipoc.kredit;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import com.example.bdkipoc.R;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* CreateTransactionActivity - Handle amount input and transaction creation
|
||||
*/
|
||||
public class CreateTransactionActivity extends AppCompatActivity {
|
||||
private static final String TAG = "CreateTransaction";
|
||||
|
||||
// UI Components
|
||||
private TextView tvAmountDisplay;
|
||||
private TextView tvModeIndicator;
|
||||
private Button btnConfirm;
|
||||
private Button btnToggleMode;
|
||||
|
||||
// Amount Input Keypad
|
||||
private Button btn1, btn2, btn3, btn4, btn5, btn6, btn7, btn8, btn9, btn0, btn00, btnClear;
|
||||
|
||||
// State Management
|
||||
private String transactionAmount = "0";
|
||||
private boolean isEMVMode = true; // Default to EMV mode
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_create_transaction);
|
||||
|
||||
initViews();
|
||||
setupListeners();
|
||||
updateAmountDisplay();
|
||||
updateModeDisplay();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
// Setup Toolbar
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setTitle("Input Nominal Transaksi");
|
||||
}
|
||||
|
||||
// Initialize UI components
|
||||
tvAmountDisplay = findViewById(R.id.tv_amount_display);
|
||||
tvModeIndicator = findViewById(R.id.tv_mode_indicator);
|
||||
btnConfirm = findViewById(R.id.btn_confirm);
|
||||
btnToggleMode = findViewById(R.id.btn_toggle_mode);
|
||||
|
||||
// Initialize keypad buttons
|
||||
btn1 = findViewById(R.id.btn_1);
|
||||
btn2 = findViewById(R.id.btn_2);
|
||||
btn3 = findViewById(R.id.btn_3);
|
||||
btn4 = findViewById(R.id.btn_4);
|
||||
btn5 = findViewById(R.id.btn_5);
|
||||
btn6 = findViewById(R.id.btn_6);
|
||||
btn7 = findViewById(R.id.btn_7);
|
||||
btn8 = findViewById(R.id.btn_8);
|
||||
btn9 = findViewById(R.id.btn_9);
|
||||
btn0 = findViewById(R.id.btn_0);
|
||||
btn00 = findViewById(R.id.btn_00);
|
||||
btnClear = findViewById(R.id.btn_clear);
|
||||
}
|
||||
|
||||
private void setupListeners() {
|
||||
// Keypad number listeners
|
||||
View.OnClickListener numberClickListener = v -> {
|
||||
Button btn = (Button) v;
|
||||
String number = btn.getText().toString();
|
||||
appendToAmount(number);
|
||||
};
|
||||
|
||||
btn1.setOnClickListener(numberClickListener);
|
||||
btn2.setOnClickListener(numberClickListener);
|
||||
btn3.setOnClickListener(numberClickListener);
|
||||
btn4.setOnClickListener(numberClickListener);
|
||||
btn5.setOnClickListener(numberClickListener);
|
||||
btn6.setOnClickListener(numberClickListener);
|
||||
btn7.setOnClickListener(numberClickListener);
|
||||
btn8.setOnClickListener(numberClickListener);
|
||||
btn9.setOnClickListener(numberClickListener);
|
||||
btn0.setOnClickListener(numberClickListener);
|
||||
btn00.setOnClickListener(numberClickListener);
|
||||
|
||||
// Clear button
|
||||
btnClear.setOnClickListener(v -> clearAmount());
|
||||
|
||||
// Confirm button
|
||||
btnConfirm.setOnClickListener(v -> handleConfirmAmount());
|
||||
|
||||
// Toggle mode button
|
||||
btnToggleMode.setOnClickListener(v -> toggleEMVMode());
|
||||
}
|
||||
|
||||
private void appendToAmount(String number) {
|
||||
// Remove leading zeros and handle maximum amount
|
||||
String currentAmount = transactionAmount.equals("0") ? "" : transactionAmount;
|
||||
String newAmount = currentAmount + number;
|
||||
|
||||
// Limit to reasonable amount (max 999999999 = 9,999,999.99)
|
||||
if (newAmount.length() <= 9) {
|
||||
transactionAmount = newAmount;
|
||||
updateAmountDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
private void clearAmount() {
|
||||
if (transactionAmount.length() > 1) {
|
||||
transactionAmount = transactionAmount.substring(0, transactionAmount.length() - 1);
|
||||
} else {
|
||||
transactionAmount = "0";
|
||||
}
|
||||
updateAmountDisplay();
|
||||
}
|
||||
|
||||
private void updateAmountDisplay() {
|
||||
if (tvAmountDisplay != null) {
|
||||
long amountCents = Long.parseLong(transactionAmount);
|
||||
double amountRupiah = amountCents / 100.0;
|
||||
NumberFormat formatter = NumberFormat.getCurrencyInstance(new Locale("id", "ID"));
|
||||
String formattedAmount = formatter.format(amountRupiah);
|
||||
tvAmountDisplay.setText(formattedAmount);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleConfirmAmount() {
|
||||
long amountCents = Long.parseLong(transactionAmount);
|
||||
if (amountCents < 100) { // Minimum Rp 1.00
|
||||
showToast("Minimum amount is Rp 1.00");
|
||||
return;
|
||||
}
|
||||
|
||||
// Start EMV Transaction Activity
|
||||
Intent intent = new Intent(this, EmvTransactionActivity.class);
|
||||
intent.putExtra("TRANSACTION_AMOUNT", transactionAmount);
|
||||
intent.putExtra("EMV_MODE", isEMVMode);
|
||||
startActivity(intent);
|
||||
finish(); // Remove this activity from stack
|
||||
}
|
||||
|
||||
private void toggleEMVMode() {
|
||||
isEMVMode = !isEMVMode;
|
||||
updateModeDisplay();
|
||||
showToast("Mode switched to: " + (isEMVMode ? "EMV Mode" : "Simple Mode"));
|
||||
}
|
||||
|
||||
private void updateModeDisplay() {
|
||||
String mode = isEMVMode ? "EMV Mode (Full Card Data)" : "Simple Mode (Basic Detection)";
|
||||
if (tvModeIndicator != null) {
|
||||
tvModeIndicator.setText("Current Mode: " + mode);
|
||||
}
|
||||
if (btnToggleMode != null) {
|
||||
btnToggleMode.setText(isEMVMode ? "Switch to Simple" : "Switch to EMV");
|
||||
}
|
||||
}
|
||||
|
||||
private void showToast(String message) {
|
||||
Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSupportNavigateUp() {
|
||||
onBackPressed();
|
||||
return true;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
203
app/src/main/res/layout/activity_create_transaction.xml
Normal file
203
app/src/main/res/layout/activity_create_transaction.xml
Normal file
@ -0,0 +1,203 @@
|
||||
<?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:background="@color/colorBackground"
|
||||
tools:context=".kredit.CreateTransactionActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Toolbar -->
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/primary_blue"
|
||||
android:theme="@style/CustomToolbarTheme"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<!-- Content Container -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Header Section -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="MASUKKAN NOMINAL"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#333333"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Amount Display -->
|
||||
<TextView
|
||||
android:id="@+id/tv_amount_display"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Rp 0,00"
|
||||
style="@style/AmountDisplayStyle"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<!-- Mode Indicator -->
|
||||
<TextView
|
||||
android:id="@+id/tv_mode_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Current Mode: EMV Mode (Full Card Data)"
|
||||
style="@style/ModeIndicatorStyle" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Mode Toggle Button -->
|
||||
<Button
|
||||
android:id="@+id/btn_toggle_mode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:text="Switch to Simple"
|
||||
style="@style/OutlineButton" />
|
||||
|
||||
<!-- Keypad Section -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Keypad Input"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#333333"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Keypad Grid -->
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="3"
|
||||
android:rowCount="4"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<!-- Row 1: 1, 2, 3 -->
|
||||
<Button
|
||||
android:id="@+id/btn_1"
|
||||
style="@style/KeypadButton"
|
||||
android:text="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_2"
|
||||
style="@style/KeypadButton"
|
||||
android:text="2" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_3"
|
||||
style="@style/KeypadButton"
|
||||
android:text="3" />
|
||||
|
||||
<!-- Row 2: 4, 5, 6 -->
|
||||
<Button
|
||||
android:id="@+id/btn_4"
|
||||
style="@style/KeypadButton"
|
||||
android:text="4" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_5"
|
||||
style="@style/KeypadButton"
|
||||
android:text="5" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_6"
|
||||
style="@style/KeypadButton"
|
||||
android:text="6" />
|
||||
|
||||
<!-- Row 3: 7, 8, 9 -->
|
||||
<Button
|
||||
android:id="@+id/btn_7"
|
||||
style="@style/KeypadButton"
|
||||
android:text="7" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_8"
|
||||
style="@style/KeypadButton"
|
||||
android:text="8" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_9"
|
||||
style="@style/KeypadButton"
|
||||
android:text="9" />
|
||||
|
||||
<!-- Row 4: 00, 0, Clear -->
|
||||
<Button
|
||||
android:id="@+id/btn_00"
|
||||
style="@style/KeypadButton"
|
||||
android:text="00" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_0"
|
||||
style="@style/KeypadButton"
|
||||
android:text="0" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_clear"
|
||||
style="@style/KeypadButtonSecondary"
|
||||
android:text="⌫" />
|
||||
|
||||
</GridLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Confirm Button -->
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:text="KONFIRMASI NOMINAL"
|
||||
style="@style/PrimaryButton"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Instructions -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="• Gunakan keypad untuk memasukkan nominal\n• Minimal transaksi Rp 1,00\n• Pilih mode EMV untuk data lengkap kartu"
|
||||
style="@style/HintTextStyle" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
@ -1,367 +1,222 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- app/src/main/res/layout/activity_credit_card.xml -->
|
||||
<!-- Enhanced layout with amount input and keypad -->
|
||||
<LinearLayout 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:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:background="#F5F5F5">
|
||||
android:background="@color/colorBackground"
|
||||
tools:context=".kredit.CreditCardActivity">
|
||||
|
||||
<!-- Toolbar -->
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:titleTextColor="@android:color/white" />
|
||||
android:background="@color/primary_blue"
|
||||
android:theme="@style/CustomToolbarTheme"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<!-- Toggle EMV Mode Button -->
|
||||
<Button
|
||||
android:id="@+id/btn_toggle_mode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="Toggle EMV Mode"
|
||||
android:background="#2196F3"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
<!-- Mode Indicator -->
|
||||
<TextView
|
||||
android:id="@+id/tv_mode_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:text="Current Mode: Simple Mode"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:background="#EEEEEE"
|
||||
android:textColor="#333333" />
|
||||
|
||||
<!-- Amount Input Layout -->
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_amount_input"
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="visible">
|
||||
android:fillViewport="true">
|
||||
|
||||
<!-- Header -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TOTAL PEMBAYARAN"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:background="#2196F3"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
<!-- Amount Display Card -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@android:color/white"
|
||||
android:padding="20dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:elevation="4dp">
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
<!-- Success Header -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="RP"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#666666"
|
||||
android:gravity="left" />
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardBackgroundColor="@color/accent_green">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount_display"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:src="@drawable/ic_check_circle"
|
||||
app:tint="@android:color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TRANSAKSI BERHASIL"
|
||||
style="@style/SuccessTextStyle" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="Transaction Completed Successfully"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/white"
|
||||
android:fontFamily="@font/inter"
|
||||
android:gravity="center" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Transaction Summary Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Rp 0,00"
|
||||
android:textSize="32sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#333333"
|
||||
android:gravity="left"
|
||||
android:layout_marginTop="8dp" />
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Masukkan kembali nominal pembayaran pelanggan Anda"
|
||||
android:textSize="12sp"
|
||||
android:textColor="#999999"
|
||||
android:gravity="left"
|
||||
android:layout_marginTop="8dp" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<!-- Hidden EditText for amount input (for debugging/testing) -->
|
||||
<EditText
|
||||
android:id="@+id/et_amount_input"
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="RINGKASAN TRANSAKSI"
|
||||
style="@style/CardTitleStyle" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxHeight="200dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_transaction_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Loading transaction summary..."
|
||||
style="@style/TransactionSummaryStyle" />
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Card Data Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:inputType="number"
|
||||
android:text="0" />
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<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="DATA KARTU DETAIL"
|
||||
style="@style/CardTitleStyle"
|
||||
android:layout_marginBottom="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_credit_card"
|
||||
app:tint="#666666" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:fillViewport="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_card_data"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Loading card data..."
|
||||
style="@style/MonospaceTextStyle"
|
||||
android:scrollbars="vertical" />
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<!-- Keypad -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@android:color/white"
|
||||
android:padding="16dp"
|
||||
android:elevation="2dp">
|
||||
|
||||
<!-- Row 1: 1, 2, 3 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="1"
|
||||
android:textSize="24sp"
|
||||
android:background="#F0F0F0"
|
||||
android:textColor="#333333" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="2"
|
||||
android:textSize="24sp"
|
||||
android:background="#F0F0F0"
|
||||
android:textColor="#333333" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="3"
|
||||
android:textSize="24sp"
|
||||
android:background="#F0F0F0"
|
||||
android:textColor="#333333" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 2: 4, 5, 6 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="4"
|
||||
android:textSize="24sp"
|
||||
android:background="#F0F0F0"
|
||||
android:textColor="#333333" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="5"
|
||||
android:textSize="24sp"
|
||||
android:background="#F0F0F0"
|
||||
android:textColor="#333333" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="6"
|
||||
android:textSize="24sp"
|
||||
android:background="#F0F0F0"
|
||||
android:textColor="#333333" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 3: 7, 8, 9 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_7"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="7"
|
||||
android:textSize="24sp"
|
||||
android:background="#F0F0F0"
|
||||
android:textColor="#333333" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_8"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="8"
|
||||
android:textSize="24sp"
|
||||
android:background="#F0F0F0"
|
||||
android:textColor="#333333" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_9"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="9"
|
||||
android:textSize="24sp"
|
||||
android:background="#F0F0F0"
|
||||
android:textColor="#333333" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 4: 000, 0, Clear -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_00"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="000"
|
||||
android:textSize="18sp"
|
||||
android:background="#F0F0F0"
|
||||
android:textColor="#333333" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_0"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="0"
|
||||
android:textSize="24sp"
|
||||
android:background="#F0F0F0"
|
||||
android:textColor="#333333" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_clear"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="⌫"
|
||||
android:textSize="20sp"
|
||||
android:background="#FF5722"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Card Result Layout -->
|
||||
<!-- Action Buttons -->
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_card_result"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<!-- Scrollable Result Area -->
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/white"
|
||||
android:elevation="2dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_result"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:text="Ready to scan card..."
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
android:textIsSelectable="true"
|
||||
android:textColor="#333333"
|
||||
android:background="@android:color/white" />
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<!-- Copy Button -->
|
||||
<Button
|
||||
android:id="@+id/btn_copy_data"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Copy Card Data"
|
||||
android:background="#4CAF50"
|
||||
android:textColor="@android:color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- Clear Button -->
|
||||
<Button
|
||||
android:id="@+id/btn_clear_data"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="Clear Data"
|
||||
android:background="#FF5722"
|
||||
android:textColor="@android:color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Main Action Button -->
|
||||
<Button
|
||||
android:id="@+id/btn_check_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="Konfirmasi"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:background="#4CAF50"
|
||||
android:textColor="@android:color/white"
|
||||
android:elevation="4dp" />
|
||||
android:background="@android:color/white"
|
||||
android:elevation="8dp">
|
||||
|
||||
<!-- Primary Actions Row -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_copy_data"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="COPY DATA"
|
||||
style="@style/OutlineButton"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_print_receipt"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="PRINT"
|
||||
style="@style/OutlineButton"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- New Transaction Button -->
|
||||
<Button
|
||||
android:id="@+id/btn_new_transaction"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:text="TRANSAKSI BARU"
|
||||
style="@style/PrimaryButton"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
163
app/src/main/res/layout/activity_emv_transaction.xml
Normal file
163
app/src/main/res/layout/activity_emv_transaction.xml
Normal file
@ -0,0 +1,163 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/colorBackground"
|
||||
tools:context=".kredit.EmvTransactionActivity">
|
||||
|
||||
<!-- Toolbar -->
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/primary_blue"
|
||||
android:theme="@style/CustomToolbarTheme"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<!-- Content Container -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Amount Display Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardBackgroundColor="@color/primary_blue">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:src="@drawable/ic_credit_card"
|
||||
app:tint="@android:color/white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount_display"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Nominal: Rp 0,00"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/white"
|
||||
android:fontFamily="@font/inter"
|
||||
android:gravity="center" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Status Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Status Transaksi"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#333333"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Card Reader Animation/Icon -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_card_reader"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:src="@drawable/ic_card_insert"
|
||||
android:scaleType="centerInside"
|
||||
app:tint="#666666" />
|
||||
|
||||
<!-- Status Text -->
|
||||
<TextView
|
||||
android:id="@+id/tv_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ready to scan card..."
|
||||
style="@style/StatusTextStyle"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Progress Indicator (Initially Hidden) -->
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
android:indeterminateTint="@color/primary_blue" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<!-- Main Action Button -->
|
||||
<Button
|
||||
android:id="@+id/btn_action"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:text="Start Scanning"
|
||||
style="@style/PrimaryButton"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<!-- Cancel Button -->
|
||||
<Button
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:text="BATAL"
|
||||
style="@style/OutlineButton" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Instructions -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="• Pastikan kartu dalam kondisi baik\n• Ikuti instruksi yang muncul di layar\n• Jangan cabut kartu sampai proses selesai"
|
||||
style="@style/HintTextStyle" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -31,4 +31,88 @@
|
||||
<color name="light_gray">#F5F5F5</color>
|
||||
<color name="medium_gray">#E0E0E0</color>
|
||||
<color name="dark_gray">#757575</color>
|
||||
|
||||
<!-- Alias untuk kemudahan penggunaan dalam Clean Architecture -->
|
||||
<!-- Menggunakan warna yang sudah ada -->
|
||||
|
||||
<!-- Button Colors -->
|
||||
<color name="button_primary">@color/primary_blue</color>
|
||||
<color name="button_primary_pressed">@color/colorPrimaryDark</color>
|
||||
<color name="button_secondary">@color/white</color>
|
||||
<color name="button_outline_text">@color/primary_blue</color>
|
||||
<color name="button_disabled">@color/medium_gray</color>
|
||||
|
||||
<!-- Background Colors -->
|
||||
<color name="background_main">@color/colorBackground</color>
|
||||
<color name="background_card">@color/white</color>
|
||||
<color name="background_surface">@color/white</color>
|
||||
|
||||
<!-- Text Colors -->
|
||||
<color name="text_primary">@color/colorTextTitle</color>
|
||||
<color name="text_secondary">@color/colorTextContent</color>
|
||||
<color name="text_hint">@color/colorTextHelp</color>
|
||||
<color name="text_disabled">@color/C999999</color>
|
||||
<color name="text_on_primary">@color/white</color>
|
||||
|
||||
<!-- Status Colors -->
|
||||
<color name="status_success">@color/accent_green</color>
|
||||
<color name="status_error">@color/FD5A52</color>
|
||||
<color name="status_warning">@color/colorOrange</color>
|
||||
<color name="status_info">@color/light_blue</color>
|
||||
|
||||
<!-- EMV Processing Colors -->
|
||||
<color name="emv_processing">@color/colorOrange</color>
|
||||
<color name="emv_success">@color/accent_green</color>
|
||||
<color name="emv_error">@color/FD5A52</color>
|
||||
<color name="emv_idle">@color/dark_gray</color>
|
||||
|
||||
<!-- Card Colors -->
|
||||
<color name="card_background">@color/white</color>
|
||||
<color name="card_shadow">@color/medium_gray</color>
|
||||
<color name="card_border">@color/colorLineColor</color>
|
||||
|
||||
<!-- Amount Display Colors -->
|
||||
<color name="amount_primary">@color/primary_blue</color>
|
||||
<color name="amount_background">@color/light_blue</color>
|
||||
<color name="amount_success">@color/accent_green</color>
|
||||
|
||||
<!-- Border and Divider Colors -->
|
||||
<color name="border_light">@color/colorLineColor</color>
|
||||
<color name="border_medium">@color/medium_gray</color>
|
||||
<color name="border_dark">@color/dark_gray</color>
|
||||
|
||||
<!-- Overlay and Shadow Colors -->
|
||||
<color name="overlay_light">@color/transparent</color>
|
||||
<color name="overlay_dark">@color/transparent</color>
|
||||
<color name="shadow_color">@color/medium_gray</color>
|
||||
|
||||
<!-- Transaction Flow Colors -->
|
||||
<color name="transaction_amount">@color/primary_blue</color>
|
||||
<color name="transaction_success">@color/accent_green</color>
|
||||
<color name="transaction_processing">@color/colorOrange</color>
|
||||
<color name="transaction_failed">@color/FD5A52</color>
|
||||
|
||||
<!-- Keypad Colors -->
|
||||
<color name="keypad_button_text">@color/colorTextTitle</color>
|
||||
<color name="keypad_button_background">@color/white</color>
|
||||
<color name="keypad_button_pressed">@color/light_gray</color>
|
||||
|
||||
<!-- PIN Pad Colors -->
|
||||
<color name="pinpad_background">@color/primary_blue</color>
|
||||
<color name="pinpad_text">@color/white</color>
|
||||
<color name="pinpad_button">@color/white</color>
|
||||
<color name="pinpad_button_pressed">@color/light_gray</color>
|
||||
|
||||
<!-- Navigation Colors -->
|
||||
<color name="toolbar_background">@color/primary_blue</color>
|
||||
<color name="toolbar_text">@color/white</color>
|
||||
<color name="navigation_background">@color/white</color>
|
||||
|
||||
<!-- Icon Colors -->
|
||||
<color name="icon_primary">@color/primary_blue</color>
|
||||
<color name="icon_secondary">@color/dark_gray</color>
|
||||
<color name="icon_success">@color/accent_green</color>
|
||||
<color name="icon_error">@color/FD5A52</color>
|
||||
<color name="icon_on_primary">@color/white</color>
|
||||
|
||||
</resources>
|
@ -50,4 +50,172 @@
|
||||
<item name="android:focusable">true</item>
|
||||
</style>
|
||||
|
||||
<!-- Additional Styles for Clean Architecture -->
|
||||
|
||||
<!-- Keypad Button Styles untuk CreateTransaction -->
|
||||
<style name="KeypadButton">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">56dp</item>
|
||||
<item name="android:layout_columnWeight">1</item>
|
||||
<item name="android:layout_margin">4dp</item>
|
||||
<item name="android:background">?attr/selectableItemBackground</item>
|
||||
<item name="android:textColor">@color/colorTextTitle</item>
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:focusable">true</item>
|
||||
<item name="android:elevation">2dp</item>
|
||||
</style>
|
||||
|
||||
<style name="KeypadButtonSecondary" parent="KeypadButton">
|
||||
<item name="android:textColor">@color/dark_gray</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
<!-- Button Styles -->
|
||||
<style name="PrimaryButton">
|
||||
<item name="android:background">@color/primary_blue</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:elevation">4dp</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:focusable">true</item>
|
||||
<item name="android:padding">12dp</item>
|
||||
</style>
|
||||
|
||||
<style name="SecondaryButton">
|
||||
<item name="android:background">@color/white</item>
|
||||
<item name="android:textColor">@color/primary_blue</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:focusable">true</item>
|
||||
<item name="android:padding">12dp</item>
|
||||
</style>
|
||||
|
||||
<style name="OutlineButton">
|
||||
<item name="android:background">?attr/selectableItemBackground</item>
|
||||
<item name="android:textColor">@color/primary_blue</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:focusable">true</item>
|
||||
<item name="android:padding">12dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Text Styles -->
|
||||
<style name="HeaderTextStyle">
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/colorTextTitle</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="SubHeaderTextStyle">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/colorTextContent</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
</style>
|
||||
|
||||
<style name="BodyTextStyle">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textColor">@color/colorTextTitle</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:lineSpacingExtra">2dp</item>
|
||||
</style>
|
||||
|
||||
<style name="MonospaceTextStyle" parent="BodyTextStyle">
|
||||
<item name="android:fontFamily">monospace</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:textColor">@color/colorTextContent</item>
|
||||
</style>
|
||||
|
||||
<style name="HintTextStyle">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textColor">@color/colorTextHelp</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:lineSpacingExtra">2dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Amount Display Style -->
|
||||
<style name="AmountDisplayStyle">
|
||||
<item name="android:textSize">32sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/primary_blue</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<!-- Status Text Style -->
|
||||
<style name="StatusTextStyle">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textColor">@color/colorTextTitle</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:lineSpacingExtra">4dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Success Text Style -->
|
||||
<style name="SuccessTextStyle">
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<!-- Card Title Style -->
|
||||
<style name="CardTitleStyle">
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/colorTextTitle</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:layout_marginBottom">16dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Mode Indicator Style -->
|
||||
<style name="ModeIndicatorStyle">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textColor">@color/colorTextContent</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<!-- Transaction Summary Style -->
|
||||
<style name="TransactionSummaryStyle">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textColor">@color/colorTextContent</item>
|
||||
<item name="android:fontFamily">monospace</item>
|
||||
<item name="android:lineSpacingExtra">2dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Amount Card Style -->
|
||||
<style name="AmountCardStyle">
|
||||
<item name="android:background">@color/primary_blue</item>
|
||||
<item name="android:padding">20dp</item>
|
||||
<item name="android:elevation">4dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Success Card Style -->
|
||||
<style name="SuccessCardStyle">
|
||||
<item name="android:background">@color/accent_green</item>
|
||||
<item name="android:padding">20dp</item>
|
||||
<item name="android:elevation">4dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Data Card Style -->
|
||||
<style name="DataCardStyle">
|
||||
<item name="android:background">@color/white</item>
|
||||
<item name="android:padding">20dp</item>
|
||||
<item name="android:elevation">4dp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user