Class MembersViewHolder
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ViewHolder
-
- com.cheetahdigital.members.ui.list.MembersViewHolder
-
public class MembersViewHolder extends androidx.recyclerview.widget.RecyclerView.ViewHolder
The ViewHolder for Members list that contains the views for the list and sets the action for the onClick as well
-
-
Field Summary
Fields Modifier and Type Field Description android.widget.ImageView
avatar
android.view.View
avatarContainer
android.widget.TextView
companyTextView
android.widget.ImageView
connectionStatusIcon
android.view.View
container
android.widget.TextView
nameTextView
android.widget.TextView
placeholderAvatarText
-
Constructor Summary
Constructors Constructor Description MembersViewHolder(android.view.View itemView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(Member member)
Method to bind theMember
to the current viewvoid
setAllStatus()
Set the connection status when member state is for allvoid
setConnectedStatus()
Set the connection status to connected statevoid
setPlaceHolder(int placeHolder)
Set the default placeholder for avatars with no image loadedvoid
setRequestedStatus()
Set the connection status to requested state
-
-
-
Field Detail
-
avatar
public android.widget.ImageView avatar
-
avatarContainer
public android.view.View avatarContainer
-
placeholderAvatarText
public android.widget.TextView placeholderAvatarText
-
nameTextView
public android.widget.TextView nameTextView
-
companyTextView
public android.widget.TextView companyTextView
-
connectionStatusIcon
public android.widget.ImageView connectionStatusIcon
-
container
public android.view.View container
-
-
Method Detail
-
setPlaceHolder
public void setPlaceHolder(@DrawableRes int placeHolder)
Set the default placeholder for avatars with no image loaded- Parameters:
placeHolder
- default placeholder
-
bind
public void bind(Member member)
Method to bind theMember
to the current view- Parameters:
member
- theMember
to display
-
setConnectedStatus
public void setConnectedStatus()
Set the connection status to connected state
-
setRequestedStatus
public void setRequestedStatus()
Set the connection status to requested state
-
setAllStatus
public void setAllStatus()
Set the connection status when member state is for all
-
-