implement History
This commit is contained in:
parent
6660fca373
commit
3ac3598359
@ -8,8 +8,10 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
import android.graphics.Color;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
@ -39,12 +41,12 @@ public class HistoryActivity extends AppCompatActivity {
|
|||||||
private RecyclerView recyclerView;
|
private RecyclerView recyclerView;
|
||||||
private HistoryAdapter adapter;
|
private HistoryAdapter adapter;
|
||||||
private List<HistoryItem> historyList;
|
private List<HistoryItem> historyList;
|
||||||
private ImageView btnBack;
|
private LinearLayout backNavigation;
|
||||||
|
|
||||||
// Store full data for detail view
|
// Store full data for detail view
|
||||||
private static List<HistoryItem> fullHistoryData = new ArrayList<>();
|
private static List<HistoryItem> fullHistoryData = new ArrayList<>();
|
||||||
|
|
||||||
private String API_URL = "https://be-edc.msvc.app/transactions?page=0&limit=50&sortOrder=DESC&from_date=2025-05-10&to_date=2025-05-21&location_id=0&merchant_id=0&sortColumn=id";
|
private String API_URL;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@ -53,17 +55,37 @@ public class HistoryActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
initViews();
|
initViews();
|
||||||
setupRecyclerView();
|
setupRecyclerView();
|
||||||
|
buildApiUrl();
|
||||||
fetchApiData();
|
fetchApiData();
|
||||||
setupClickListeners();
|
setupClickListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void buildApiUrl() {
|
||||||
|
// Option 1: Get today's date (current implementation)
|
||||||
|
// SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault());
|
||||||
|
// String todayDate = dateFormat.format(new Date());
|
||||||
|
|
||||||
|
// Option 2: Set specific date (uncomment and modify if needed)
|
||||||
|
String specificDate = "2025-06-27"; // Format: yyyy-MM-dd
|
||||||
|
String todayDate = specificDate;
|
||||||
|
|
||||||
|
// Option 3: Set date using Calendar for specific date
|
||||||
|
// Calendar calendar = Calendar.getInstance();
|
||||||
|
// calendar.set(2025, Calendar.JUNE, 27); // Year, Month (0-based), Day
|
||||||
|
// String todayDate = dateFormat.format(calendar.getTime());
|
||||||
|
|
||||||
|
// Build API URL with date as both from_date and to_date, and limit=10
|
||||||
|
API_URL = "https://be-edc.msvc.app/transactions?page=0&limit=10&sortOrder=DESC&from_date="
|
||||||
|
+ todayDate + "&to_date=" + todayDate + "&location_id=0&merchant_id=0&tid=&mid=&sortColumn=id";
|
||||||
|
}
|
||||||
|
|
||||||
private void initViews() {
|
private void initViews() {
|
||||||
tvTotalAmount = findViewById(R.id.tv_total_amount);
|
tvTotalAmount = findViewById(R.id.tv_total_amount);
|
||||||
tvTotalTransactions = findViewById(R.id.tv_total_transactions);
|
tvTotalTransactions = findViewById(R.id.tv_total_transactions);
|
||||||
btnLihatDetailTop = findViewById(R.id.btn_lihat_detail);
|
btnLihatDetailTop = findViewById(R.id.btn_lihat_detail);
|
||||||
btnLihatDetailBottom = findViewById(R.id.btn_lihat_detail_bottom);
|
btnLihatDetailBottom = findViewById(R.id.btn_lihat_detail_bottom);
|
||||||
recyclerView = findViewById(R.id.recycler_view);
|
recyclerView = findViewById(R.id.recycler_view);
|
||||||
btnBack = findViewById(R.id.btn_back);
|
backNavigation = findViewById(R.id.back_navigation);
|
||||||
|
|
||||||
historyList = new ArrayList<>();
|
historyList = new ArrayList<>();
|
||||||
}
|
}
|
||||||
@ -75,7 +97,7 @@ public class HistoryActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setupClickListeners() {
|
private void setupClickListeners() {
|
||||||
btnBack.setOnClickListener(new View.OnClickListener() {
|
backNavigation.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
finish();
|
finish();
|
||||||
@ -139,14 +161,10 @@ public class HistoryActivity extends AppCompatActivity {
|
|||||||
historyItem.setFullDate(transactionDate);
|
historyItem.setFullDate(transactionDate);
|
||||||
historyItem.setChannelCode(channelCode);
|
historyItem.setChannelCode(channelCode);
|
||||||
|
|
||||||
// Add to full data
|
// Add to both lists (since we're limiting to 10 in API call)
|
||||||
|
historyList.add(historyItem);
|
||||||
fullHistoryData.add(historyItem);
|
fullHistoryData.add(historyItem);
|
||||||
|
|
||||||
// Add first 10 to display list
|
|
||||||
if (i < 10) {
|
|
||||||
historyList.add(historyItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
totalAmountArray[0] += (long) amountValue;
|
totalAmountArray[0] += (long) amountValue;
|
||||||
totalTransactionsArray[0]++;
|
totalTransactionsArray[0]++;
|
||||||
}
|
}
|
||||||
@ -180,24 +198,35 @@ public class HistoryActivity extends AppCompatActivity {
|
|||||||
historyList.clear();
|
historyList.clear();
|
||||||
fullHistoryData.clear();
|
fullHistoryData.clear();
|
||||||
|
|
||||||
// Create sample data
|
// Get today's date for sample data
|
||||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy", Locale.getDefault());
|
||||||
|
SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm", Locale.getDefault());
|
||||||
|
Date now = new Date();
|
||||||
|
String todayDate = dateFormat.format(now);
|
||||||
|
String currentTime = timeFormat.format(now);
|
||||||
|
|
||||||
|
// Create sample data with today's date - limit to 10 items
|
||||||
HistoryItem[] sampleData = {
|
HistoryItem[] sampleData = {
|
||||||
new HistoryItem("03:44", "11-05-2025", 2018619, "Kredit", "FAILED", "197870"),
|
new HistoryItem("08:30", todayDate, 1500000, "QRIS", "SUCCESS", "TXN001"),
|
||||||
new HistoryItem("03:10", "12-05-2025", 3974866, "QRIS", "SUCCESS", "053059"),
|
new HistoryItem("09:15", todayDate, 750000, "Debit", "SUCCESS", "TXN002"),
|
||||||
new HistoryItem("15:17", "13-05-2025", 2418167, "QRIS", "FAILED", "668320"),
|
new HistoryItem("10:20", todayDate, 2250000, "QRIS", "FAILED", "TXN003"),
|
||||||
new HistoryItem("12:09", "11-05-2025", 3429230, "Debit", "FAILED", "454790"),
|
new HistoryItem("11:45", todayDate, 980000, "Kredit", "SUCCESS", "TXN004"),
|
||||||
new HistoryItem("08:39", "10-05-2025", 4656447, "QRIS", "FAILED", "454248"),
|
new HistoryItem("12:30", todayDate, 1800000, "QRIS", "SUCCESS", "TXN005"),
|
||||||
new HistoryItem("00:35", "12-05-2025", 3507704, "QRIS", "FAILED", "301644"),
|
new HistoryItem("13:15", todayDate, 650000, "Debit", "FAILED", "TXN006"),
|
||||||
new HistoryItem("22:43", "13-05-2025", 4277904, "Debit", "SUCCESS", "388709"),
|
new HistoryItem("14:00", todayDate, 3200000, "QRIS", "SUCCESS", "TXN007"),
|
||||||
new HistoryItem("18:16", "11-05-2025", 4456904, "Debit", "FAILED", "986861")
|
new HistoryItem("15:30", todayDate, 1100000, "Kredit", "SUCCESS", "TXN008"),
|
||||||
|
new HistoryItem("16:45", todayDate, 890000, "Debit", "FAILED", "TXN009"),
|
||||||
|
new HistoryItem("17:20", todayDate, 2100000, "QRIS", "SUCCESS", "TXN010")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
long totalAmount = 0;
|
||||||
for (HistoryItem item : sampleData) {
|
for (HistoryItem item : sampleData) {
|
||||||
historyList.add(item);
|
historyList.add(item);
|
||||||
fullHistoryData.add(item);
|
fullHistoryData.add(item);
|
||||||
|
totalAmount += item.getAmount();
|
||||||
}
|
}
|
||||||
|
|
||||||
tvTotalAmount.setText("RP 36.166.829");
|
tvTotalAmount.setText("RP " + formatCurrency(totalAmount));
|
||||||
tvTotalTransactions.setText("10");
|
tvTotalTransactions.setText("10");
|
||||||
|
|
||||||
adapter.notifyDataSetChanged();
|
adapter.notifyDataSetChanged();
|
||||||
@ -235,7 +264,9 @@ public class HistoryActivity extends AppCompatActivity {
|
|||||||
Date date = inputFormat.parse(isoDate);
|
Date date = inputFormat.parse(isoDate);
|
||||||
return outputFormat.format(date);
|
return outputFormat.format(date);
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
return "01-01-2025";
|
// Return today's date as fallback
|
||||||
|
SimpleDateFormat fallbackFormat = new SimpleDateFormat("dd-MM-yyyy", Locale.getDefault());
|
||||||
|
return fallbackFormat.format(new Date());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,21 +397,24 @@ class HistoryAdapter extends RecyclerView.Adapter<HistoryAdapter.HistoryViewHold
|
|||||||
public void onBindViewHolder(@NonNull HistoryViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull HistoryViewHolder holder, int position) {
|
||||||
HistoryItem item = historyList.get(position);
|
HistoryItem item = historyList.get(position);
|
||||||
|
|
||||||
holder.tvTime.setText(item.getTime() + ", " + item.getDate());
|
// Format time with dots instead of colons (09.00 instead of 09:00)
|
||||||
|
String formattedTime = item.getTime().replace(":", ".");
|
||||||
|
holder.tvTime.setText(formattedTime + ", " + item.getDate());
|
||||||
|
|
||||||
holder.tvAmount.setText("Rp. " + formatCurrency(item.getAmount()));
|
holder.tvAmount.setText("Rp. " + formatCurrency(item.getAmount()));
|
||||||
holder.tvChannel.setText(item.getChannelName());
|
holder.tvChannel.setText(item.getChannelName());
|
||||||
|
|
||||||
// Set status color
|
// Set status color and text
|
||||||
String status = item.getStatus();
|
String status = item.getStatus();
|
||||||
if ("SUCCESS".equals(status)) {
|
if ("SUCCESS".equals(status)) {
|
||||||
holder.tvStatus.setText("Berhasil");
|
holder.tvStatus.setText("Berhasil");
|
||||||
holder.tvStatus.setTextColor(0xFF4CAF50); // Green
|
holder.tvStatus.setTextColor(Color.parseColor("#4CAF50")); // Green
|
||||||
} else if ("FAILED".equals(status)) {
|
} else if ("FAILED".equals(status)) {
|
||||||
holder.tvStatus.setText("Gagal");
|
holder.tvStatus.setText("Gagal");
|
||||||
holder.tvStatus.setTextColor(0xFFF44336); // Red
|
holder.tvStatus.setTextColor(Color.parseColor("#F44336")); // Red
|
||||||
} else {
|
} else {
|
||||||
holder.tvStatus.setText("Tertunda");
|
holder.tvStatus.setText("Tertunda");
|
||||||
holder.tvStatus.setTextColor(0xFFFF9800); // Orange
|
holder.tvStatus.setTextColor(Color.parseColor("#FF9800")); // Orange
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<solid android:color="#3498DB" />
|
|
||||||
<corners android:radius="12dp" />
|
<!-- Warna solid (biru cerah seperti #4299E1) -->
|
||||||
<stroke android:width="0dp" />
|
<solid android:color="#4299E1" />
|
||||||
</shape>
|
|
||||||
|
<!-- Sudut melengkung -->
|
||||||
|
<corners android:radius="16dp" />
|
||||||
|
|
||||||
|
<!-- Hilangkan stroke jika tidak dibutuhkan -->
|
||||||
|
<stroke android:width="0dp" android:color="#00000000" />
|
||||||
|
</shape>
|
||||||
|
@ -3,137 +3,125 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#F5F5F5"
|
android:background="#FFFFFF"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- Header with red background -->
|
<!-- Custom AppBar -->
|
||||||
<RelativeLayout
|
<include layout="@layout/component_appbar" />
|
||||||
|
|
||||||
|
<!-- History Card -->
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
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_width="match_parent"
|
||||||
android:layout_height="200dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="#E53E3E">
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="-70dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="11dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="6dp">
|
||||||
|
|
||||||
<!-- Back button -->
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
<ImageView
|
|
||||||
android:id="@+id/btn_back"
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:padding="4dp"
|
|
||||||
android:src="@android:drawable/ic_menu_revert"
|
|
||||||
app:tint="@android:color/white" />
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Title -->
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_toEndOf="@id/btn_back"
|
|
||||||
android:text="Kembali"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<!-- History Card -->
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="120dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:background="@drawable/card_background"
|
||||||
android:layout_marginTop="64dp"
|
android:padding="16dp">
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
app:cardCornerRadius="12dp"
|
|
||||||
app:cardElevation="4dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
<!-- Judul -->
|
||||||
android:layout_width="match_parent"
|
<TextView
|
||||||
android:layout_height="match_parent"
|
android:id="@+id/title"
|
||||||
android:background="#4299E1"
|
android:layout_width="wrap_content"
|
||||||
android:orientation="vertical"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp">
|
android:text="Transaksi Hari Ini"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
<LinearLayout
|
<!-- Lihat Detail -->
|
||||||
android:layout_width="match_parent"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
android:id="@+id/btn_lihat_detail"
|
||||||
android:orientation="horizontal">
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Lihat Detail"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:padding="8dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintVertical_bias="0.5" />
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
<!-- Label Total Transaksi -->
|
||||||
android:layout_width="wrap_content"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
android:id="@+id/label_total"
|
||||||
android:text="Transaksi Hari Ini"
|
android:layout_width="wrap_content"
|
||||||
android:textColor="@android:color/white"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
android:layout_marginTop="16dp"
|
||||||
android:textStyle="bold" />
|
android:text="Total Transaksi"
|
||||||
|
android:textColor="#E0FFFFFF"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:textStyle="normal"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/title"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<!-- Nilai Total Transaksi -->
|
||||||
android:layout_width="wrap_content"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
android:id="@+id/tv_total_amount"
|
||||||
android:layout_marginTop="2dp"
|
android:layout_width="wrap_content"
|
||||||
android:text="Total Transaksi"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="#E0FFFFFF"
|
android:layout_marginTop="4dp"
|
||||||
android:textSize="12sp" />
|
android:text="RP 0"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/label_total"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<!-- Label Jumlah Transaksi -->
|
||||||
android:id="@+id/tv_total_amount"
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/label_jumlah"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_height="wrap_content"
|
||||||
android:text="RP 4.500.000"
|
android:layout_marginTop="12dp"
|
||||||
android:textColor="@android:color/white"
|
android:text="Jumlah Transaksi"
|
||||||
android:textSize="20sp"
|
android:textColor="#E0FFFFFF"
|
||||||
android:textStyle="bold" />
|
android:fontFamily="@font/inter"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textSize="10sp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_total_amount"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<!-- Nilai Jumlah Transaksi -->
|
||||||
android:layout_width="wrap_content"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
android:id="@+id/tv_total_transactions"
|
||||||
android:layout_marginTop="2dp"
|
android:layout_width="wrap_content"
|
||||||
android:text="Jumlah Transaksi"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="#E0FFFFFF"
|
android:text="0"
|
||||||
android:textSize="12sp" />
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/label_jumlah"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
<TextView
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:id="@+id/tv_total_transactions"
|
</androidx.cardview.widget.CardView>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="30"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/btn_lihat_detail"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:text="Lihat Detail"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -145,10 +133,11 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="2dp"
|
||||||
android:text="Transaksi Terbaru"
|
android:text="Transaksi Terbaru"
|
||||||
android:textColor="#333333"
|
android:textColor="#000000"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<!-- Transaction List -->
|
<!-- Transaction List -->
|
||||||
@ -170,6 +159,8 @@
|
|||||||
android:text="Lihat Detail"
|
android:text="Lihat Detail"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold" />
|
android:fontFamily="@font/inter"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:cornerRadius="8dp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -3,67 +3,70 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/white"
|
android:background="@android:color/white"
|
||||||
android:clickable="true"
|
android:orientation="vertical">
|
||||||
android:focusable="true"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<!-- Left Content -->
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:orientation="horizontal"
|
||||||
android:orientation="vertical">
|
android:padding="12dp"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<!-- Tanggal -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_time"
|
android:id="@+id/tv_time"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="09:00, 07-05-2025"
|
android:layout_weight="2"
|
||||||
android:textColor="#333333"
|
android:text="H:mm, dd MMM yyyy"
|
||||||
android:textSize="14sp" />
|
android:textColor="#000000"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<!-- Jumlah -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_amount"
|
android:id="@+id/tv_amount"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_weight="2"
|
||||||
android:text="Rp. 78.000"
|
android:text="Rp. 0"
|
||||||
android:textColor="#333333"
|
android:textColor="#000000"
|
||||||
android:textSize="14sp"
|
android:fontFamily="@font/inter"
|
||||||
android:textStyle="bold" />
|
android:textStyle="normal"
|
||||||
|
android:textSize="10sp"
|
||||||
</LinearLayout>
|
android:gravity="center_horizontal" />
|
||||||
|
|
||||||
<!-- Center Content -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
|
<!-- Channel -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_channel"
|
android:id="@+id/tv_channel"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Kredit"
|
android:layout_weight="1.5"
|
||||||
android:textColor="#333333"
|
android:text="-"
|
||||||
android:textSize="14sp"
|
android:textColor="#000000"
|
||||||
android:textStyle="bold" />
|
android:fontFamily="@font/inter"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:gravity="center_horizontal" />
|
||||||
|
|
||||||
|
<!-- Status -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_status"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:text="-"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:gravity="end" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Right Content -->
|
<!-- Garis pemisah -->
|
||||||
<TextView
|
<View
|
||||||
android:id="@+id/tv_status"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="1dp"
|
||||||
android:layout_height="wrap_content"
|
android:background="#DDDDDD" />
|
||||||
android:layout_gravity="center_vertical"
|
</LinearLayout>
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:text="Berhasil"
|
|
||||||
android:textColor="#4CAF50"
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user