diff --git a/app/src/main/java/com/example/bdkipoc/cetakulang/ReprintActivity.java b/app/src/main/java/com/example/bdkipoc/cetakulang/ReprintActivity.java
index 2030876..38718a6 100644
--- a/app/src/main/java/com/example/bdkipoc/cetakulang/ReprintActivity.java
+++ b/app/src/main/java/com/example/bdkipoc/cetakulang/ReprintActivity.java
@@ -102,7 +102,7 @@ public class ReprintActivity extends AppCompatActivity implements ReprintAdapter
initViews();
// Setup toolbar
- setupToolbar();
+ setupAppbar();
// Setup RecyclerView
setupRecyclerView();
@@ -144,19 +144,18 @@ public class ReprintActivity extends AppCompatActivity implements ReprintAdapter
StyleHelper.applyPaginationButtonStyle(btnLastPage, this, false);
}
- private void setupToolbar() {
- Toolbar toolbar = findViewById(R.id.toolbar);
- setSupportActionBar(toolbar);
-
- // Hide default title since we're using custom layout
- if (getSupportActionBar() != null) {
- getSupportActionBar().setDisplayShowTitleEnabled(false);
- getSupportActionBar().setDisplayHomeAsUpEnabled(false);
+ private void setupAppbar() {
+ // Setup back navigation click listener
+ LinearLayout backNavigation = findViewById(R.id.back_navigation);
+ if (backNavigation != null) {
+ backNavigation.setOnClickListener(v -> finish());
}
- // Setup custom back button
- ImageView backButton = findViewById(R.id.backButton);
- backButton.setOnClickListener(v -> finish());
+ // Alternative: You can also set click listener on the back arrow directly
+ ImageView backArrow = findViewById(R.id.backArrow);
+ if (backArrow != null) {
+ backArrow.setOnClickListener(v -> finish());
+ }
}
private void setupRecyclerView() {
@@ -615,7 +614,7 @@ public class ReprintActivity extends AppCompatActivity implements ReprintAdapter
int apiPage = pageToLoad - 1; // API uses 0-based indexing
String urlString = "https://be-edc.msvc.app/transactions?page=" + apiPage +
- "&limit=" + itemsPerPage + "&sortOrder=DESC&from_date=" + fromDate + "&to_date=" + toDate + "&location_id=0&merchant_id=0&tid=73001500&mid=71000026521&sortColumn=created_at";
+ "&limit=" + itemsPerPage + "&sortOrder=DESC&from_date=" + fromDate + "&to_date=" + toDate + "&location_id=0&merchant_id=0&tid=&mid=&sortColumn=created_at";
Log.d("ReprintActivity", "🔍 Fetching transactions page " + pageToLoad +
" (API page " + apiPage + ") with limit " + itemsPerPage + " - SORT: DESC by created_at" +
@@ -1169,15 +1168,6 @@ public class ReprintActivity extends AppCompatActivity implements ReprintAdapter
}
}
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- if (item.getItemId() == android.R.id.home) {
- finish();
- return true;
- }
- return super.onOptionsItemSelected(item);
- }
-
// Transaction model class
static class Transaction {
int id;
diff --git a/app/src/main/res/layout/activity_reprint.xml b/app/src/main/res/layout/activity_reprint.xml
index 1d4ab03..0468223 100644
--- a/app/src/main/res/layout/activity_reprint.xml
+++ b/app/src/main/res/layout/activity_reprint.xml
@@ -4,301 +4,198 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ android:background="@android:color/white"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"
+ android:layout_marginTop="50dp">
-
+
+
+
+
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_marginBottom="16dp"
+ android:weightSum="10">
-
+
-
-
+ android:paddingStart="12dp"
+ android:paddingEnd="12dp"
+ android:layout_marginEnd="8dp">
+ android:imeOptions="actionSearch" />
-
+
+ android:focusable="true">
+ android:src="@android:drawable/ic_menu_sort_by_size"
+ android:tint="#666666" />
+ android:textSize="12sp"
+ android:gravity="center"
+ android:layout_marginStart="4dp"
+ android:visibility="gone" />
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+ android:scrollbars="vertical" />
+
+
+
+
+
+ android:visibility="gone">
-
-
-
-
-
-
-
+
+ android:gravity="center">
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+