Last active
February 21, 2020 16:01
-
-
Save alkjez/f369332e250014dce8103a703b6a025f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class ReceivedMessageHolder extends RecyclerView.ViewHolder { | |
TextView messageText, timeText, nameText; | |
ImageView profileImage; | |
ReceivedMessageHolder(View itemView) { | |
super(itemView); | |
messageText = (TextView) itemView.findViewById(R.id.text_message_body); | |
timeText = (TextView) itemView.findViewById(R.id.text_message_time); | |
nameText = (TextView) itemView.findViewById(R.id.text_message_name); | |
profileImage = (ImageView) itemView.findViewById(R.id.image_message_profile); | |
} | |
void bind(UserMessage message) { | |
messageText.setText(message.getMessage()); | |
// Format the stored timestamp into a readable String using method. | |
timeText.setText(Utils.formatDateTime(message.getCreatedAt())); | |
nameText.setText(message.getSender().getNickname()); | |
// Insert the profile image from the URL into the ImageView. | |
Utils.displayRoundImageFromUrl(mContext, message.getSender().getProfileUrl(), profileImage); | |
} | |
} |
okay ! so what is utils ?
what is the UserMessage Class ?
Maybe something related to 'SendBird' thing...?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what is the UserMessage Class ?