square btn changed

This commit is contained in:
MooN 2025-11-19 12:13:17 +06:30
parent 65eb17e3b9
commit 749abb1455
11 changed files with 310 additions and 181 deletions

View File

@ -40,8 +40,20 @@ public class QRPayAdapter extends RecyclerView.Adapter<QRPayAdapter.ViewHolder>
return new ViewHolder(binding); return new ViewHolder(binding);
} }
private final int[] colors = new int[]{
R.color.colorPrimary,
R.color.amber,
R.color.forestGreen
};
@Override @Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) { public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
int colorRes = colors[position % colors.length];
holder.itemView.setBackgroundResource(colorRes);
QRPayItem item = items.get(position); QRPayItem item = items.get(position);
holder.binding.setText(item.title); holder.binding.setText(item.title);
holder.binding.setIcon(item.icon); holder.binding.setIcon(item.icon);

View File

@ -42,7 +42,7 @@ public class QRPayFragment extends DataBindingFragment {
@Override @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();
setToolBarTitleWithBackIcon("MMQR"); setToolBarTitleWithBackIcon("MMQR PAY");
} }
@Override @Override

View File

@ -23,6 +23,7 @@ import com.utsmyanmar.baselib.fragment.DataBindingFragment;
import com.utsmyanmar.baselib.util.DataBindingConfig; import com.utsmyanmar.baselib.util.DataBindingConfig;
import com.utsmyanmar.paylibs.model.PayDetail; import com.utsmyanmar.paylibs.model.PayDetail;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -104,6 +105,9 @@ public class QRRefundFragment extends DataBindingFragment {
public void onCancel(){ public void onCancel(){
safeNavigateToRouteId(); safeNavigateToRouteId();
} }
public void onSearch(){
searchById();
}
} }
private void onRefundItemClicked(PayDetail payDetail) { private void onRefundItemClicked(PayDetail payDetail) {
@ -112,4 +116,27 @@ public class QRRefundFragment extends DataBindingFragment {
routeId = R.id.action_qrRefundList_to_qrRefundDetail; routeId = R.id.action_qrRefundList_to_qrRefundDetail;
NavHostFragment.findNavController(this).navigate(routeId, bundle); NavHostFragment.findNavController(this).navigate(routeId, bundle);
} }
private void searchById(){
EditText editText = getView().findViewById(R.id.rnn_trace_id);
String keyword = editText.getText().toString().trim();
if(keyword.isEmpty()){
updateList(qrPayViewModel.getRefundableQrHistory().getValue());
return;
}
List<PayDetail> originalList = qrPayViewModel.getRefundableQrHistory().getValue();
if(originalList == null) return;
List<PayDetail> filteredList = new ArrayList<>();
for(PayDetail item: originalList){
if(item.getReferNo() != null && item.getReferNo().contains(keyword)){
filteredList.add(item);
}
}
updateList(filteredList);
}
} }

View File

@ -136,14 +136,14 @@
<ImageView <ImageView
android:layout_width="46dp" android:layout_width="46dp"
android:layout_height="46dp" android:layout_height="46dp"
android:layout_marginBottom="6dp"
android:src="@drawable/ic_settlement" android:src="@drawable/ic_settlement"
app:tint="@color/colorPrimary" app:tint="@color/colorPrimary" />
android:layout_marginBottom="6dp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/menu_sale" android:text="@string/menu_settlement"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
@ -186,7 +186,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/menu_sale" android:text="@string/menu_sign_on"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
@ -231,7 +231,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/menu_sale" android:text="@string/menu_transactions"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
@ -275,7 +275,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/menu_sale" android:text="@string/menu_qrpay"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"

View File

@ -41,7 +41,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:spanCount="2" app:spanCount="3"
bind:setAdapter="@{adapter}" bind:setAdapter="@{adapter}"
tools:itemCount="6" tools:itemCount="6"
tools:listitem="@layout/item_view_dashboard" /> tools:listitem="@layout/item_view_dashboard" />

View File

@ -14,12 +14,12 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/colorPrimary"> android:background="@color/colorBackground">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerViewFeatures" android:id="@+id/recyclerViewFeatures"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:clipToPadding="false" android:clipToPadding="false"
android:nestedScrollingEnabled="false" android:nestedScrollingEnabled="false"
@ -29,7 +29,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:spanCount="2" app:spanCount="3"
bind:setAdapter="@{adapter}" bind:setAdapter="@{adapter}"
tools:itemCount="3" tools:itemCount="3"
tools:listitem="@layout/item_qr_pay_button" /> tools:listitem="@layout/item_qr_pay_button" />

