modif settlement
This commit is contained in:
parent
72b39fd9c8
commit
a49aab14f8
@ -49,7 +49,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
// Tambahkan semua buildConfigField yang dibutuhkan
|
||||
buildConfigField "int", "MAX_REFRESH_ATTEMPTS", "5"
|
||||
buildConfigField "int", "MAX_REFRESH_ATTEMPTS", "3"
|
||||
buildConfigField "int", "DEFAULT_QR_EXPIRATION_MINUTES", "15"
|
||||
buildConfigField "String", "MIDTRANS_SANDBOX_AUTH", "\"Basic U0ItTWlkLXNlcnZlci1PM2t1bXkwVDl4M1VvYnVvVTc3NW5QbXc=\""
|
||||
buildConfigField "String", "MIDTRANS_PRODUCTION_AUTH", "\"TWlkLXNlcnZlci1sMlZPalotdVlVanpvNnU4VzAtYmF1a2o=\""
|
||||
|
@ -8,6 +8,7 @@ import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.LinearLayout;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
@ -37,7 +38,7 @@ public class SettlementActivity extends AppCompatActivity {
|
||||
private RecyclerView recyclerView;
|
||||
private SettlementAdapter adapter;
|
||||
private List<SettlementItem> settlementList;
|
||||
private ImageView btnBack;
|
||||
private LinearLayout backNavigation; // Changed from ImageView btnBack
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@ -125,7 +126,7 @@ public class SettlementActivity extends AppCompatActivity {
|
||||
tvTotalAmount = findViewById(R.id.tv_total_amount);
|
||||
tvTotalTransactions = findViewById(R.id.tv_total_transactions);
|
||||
recyclerView = findViewById(R.id.recycler_view);
|
||||
btnBack = findViewById(R.id.btn_back);
|
||||
backNavigation = findViewById(R.id.back_navigation); // Updated to use back_navigation from appbar
|
||||
|
||||
settlementList = new ArrayList<>();
|
||||
}
|
||||
@ -137,7 +138,8 @@ public class SettlementActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void setupClickListeners() {
|
||||
btnBack.setOnClickListener(new View.OnClickListener() {
|
||||
// Updated to use backNavigation instead of btnBack
|
||||
backNavigation.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
|
@ -3,115 +3,102 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F5F5F5"
|
||||
android:background="#FFFFFF"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Header with solid red background -->
|
||||
<RelativeLayout
|
||||
<!-- Custom AppBar -->
|
||||
<include layout="@layout/component_appbar" />
|
||||
|
||||
<!-- Settlement Card positioned to overlap -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:background="#E53E3E">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="-70dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp">
|
||||
|
||||
<!-- Back button -->
|
||||
<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" />
|
||||
|
||||
<!-- Settlement Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="64dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#4299E1"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#4299E1"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
<!-- SETTLEMENT Title -->
|
||||
<TextView
|
||||
android:id="@+id/settlement_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SETTLEMENT"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SETTLEMENT"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<!-- Description -->
|
||||
<TextView
|
||||
android:id="@+id/settlement_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="Rekap dan kirim transaksi hari ini"
|
||||
android:textColor="#E0FFFFFF"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textStyle="normal"
|
||||
app:layout_constraintTop_toBottomOf="@id/settlement_title"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="Rekap dan kirim transaksi hari ini"
|
||||
android:textColor="#E0FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
<!-- Total Amount -->
|
||||
<TextView
|
||||
android:id="@+id/tv_total_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="3.506.500"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="24sp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@id/settlement_desc"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_total_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="3.506.500"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold" />
|
||||
<!-- Transaction Count Label -->
|
||||
<TextView
|
||||
android:id="@+id/label_jumlah"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Jumlah Transaksi"
|
||||
android:textColor="#E0FFFFFF"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textStyle="normal"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_total_amount"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:orientation="horizontal">
|
||||
<!-- Transaction Count Value -->
|
||||
<TextView
|
||||
android:id="@+id/tv_total_transactions"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="65"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="20sp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@id/label_jumlah"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Jumlah Transaksi"
|
||||
android:textColor="#E0FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_total_transactions"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="65"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Content -->
|
||||
<!-- Content Section -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
@ -119,6 +106,7 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Main Title -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -126,22 +114,27 @@
|
||||
android:text="Informasi Ringkasan Transaksi Hari Ini"
|
||||
android:textColor="#333333"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- Description Text -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="Pastikan Anda melakukan settlement untuk menyelesaikan transaksi harian."
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textStyle="normal" />
|
||||
|
||||
<!-- Transaction List -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -155,6 +148,9 @@
|
||||
android:text="Selanjutnya"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
android:fontFamily="@font/inter"
|
||||
android:textStyle="bold"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
</LinearLayout>
|
@ -7,25 +7,41 @@
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
android:padding="16dp"
|
||||
android:layout_marginBottom="1dp">
|
||||
|
||||
<!-- Icon -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
<!-- Icon Container -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="#F7FAFC"
|
||||
android:padding="8dp"
|
||||
android:src="@android:drawable/ic_menu_gallery"
|
||||
app:tint="#E53E3E" />
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginEnd="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F7FAFC"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@android:drawable/ic_menu_gallery"
|
||||
app:tint="#E53E3E" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Content -->
|
||||
<!-- Content Section -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -35,11 +51,12 @@
|
||||
android:text="Kartu Kredit"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Amount and Count -->
|
||||
<!-- Amount and Transaction Count -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -54,6 +71,7 @@
|
||||
android:text="Rp. 200.000"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
@ -64,8 +82,10 @@
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="13 Transaksi"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textStyle="normal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user