ui fix
This commit is contained in:
parent
7c266677e7
commit
7e2a589636
@ -13,6 +13,7 @@ import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import com.kizzy.xpay.util.Sign;
|
||||
import com.utsmm.kbz.ui.qr_pay.QRRefund;
|
||||
import com.utsmyanmar.baselib.network.model.DemoQRRequest;
|
||||
import com.utsmyanmar.baselib.network.model.DemoQRResponse;
|
||||
import com.utsmyanmar.baselib.network.model.DemoQRReturnRequest;
|
||||
@ -296,6 +297,7 @@ public class KPayViewModel extends ViewModel {
|
||||
|
||||
private TradeData tradeData;
|
||||
private PayDetail payDetail;
|
||||
private QRRefund qrRefund;
|
||||
|
||||
public void setTradeData(TradeData tradeData){
|
||||
this.tradeData = tradeData;
|
||||
@ -309,6 +311,12 @@ public class KPayViewModel extends ViewModel {
|
||||
public void setPayDetail(PayDetail payDetail) {
|
||||
this.payDetail = payDetail;
|
||||
}
|
||||
public void setQrRefund(QRRefund qrRefund) {
|
||||
this.qrRefund = qrRefund;
|
||||
}
|
||||
public QRRefund getQrRefund() {
|
||||
return qrRefund;
|
||||
}
|
||||
|
||||
public PayDetail getPayDetail() { return payDetail; }
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ public class QRPayFragment extends DataBindingFragment {
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
setToolBarTitleWithBackIcon("QR Pay");
|
||||
setToolBarTitleWithBackIcon("MMQR");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -56,7 +56,7 @@ public class QRPayFragment extends DataBindingFragment {
|
||||
protected DataBindingConfig getDataBindingConfig() {
|
||||
|
||||
List<QRPayItem> features = List.of(
|
||||
new QRPayItem("Generate QR", R.drawable.ic_qr_pay),
|
||||
new QRPayItem("Sale", R.drawable.ic_qr_pay),
|
||||
new QRPayItem("Refund", R.drawable.ic_refund),
|
||||
new QRPayItem("History", R.drawable.ic_history)
|
||||
);
|
||||
@ -64,7 +64,7 @@ public class QRPayFragment extends DataBindingFragment {
|
||||
QRPayAdapter adapter = new QRPayAdapter(features, position -> {
|
||||
QRPayItem selectedBtn = features.get(position);
|
||||
switch (selectedBtn.title){
|
||||
case "Generate QR":
|
||||
case "Sale":
|
||||
onClickQRPay();
|
||||
break;
|
||||
case "Refund":
|
||||
@ -82,12 +82,6 @@ public class QRPayFragment extends DataBindingFragment {
|
||||
return config;
|
||||
}
|
||||
|
||||
public class ClickEvent {
|
||||
public void onGenerateQRClick() { onClickQRPay(); }
|
||||
public void onRefundClick() { onClickRefund(); }
|
||||
public void onHistoryClick() { onClickHistory(); }
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int currentId() {
|
||||
return currentId;
|
||||
|
||||
@ -2,6 +2,7 @@ package com.utsmm.kbz.ui.qr_pay;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.InputFilter;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioButton;
|
||||
@ -24,12 +25,7 @@ import com.utsmm.kbz.config.Constants;
|
||||
import com.utsmm.kbz.ui.core_viewmodel.SharedViewModel;
|
||||
import com.utsmm.kbz.util.DecimalDigitsInputFilter;
|
||||
import com.utsmm.kbz.util.TransactionUtil;
|
||||
import com.utsmm.kbz.util.ecr.CoreUtils;
|
||||
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.disposables.CompositeDisposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
import com.utsmyanmar.paylibs.utils.LogUtil;
|
||||
|
||||
public class QRRefundDetailFragment extends DataBindingFragment {
|
||||
|
||||
@ -56,6 +52,7 @@ public class QRRefundDetailFragment extends DataBindingFragment {
|
||||
private static final int hostId = Constants.NAV_HOST_ID;
|
||||
private static final int currentId = R.id.qrRefundDetail;
|
||||
|
||||
|
||||
@Override
|
||||
protected void initViewModel() {
|
||||
sharedViewModel = getFragmentScopeViewModel(SharedViewModel.class);
|
||||
@ -76,7 +73,7 @@ public class QRRefundDetailFragment extends DataBindingFragment {
|
||||
|
||||
@Override
|
||||
protected int hostId() {
|
||||
return Constants.NAV_HOST_ID;
|
||||
return hostId;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -95,12 +92,10 @@ public class QRRefundDetailFragment extends DataBindingFragment {
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
setToolBarTitleWithBackIcon("KPay Refund");
|
||||
setToolBarTitleWithBackIcon("QR Refund");
|
||||
kPayViewModel.invalidAmountMsg.setValue("");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
@ -209,22 +204,18 @@ public class QRRefundDetailFragment extends DataBindingFragment {
|
||||
|
||||
QRRefund qrRefund = new QRRefund(referenceNo, refundAmountStr, originalAmountStr, refundReason);
|
||||
|
||||
// kPayViewModel.setQrRefund(qrRefund);
|
||||
kPayViewModel.setQrRefund(qrRefund);
|
||||
|
||||
} else {
|
||||
QRRefund qrRefund = new QRRefund(referenceNo, "0", etOriginalAmount.getText().toString().trim(), refundReason);
|
||||
|
||||
// kPayViewModel.setQrRefund(qrRefund);
|
||||
kPayViewModel.setQrRefund(qrRefund);
|
||||
}
|
||||
|
||||
sharedViewModel.transactionsType.setValue(TransactionsType.MMQR_REFUND);
|
||||
kPayViewModel.setPayDetail(payDetail);
|
||||
|
||||
navigateToPassword();
|
||||
routeId = R.id.action_qrRefundDetail_inputPasswordFragment;
|
||||
safeNavigateToRouteId();
|
||||
}
|
||||
}
|
||||
|
||||
public void navigateToPassword(){
|
||||
routeId = R.id.action_QRRefundDetail_to_inputPasswordFragment;
|
||||
safeNavigateToRouteId();
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,9 @@ package com.utsmm.kbz.ui.qr_pay;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@ -32,6 +34,7 @@ public class QRRefundFragment extends DataBindingFragment {
|
||||
private QRPayViewModel qrPayViewModel;
|
||||
private SharedViewModel sharedViewModel;
|
||||
private QRRefundViewAdapter adapter;
|
||||
private LinearLayout emptyStateView;
|
||||
|
||||
@Override
|
||||
protected int currentId() {
|
||||
@ -75,6 +78,7 @@ public class QRRefundFragment extends DataBindingFragment {
|
||||
RecyclerView recyclerView = view.findViewById(R.id.qrRefundHistory);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
recyclerView.setAdapter(adapter);
|
||||
emptyStateView = view.findViewById(R.id.emptyStateSectionRefund);
|
||||
observeData();
|
||||
}
|
||||
|
||||
@ -86,7 +90,14 @@ public class QRRefundFragment extends DataBindingFragment {
|
||||
if (adapter == null) {
|
||||
return;
|
||||
}
|
||||
adapter.setData(list);
|
||||
if(list == null || list.isEmpty()){
|
||||
emptyStateView.setVisibility(View.VISIBLE);
|
||||
getView().findViewById(R.id.qrRefundHistory).setVisibility(View.GONE);
|
||||
}else{
|
||||
emptyStateView.setVisibility(View.GONE);
|
||||
getView().findViewById(R.id.qrRefundHistory).setVisibility(View.VISIBLE);
|
||||
adapter.setData(list);
|
||||
}
|
||||
}
|
||||
|
||||
public class ClickEvent {
|
||||
@ -99,6 +110,6 @@ public class QRRefundFragment extends DataBindingFragment {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("payDetail", payDetail);
|
||||
routeId = R.id.action_qrRefundList_to_qrRefundDetail;
|
||||
NavHostFragment.findNavController(this).navigate(R.id.action_qrRefundList_to_qrRefundDetail, bundle);
|
||||
NavHostFragment.findNavController(this).navigate(routeId, bundle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ public class QRRefundProcessFragment extends DataBindingFragment {
|
||||
|
||||
private void initData() {
|
||||
payDetail = kPayViewModel.getPayDetail();
|
||||
// qrRefund = kPayViewModel.getQrRefund();
|
||||
qrRefund = kPayViewModel.getQrRefund();
|
||||
}
|
||||
|
||||
private void processKPayRefund(String referenceNo, String refundAmount, String originalAmount, String reason) {
|
||||
|
||||
@ -28,14 +28,14 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorBackground">
|
||||
android:background="@color/colorPrimary">
|
||||
|
||||
<!-- Banner Section (25% of screen) -->
|
||||
<!-- Banner Section -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/bannerCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_margin="24dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="8dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@ -61,273 +61,256 @@
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/gradient_overlay" />
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Main Menu Grid (3+2 layout for 5 functions) -->
|
||||
|
||||
<!-- ============ MAIN GRID 2×2 ============ -->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/menuGrid"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bannerCard"
|
||||
app:layout_constraintTop_toBottomOf="@id/bannerCard"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<!-- First Row - 3 cards -->
|
||||
<!-- Sale Card -->
|
||||
|
||||
<!-- SALE (Top Left) -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardMenuCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_margin="8dp"
|
||||
android:onClick="@{() -> click.onClickCard()}"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{() -> click.onClickCard()}"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/signOnMenuCard"
|
||||
app:layout_constraintBottom_toTopOf="@+id/qrPayMenuCard"
|
||||
app:layout_constraintWidth_percent="0.32"
|
||||
app:layout_constraintHeight_percent="0.48">
|
||||
app:layout_constraintEnd_toStartOf="@id/settlementMenuCard"
|
||||
app:layout_constraintWidth_percent="0.45"
|
||||
app:layout_constraintHeight_percent="0.45">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/primary_card_bg"
|
||||
android:padding="12dp">
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:src="@drawable/ic_sale"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:tint="@color/white" />
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_sale"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Sign On Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/signOnMenuCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{() -> click.onClickSignOn()}"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/cardMenuCard"
|
||||
app:layout_constraintEnd_toStartOf="@+id/settlementMenuCard"
|
||||
app:layout_constraintBottom_toTopOf="@+id/otherFeaturesCard"
|
||||
app:layout_constraintWidth_percent="0.32"
|
||||
app:layout_constraintHeight_percent="0.48">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/primary_card_bg"
|
||||
android:padding="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_signon"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_sign_on"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Settlement Card -->
|
||||
<!-- SETTLEMENT (Top Right) -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/settlementMenuCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_margin="8dp"
|
||||
android:onClick="@{() -> click.onClickSettlement()}"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{() -> click.onClickSettlement()}"
|
||||
app:disableBtn="@{mainViewModel.settlementStatus}"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/signOnMenuCard"
|
||||
app:layout_constraintStart_toEndOf="@id/cardMenuCard"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/otherFeaturesCard"
|
||||
app:layout_constraintWidth_percent="0.32"
|
||||
app:layout_constraintHeight_percent="0.48">
|
||||
app:layout_constraintWidth_percent="0.45"
|
||||
app:layout_constraintHeight_percent="0.45">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/primary_card_bg"
|
||||
android:padding="12dp">
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:src="@drawable/ic_settlement"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:tint="@color/white" />
|
||||
android:layout_margin="6dp"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_settlement"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Second Row - 2 cards centered -->
|
||||
<!-- QR Pay Card -->
|
||||
|
||||
<!-- SIGN ON (Bottom Left) -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/qrPayMenuCard"
|
||||
android:id="@+id/signOnMenuCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_margin="8dp"
|
||||
android:onClick="@{() -> click.onClickSignOn()}"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{() -> click.onClickQR()}"
|
||||
app:disableBtn="@{mainViewModel.kPayStatus}"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cardMenuCard"
|
||||
app:layout_constraintTop_toBottomOf="@id/cardMenuCard"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/otherFeaturesCard"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_percent="0.48"
|
||||
app:layout_constraintHeight_percent="0.48">
|
||||
app:layout_constraintEnd_toStartOf="@id/otherFeaturesCard"
|
||||
app:layout_constraintWidth_percent="0.45"
|
||||
app:layout_constraintHeight_percent="0.45">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/primary_card_bg"
|
||||
android:padding="16dp">
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_qr_pay"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:tint="@color/white" />
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:src="@drawable/ic_signon"
|
||||
android:layout_margin="6dp"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_qrpay"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:text="@string/menu_sign_on"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Transactions Card -->
|
||||
|
||||
<!-- TRANSACTIONS (Bottom Right) -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/otherFeaturesCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_margin="8dp"
|
||||
android:onClick="@{() -> click.onClickTrans()}"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{() -> click.onClickTrans()}"
|
||||
app:layout_constraintTop_toBottomOf="@+id/signOnMenuCard"
|
||||
app:layout_constraintStart_toEndOf="@+id/qrPayMenuCard"
|
||||
app:layout_constraintTop_toBottomOf="@id/settlementMenuCard"
|
||||
app:layout_constraintStart_toEndOf="@id/signOnMenuCard"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_percent="0.48"
|
||||
app:layout_constraintHeight_percent="0.48">
|
||||
app:layout_constraintWidth_percent="0.45"
|
||||
app:layout_constraintHeight_percent="0.45">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/primary_card_bg"
|
||||
android:padding="16dp">
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:src="@drawable/ic_other_features"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:tint="@color/white" />
|
||||
android:layout_margin="6dp"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_transactions"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<!-- ============ CENTER CIRCLE BUTTON ============ -->
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/qrPayMenuCard"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="130dp"
|
||||
app:cardCornerRadius="130dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||
android:onClick="@{() -> click.onClickQR()}"
|
||||
app:cardElevation="12dp"
|
||||
android:enabled="@{!mainViewModel.kPayStatus}"
|
||||
android:clickable="@{!mainViewModel.kPayStatus}"
|
||||
android:focusable="@{!mainViewModel.kPayStatus}"
|
||||
app:layout_constraintBottom_toBottomOf="@id/signOnMenuCard"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/cardMenuCard"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintVertical_bias="0.5">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:src="@drawable/ic_qr_pay"
|
||||
app:tint="@color/colorPrimary"
|
||||
android:alpha="@{!mainViewModel.kPayStatus ? 1f : 0.4f}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QR Pay"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center"
|
||||
android:alpha="@{!mainViewModel.kPayStatus ? 1f : 0.4f}" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
|
||||
333
app/src/main/res/layout/fragment_dashboard_screen_old.xml
Normal file
333
app/src/main/res/layout/fragment_dashboard_screen_old.xml
Normal file
@ -0,0 +1,333 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<data>
|
||||
<import type="com.utsmm.kbz.util.ecr.ECRConnectionStatus"/>
|
||||
<import type="android.view.View"/>
|
||||
<import type="com.utsmm.kbz.R"/>
|
||||
<import type="com.utsmm.kbz.util.layout.LayoutDataUtil"/>
|
||||
<variable
|
||||
name="shareViewModel"
|
||||
type="com.utsmm.kbz.ui.core_viewmodel.SharedViewModel" />
|
||||
<variable
|
||||
name="mainViewModel"
|
||||
type="com.utsmm.kbz.MainViewModel" />
|
||||
<variable
|
||||
name="click"
|
||||
type="com.utsmm.kbz.MainFragment.ClickEvent" />
|
||||
<variable
|
||||
name="carouselAdapter"
|
||||
type="androidx.recyclerview.widget.RecyclerView.Adapter" />
|
||||
<variable
|
||||
name="myAdapter"
|
||||
type="com.utsmm.kbz.ui.adapters.MainAdapter" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorBackground">
|
||||
|
||||
<!-- Banner Section (25% of screen) -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/bannerCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="16dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="8dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.25">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.denzcoskun.imageslider.ImageSlider
|
||||
android:id="@+id/image_slider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:iss_auto_cycle="true"
|
||||
app:iss_period="5000"
|
||||
app:iss_delay="5000"
|
||||
app:iss_no_dots="true"
|
||||
app:iss_title_background="@color/transparent" />
|
||||
|
||||
<!-- Gradient overlay for better text visibility -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Main Menu Grid (3+2 layout for 5 functions) -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bannerCard"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<!-- First Row - 3 cards -->
|
||||
<!-- Sale Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardMenuCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{() -> click.onClickCard()}"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/signOnMenuCard"
|
||||
app:layout_constraintBottom_toTopOf="@+id/qrPayMenuCard"
|
||||
app:layout_constraintWidth_percent="0.32"
|
||||
app:layout_constraintHeight_percent="0.48">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/primary_card_bg"
|
||||
android:padding="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_sale"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_sale"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Sign On Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/signOnMenuCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{() -> click.onClickSignOn()}"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/cardMenuCard"
|
||||
app:layout_constraintEnd_toStartOf="@+id/settlementMenuCard"
|
||||
app:layout_constraintBottom_toTopOf="@+id/otherFeaturesCard"
|
||||
app:layout_constraintWidth_percent="0.32"
|
||||
app:layout_constraintHeight_percent="0.48">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/primary_card_bg"
|
||||
android:padding="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_signon"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_sign_on"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Settlement Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/settlementMenuCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{() -> click.onClickSettlement()}"
|
||||
app:disableBtn="@{mainViewModel.settlementStatus}"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/signOnMenuCard"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/otherFeaturesCard"
|
||||
app:layout_constraintWidth_percent="0.32"
|
||||
app:layout_constraintHeight_percent="0.48">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/primary_card_bg"
|
||||
android:padding="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_settlement"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_settlement"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Second Row - 2 cards centered -->
|
||||
<!-- QR Pay Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/qrPayMenuCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{() -> click.onClickQR()}"
|
||||
app:disableBtn="@{mainViewModel.kPayStatus}"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cardMenuCard"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/otherFeaturesCard"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_percent="0.48"
|
||||
app:layout_constraintHeight_percent="0.48">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/primary_card_bg"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_qr_pay"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_qrpay"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Transactions Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/otherFeaturesCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{() -> click.onClickTrans()}"
|
||||
app:layout_constraintTop_toBottomOf="@+id/signOnMenuCard"
|
||||
app:layout_constraintStart_toEndOf="@+id/qrPayMenuCard"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_percent="0.48"
|
||||
app:layout_constraintHeight_percent="0.48">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/primary_card_bg"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_other_features"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_transactions"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@ -3,8 +3,6 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:bind="http://schemas.android.com/tools">
|
||||
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="adapter"
|
||||
@ -16,7 +14,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorBackground">
|
||||
android:background="@color/colorPrimary">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerViewFeatures"
|
||||
|
||||
@ -1,44 +1,157 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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"
|
||||
xmlns:bind="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="sharedViewModel"
|
||||
type="com.utsmm.kbz.ui.core_viewmodel.SharedViewModel" />
|
||||
|
||||
<variable
|
||||
name="adapter"
|
||||
type="androidx.recyclerview.widget.RecyclerView.Adapter" />
|
||||
|
||||
<!-- Optional: Click handler class (if you want Cancel button or click events) -->
|
||||
<!-- <variable-->
|
||||
<!-- name="click"-->
|
||||
<!-- type="com.utsmm.kbz.ui.qr_pay.QRRefundListFragment.ClickEvent" />-->
|
||||
<variable
|
||||
name="manageViewModel"
|
||||
type="com.utsmm.kbz.ui.management.ManagementViewModel" />
|
||||
</data>
|
||||
|
||||
<FrameLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<!-- RecyclerView showing refund history -->
|
||||
<!-- SEARCH SECTION -->
|
||||
<LinearLayout
|
||||
android:id="@+id/searchSection"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp"
|
||||
android:visibility="@{manageViewModel.reprintLayoutTopVisibility}"
|
||||
app:layout_constraintTop_toBottomOf="@id/headerSection"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<!-- Search Input Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="12dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardBackgroundColor="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="2dp"
|
||||
android:background="@drawable/bg_edittext_primary_border"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@drawable/ic_txn_history"
|
||||
app:tint="@color/colorPrimary"
|
||||
android:alpha="0.6" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_rrn_trace"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:hint="@string/txt_search_rrn_trace"
|
||||
android:text="@={manageViewModel.txtRRNTrace}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textColorHint="@color/colorPrimary"
|
||||
android:alpha="0.6"
|
||||
android:textSize="15sp"
|
||||
android:fontFamily="sans-serif"
|
||||
android:inputType="number"
|
||||
android:maxLength="12"
|
||||
android:imeOptions="actionSearch"
|
||||
android:singleLine="true"
|
||||
tools:text="" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- RECYCLER VIEW -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/qrRefundHistory"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
bind:setAdapter="@{adapter}"
|
||||
android:layout_height="0dp"
|
||||
app:adapter="@{adapter}"
|
||||
app:layout_constraintTop_toBottomOf="@id/searchSection"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:listitem="@layout/item_qr_refund" />
|
||||
<!-- Optional empty view (you can control visibility with ViewModel vars) -->
|
||||
<TextView
|
||||
android:id="@+id/txtNoData"
|
||||
|
||||
<!-- Empty State Section -->
|
||||
<LinearLayout
|
||||
android:id="@+id/emptyStateSectionRefund"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="Not Records To Display"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#888"
|
||||
android:visibility="gone" />
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:visibility="@{manageViewModel.reprintLayoutBtmVisibility}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
</FrameLayout>
|
||||
<!-- Empty State Animation -->
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
android:id="@+id/lav_no_trans"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:lottie_autoPlay="true"
|
||||
app:lottie_fileName="lottie_no_trans.json"
|
||||
app:lottie_loop="true" />
|
||||
|
||||
<!-- Empty State Icon (fallback) -->
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:src="@drawable/ic_txn_history"
|
||||
app:tint="@color/colorPrimary"
|
||||
android:alpha="0.3"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- Empty State Title -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/no_history"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<!-- Empty State Description -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="No transactions found for the selected criteria"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:alpha="0.7"
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingHorizontal="32dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
|
||||
@ -23,14 +23,16 @@
|
||||
app:cardElevation="6dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
android:focusable="true"
|
||||
android:background="@color/white"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/primary_card_bg"
|
||||
android:background="@color/white"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
@ -39,8 +41,8 @@
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:srcUrl="@{icon}"
|
||||
app:tint="@color/white"
|
||||
tools:tint="@color/white"
|
||||
app:tint="@color/colorPrimary"
|
||||
tools:tint="@color/colorPrimary"
|
||||
tools:src="@drawable/ic_sale" />
|
||||
|
||||
<TextView
|
||||
@ -50,12 +52,11 @@
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:text="@{text}"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
@ -18,10 +18,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="4dp"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_marginVertical="6dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardBackgroundColor="@color/colorPrimary"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
@ -32,16 +33,17 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:background="@drawable/bg_edittext_primary_border"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_edittext_primary_border"
|
||||
android:padding="16dp">
|
||||
|
||||
|
||||
<!-- Transaction Icon -->
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_custom_pos"
|
||||
app:tint="@color/white"
|
||||
app:tint="@color/colorPrimary"
|
||||
android:alpha="0.8"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_gravity="top" />
|
||||
@ -66,7 +68,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@{POSUtil.getInstance().getTransName(payDetail)}"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
@ -77,7 +79,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{POSUtil.getInstance().checkMinusSign(payDetail.transactionType)+POSUtil.getInstance().getDecimalAmountSeparatorFormat(payDetail.amount) + ` `+POSUtil.getInstance().currencyCodeToText(payDetail.currencyCode)}"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
@ -90,7 +92,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{POSUtil.getInstance().convertDateFormatByDateString(payDetail.transDate)}"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:alpha="0.8"
|
||||
android:fontFamily="sans-serif"
|
||||
@ -102,7 +104,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{POSUtil.getInstance().getCardNumMasking(payDetail.cardNo)}"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:alpha="0.8"
|
||||
android:fontFamily="monospace"
|
||||
@ -121,7 +123,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:isTrace="@{payDetail}"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="13sp"
|
||||
android:alpha="0.7"
|
||||
android:fontFamily="monospace"
|
||||
@ -133,15 +135,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@{`RRN:`+payDetail.referNo}"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="13sp"
|
||||
android:alpha="0.7"
|
||||
android:fontFamily="monospace"
|
||||
android:textAlignment="textEnd"
|
||||
tools:text="RRN:233001786242" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Arrow Icon -->
|
||||
@ -149,11 +149,10 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/ic_right_arrow"
|
||||
app:tint="@color/white"
|
||||
app:tint="@color/colorPrimary"
|
||||
android:alpha="0.6"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
@ -1108,20 +1108,7 @@
|
||||
android:id="@+id/action_qrFragment_to_qr_refund_list"
|
||||
app:destination="@id/qrRefundList"
|
||||
/>
|
||||
<action
|
||||
app:launchSingleTop="true"
|
||||
app:popUpTo="@+id/fragment_qr_pay"
|
||||
app:popUpToInclusive="true"
|
||||
android:id="@+id/action_qrFragment_to_inputPasswordFragment"
|
||||
app:destination="@id/inputPasswordFragment" />
|
||||
</fragment>
|
||||
|
||||
<!-- <fragment-->
|
||||
<!-- android:id="@+id/qrHistory"-->
|
||||
<!-- tools:layout="@layout/fragment_qr_history"-->
|
||||
<!-- android:name="com.utsmm.kbz.ui.qr_pay.QRHistoryFragment"-->
|
||||
<!-- >-->
|
||||
<!-- </fragment>-->
|
||||
<fragment
|
||||
android:id="@+id/qrRefundList"
|
||||
tools:layout="@layout/fragment_qr_refund"
|
||||
@ -1131,39 +1118,28 @@
|
||||
android:id="@+id/action_qrRefundList_to_qrRefundDetail"
|
||||
app:destination="@id/qrRefundDetail"
|
||||
/>
|
||||
<action
|
||||
app:launchSingleTop="true"
|
||||
app:popUpTo="@+id/QRRefundPasswordFragment"
|
||||
app:popUpToInclusive="true"
|
||||
android:id="@+id/action_qrRefundPasswordFragment_to_inputPasswordFragment"
|
||||
app:destination="@id/inputPasswordFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/qrRefundDetail"
|
||||
tools:layout="@layout/fragment_qr_refund_detail"
|
||||
android:name="com.utsmm.kbz.ui.qr_pay.QRRefundDetailFragment"
|
||||
>
|
||||
<action
|
||||
android:id="@+id/action_QRRefundDetail_to_transactionResultFragment"
|
||||
app:destination="@id/transactionResultFragment" />
|
||||
<action
|
||||
app:launchSingleTop="true"
|
||||
app:popUpToInclusive="true"
|
||||
app:popUpTo="@id/mobile_navigation"
|
||||
android:id="@+id/action_QRRefundDetail_to_nav_main"
|
||||
android:id="@+id/action_qrRefundDetail_to_nav_main"
|
||||
app:destination="@id/nav_main" />
|
||||
<action
|
||||
android:id="@+id/action_qrRefundDetail_inputPasswordFragment"
|
||||
app:destination="@id/inputPasswordFragment"
|
||||
/>
|
||||
<!-- <action-->
|
||||
<!-- app:launchSingleTop="true"-->
|
||||
<!-- app:popUpTo="@+id/QRRefundFragment"-->
|
||||
<!-- app:popUpToInclusive="true"-->
|
||||
<!-- android:id="@+id/action_qrRefundDetail_to_inputAmountFragment"-->
|
||||
<!-- app:destination="@id/inputAmountFragment" />-->
|
||||
<action
|
||||
app:launchSingleTop="true"
|
||||
app:popUpTo="@+id/qrRefundDetail"
|
||||
app:popUpToInclusive="true"
|
||||
android:id="@+id/action_QRRefundDetail_to_inputPasswordFragment"
|
||||
app:destination="@id/inputPasswordFragment" />
|
||||
<!-- app:popUpTo="@id/qrRefundList"-->
|
||||
<!-- app:popUpToInclusive="false"-->
|
||||
<!-- android:id="@+id/action_qrRefundDetail_to_password"-->
|
||||
<!-- app:destination="@id/QRRefundProcessFragment" />-->
|
||||
</fragment>
|
||||
<fragment
|
||||
tools:layout="@layout/fragment_qr_refund_process"
|
||||
@ -1183,6 +1159,4 @@
|
||||
android:id="@+id/action_QRRefundProcessFragment_to_nav_main"
|
||||
app:destination="@id/nav_main" />
|
||||
</fragment>
|
||||
|
||||
|
||||
</navigation>
|
||||
@ -516,6 +516,7 @@
|
||||
<string name="txt_error_occurred">Error Occured</string>
|
||||
<string name="error_occurred">Error Occured</string>
|
||||
<string name="nav_app_bar_open_drawer_description">Open navigation drawer</string>
|
||||
<string name="no_history">No History yet</string>
|
||||
<string-array name="pref_bank_name">
|
||||
<item>UTS</item>
|
||||
<item>YOMA Bank</item>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user