View File

@ -15,6 +15,9 @@
<variable <variable
name="manageViewModel" name="manageViewModel"
type="com.utsmm.kbz.ui.management.ManagementViewModel" /> type="com.utsmm.kbz.ui.management.ManagementViewModel" />
<variable
name="click"
type="com.utsmm.kbz.ui.qr_pay.QRRefundFragment.ClickEvent" />
</data> </data>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -23,75 +26,105 @@
android:background="@color/white"> android:background="@color/white">
<!-- SEARCH SECTION --> <!-- SEARCH SECTION -->
<!-- <LinearLayout--> <LinearLayout
<!-- android:id="@+id/searchSection"--> android:id="@+id/refundSearchSection"
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:orientation="horizontal"--> android:orientation="horizontal"
<!-- android:padding="16dp"--> android:padding="16dp"
<!-- android:visibility="@{manageViewModel.reprintLayoutTopVisibility}"--> android:gravity="center_vertical"
<!-- app:layout_constraintTop_toBottomOf="@id/headerSection"--> android:visibility="@{manageViewModel.reprintLayoutTopVisibility}"
<!-- app:layout_constraintStart_toStartOf="parent"--> app:layout_constraintTop_toTopOf="parent"
<!-- app:layout_constraintEnd_toEndOf="parent">--> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<!-- &lt;!&ndash; Search Input Card &ndash;&gt;--> <!-- Search Card -->
<!-- <androidx.cardview.widget.CardView--> <androidx.cardview.widget.CardView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="56dp"--> android:layout_height="56dp"
<!-- android:layout_weight="1"--> android:layout_weight="1"
<!-- android:layout_marginEnd="12dp"--> android:layout_marginEnd="12dp"
<!-- app:cardCornerRadius="16dp"--> app:cardCornerRadius="16dp"
<!-- app:cardElevation="0dp"--> app:cardElevation="0dp"
<!-- app:cardBackgroundColor="@color/white">--> app:cardBackgroundColor="@color/white">
<!-- <LinearLayout--> <LinearLayout
<!-- android:layout_width="match_parent"--> android:layout_width="match_parent"
<!-- android:layout_height="match_parent"--> android:layout_height="match_parent"
<!-- android:layout_margin="2dp"--> android:layout_margin="2dp"
<!-- android:background="@drawable/bg_edittext_primary_border"--> android:background="@drawable/bg_edittext_primary_border"
<!-- android:gravity="center_vertical"--> android:gravity="center_vertical"
<!-- android:orientation="horizontal"--> android:orientation="horizontal"
<!-- android:padding="16dp">--> android:padding="16dp">
<!-- <ImageView--> <ImageView
<!-- android:layout_width="20dp"--> android:layout_width="20dp"
<!-- android:layout_height="20dp"--> android:layout_height="20dp"
<!-- android:layout_marginEnd="8dp"--> android:layout_marginEnd="8dp"
<!-- android:src="@drawable/ic_txn_history"--> android:src="@drawable/ic_txn_history"
<!-- app:tint="@color/colorPrimary"--> app:tint="@color/colorPrimary"
<!-- android:alpha="0.6" />--> android:alpha="0.6"/>
<!-- <EditText--> <EditText
<!-- android:id="@+id/et_rrn_trace"--> android:id="@+id/rnn_trace_id"
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="1"--> android:layout_weight="1"
<!-- android:background="@null"--> android:background="@null"
<!-- android:hint="@string/txt_search_rrn_trace"--> android:hint="@string/txt_search_rrn_trace"
<!-- android:text="@={manageViewModel.txtRRNTrace}"--> android:text="@={manageViewModel.txtRRNTrace}"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textColorHint="@color/colorPrimary"--> android:textColorHint="@color/colorPrimary"
<!-- android:alpha="0.6"--> android:alpha="0.9"
<!-- android:textSize="15sp"--> android:textSize="14sp"
<!-- android:fontFamily="sans-serif"--> android:inputType="number"
<!-- android:inputType="number"--> android:singleLine="true"
<!-- android:maxLength="12"--> android:imeOptions="actionSearch" />
<!-- android:imeOptions="actionSearch"--> </LinearLayout>
<!-- android:singleLine="true"--> </androidx.cardview.widget.CardView>
<!-- tools:text="" />-->
<!-- </LinearLayout>--> <!-- SEARCH BUTTON -->
<!-- </androidx.cardview.widget.CardView>--> <androidx.cardview.widget.CardView
android:id="@+id/btnSearch"
android:onClick="@{() -> click.onSearch()}"
android:layout_width="80dp"
android:layout_height="52dp"
android:clickable="true"
android:focusable="true"
app:cardBackgroundColor="@color/colorPrimary"
app:cardCornerRadius="8dp"
app:cardElevation="3dp"
android:foreground="?android:attr/selectableItemBackground">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Search"
android:textSize="14sp"
android:textColor="@color/white"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<!-- </LinearLayout>-->
<!-- RECYCLER VIEW --> <!-- RECYCLER VIEW -->
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/qrRefundHistory" android:id="@+id/qrRefundHistory"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:paddingTop="4dp"
app:adapter="@{adapter}" app:adapter="@{adapter}"
app:layout_constraintTop_toBottomOf="@id/refundSearchSection"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:listitem="@layout/item_qr_refund" /> tools:listitem="@layout/item_qr_refund" />
<!-- Empty State Section --> <!-- Empty State Section -->
@ -99,15 +132,14 @@
android:id="@+id/emptyStateSectionRefund" android:id="@+id/emptyStateSectionRefund"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center" android:gravity="center"
android:orientation="vertical"
android:visibility="@{manageViewModel.reprintLayoutBtmVisibility}" android:visibility="@{manageViewModel.reprintLayoutBtmVisibility}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<!-- Empty State Animation -->
<com.airbnb.lottie.LottieAnimationView <com.airbnb.lottie.LottieAnimationView
android:id="@+id/lav_no_trans" android:id="@+id/lav_no_trans"
android:layout_width="200dp" android:layout_width="200dp"
@ -115,42 +147,25 @@
android:layout_marginBottom="24dp" android:layout_marginBottom="24dp"
app:lottie_autoPlay="true" app:lottie_autoPlay="true"
app:lottie_fileName="lottie_no_trans.json" app:lottie_fileName="lottie_no_trans.json"
app:lottie_loop="true" /> 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 <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/no_history" android:text="@string/no_history"
android:textAlignment="center"
android:textColor="@color/colorPrimary"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" android:textStyle="bold"
android:fontFamily="sans-serif-medium" android:textColor="@color/colorPrimary"
android:layout_marginBottom="8dp" /> android:layout_marginBottom="8dp"/>
<!-- Empty State Description -->
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="No transactions found for the selected criteria" android:text="No transactions found for the selected criteria"
android:textAlignment="center"
android:textColor="@color/colorPrimary"
android:textSize="14sp" android:textSize="14sp"
android:textColor="@color/colorPrimary"
android:alpha="0.7" android:alpha="0.7"
android:fontFamily="sans-serif" android:paddingHorizontal="32dp"/>
android:paddingHorizontal="32dp" />
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -13,52 +13,62 @@
name="icon" name="icon"
type="Integer" /> type="Integer" />
</data> </data>
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.cardview.widget.CardView android:layout_height="wrap_content"
android:id="@+id/btnItem"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_margin="8dp"
app:cardCornerRadius="20dp"
app:cardElevation="6dp"
android:foreground="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:background="@color/white"
> >
<androidx.cardview.widget.CardView
<LinearLayout android:id="@+id/btnItem"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
android:orientation="vertical" app:cardCornerRadius="20dp"
android:gravity="center" app:cardElevation="6dp"
android:layout_margin="6dp"
android:foreground="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:background="@color/white" android:background="@color/white"
android:padding="16dp"> app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintDimensionRatio="1:1"
>
<ImageView <LinearLayout
android:id="@+id/btnIcon" android:layout_width="match_parent"
android:layout_width="48dp" android:layout_height="match_parent"
android:layout_height="48dp" android:background="@color/white"
android:layout_marginBottom="8dp"
app:srcUrl="@{icon}"
app:tint="@color/colorPrimary"
tools:tint="@color/colorPrimary"
tools:src="@drawable/ic_sale" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/rubik_medium"
android:textSize="16sp"
android:textStyle="bold"
android:textAlignment="center"
android:textColor="@color/colorPrimary"
android:text="@{text}"
android:gravity="center" android:gravity="center"
android:maxLines="2" android:orientation="vertical"
android:ellipsize="end" /> android:padding="16dp">
</LinearLayout>
</androidx.cardview.widget.CardView> <ImageView
android:id="@+id/btnIcon"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_marginBottom="8dp"
app:srcUrl="@{icon}"
app:tint="@color/colorPrimary"
tools:src="@drawable/ic_sale"
tools:tint="@color/colorPrimary" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:fontFamily="@font/rubik_medium"
android:gravity="center"
android:maxLines="2"
android:text="@{text}"
tools:text="button title"
android:textAlignment="center"
android:textColor="@color/colorPrimary"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -18,7 +18,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp" android:layout_marginHorizontal="4dp"
android:layout_margin="16dp" android:layout_margin="8dp"
android:layout_marginVertical="6dp" android:layout_marginVertical="6dp"
app:cardCornerRadius="12dp" app:cardCornerRadius="12dp"
app:cardElevation="0dp" app:cardElevation="0dp"

