Class TransactionViewHolder
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.cheetahdigital.giftcards.ui.history.TransactionViewHolder
-
public class TransactionViewHolder extends androidx.recyclerview.widget.RecyclerView.ViewHolderThe View Holder for the list ofTransaction. Contains all the views to be displayed on each list item.
-
-
Field Summary
Fields Modifier and Type Field Description android.widget.TextViewdescriptionTextViewandroid.widget.ImageViewiconImageViewandroid.widget.TextViewlabelTextView
-
Constructor Summary
Constructors Constructor Description TransactionViewHolder(android.view.View itemView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(Transaction transaction)Method to bind and display theTransactionto theTransactionViewHoldervoidsetImageAndLabel(android.graphics.drawable.Drawable image, int label)Sets the image and label of the transactionvoidsetImageAndLabelWithAmount(android.graphics.drawable.Drawable image, java.lang.String amount, int label)Sets the image and label of the transaction with corresponding amount
-
-
-
Method Detail
-
bind
public void bind(Transaction transaction)
Method to bind and display theTransactionto theTransactionViewHolder- Parameters:
transaction- theTransactionto display
-
setImageAndLabel
public void setImageAndLabel(android.graphics.drawable.Drawable image, @StringRes int label)Sets the image and label of the transaction- Parameters:
image- image of transactionlabel- label of transaction
-
setImageAndLabelWithAmount
public void setImageAndLabelWithAmount(android.graphics.drawable.Drawable image, java.lang.String amount, @StringRes int label)Sets the image and label of the transaction with corresponding amount- Parameters:
image- image of transactionamount- amount of transactionlabel- label of transaction
-
-