open class ChatViewHolder : ViewHolder, OnClickListener
ViewHolder for Chat
it holds reference to frequent update views and provides helper method to bind data information onto views
<init> |
constructor method that initialised the view holder by keeping reference to most frequent update views ChatViewHolder(itemView: View) |
cbFav |
CheckBox button that denote the another user involved is buddy of current user var cbFav: CheckBox! |
imgPic |
icon for chat, usually display other user's profile picture var imgPic: ImageView! |
tvLastMsg |
last message of the chat var tvLastMsg: TextView! |
tvName |
name of the chat, usually display name of another user involved in chat var tvName: TextView! |
tvUpdateTime |
formatted timestamp for chat's last update time var tvUpdateTime: TextView! |
bind |
helper method to bind open fun bind(chat: Chat!): Unit |
onClick |
catch user click event, and update observer via open fun onClick(v: View!): Unit |