View File

@ -5,58 +5,61 @@
<data> <data>
<import type="com.utsmm.kbz.R"/> <import type="com.utsmm.kbz.R"/>
<import type="com.utsmm.kbz.util.enums.FeaturesType" />
<variable <variable
name="item" name="item"
type="com.utsmm.kbz.config.data.model.Features" /> type="com.utsmm.kbz.config.data.model.Features" />
</data> </data>
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/trans_card" android:id="@+id/trans_card"
android:layout_width="match_parent" android:layout_width="100dp"
android:layout_height="180dp" android:layout_height="100dp"
android:layout_margin="8dp" android:layout_margin="6dp"
app:cardCornerRadius="20dp" android:foreground="?android:attr/selectableItemBackground"
app:cardElevation="6dp" android:clickable="true"
android:foreground="?android:attr/selectableItemBackground" android:focusable="true"
android:clickable="true" app:cardCornerRadius="20dp"
app:disableBtn="@{item.isActive}" app:cardElevation="6dp"
android:focusable="true"> app:disableBtn="@{item.isActive}"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintDimensionRatio="1:1">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="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:layout_marginBottom="8dp"
app:srcUrl="@{item.drawable}"
app:tint="@color/white"
tools:tint="@color/white"
tools:src="@drawable/ic_sale" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/rubik_medium"
android:textSize="16sp"
android:textStyle="bold"
android:textAlignment="center"
android:textColor="@color/white"
android:text="@{item.name}"
tools:text="SALE"
android:gravity="center" android:gravity="center"
android:maxLines="2" android:orientation="vertical"
android:ellipsize="end" /> android:padding="16dp"
android:background="@color/white">
</LinearLayout> <ImageView
android:id="@+id/btnIcon"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginBottom="8dp"
app:srcUrl="@{item.drawable}"
app:tint="@color/colorPrimary"
tools:src="@drawable/ic_sale"
tools:tint="@color/colorPrimary" />
</androidx.cardview.widget.CardView> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:gravity="center"
android:text="@{item.name}"
tools:text="button title"
android:textAlignment="center"
android:textColor="@color/colorPrimary"
android:textSize="12sp"
android:textStyle="bold" />
</layout> </LinearLayout>
</androidx.cardview.widget.CardView>
</layout>

View File

@ -0,0 +1,62 @@
<?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.R"/>
<import type="com.utsmm.kbz.util.enums.FeaturesType" />
<variable
name="item"
type="com.utsmm.kbz.config.data.model.Features" />
</data>
<androidx.cardview.widget.CardView
android:id="@+id/trans_card"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_margin="8dp"
app:cardCornerRadius="20dp"
app:cardElevation="6dp"
android:foreground="?android:attr/selectableItemBackground"
android:clickable="true"
app:disableBtn="@{item.isActive}"
android:focusable="true">
<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:layout_marginBottom="8dp"
app:srcUrl="@{item.drawable}"
app:tint="@color/white"
tools:tint="@color/white"
tools:src="@drawable/ic_sale" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/rubik_medium"
android:textSize="16sp"
android:textStyle="bold"
android:textAlignment="center"
android:textColor="@color/white"
android:text="@{item.name}"
tools:text="SALE"
android:gravity="center"
android:maxLines="2"
android:ellipsize="end" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</layout>