Created
December 28, 2020 20:14
-
-
Save magdamiu/88d0fee3258c6b4d228a50f37a3fdd5b to your computer and use it in GitHub Desktop.
Define the custom ViewHolder for our emails list.
This file contains 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
public class EmailViewHolder extends RecyclerView.ViewHolder{ | |
private final TextView textViewFrom, textViewSubject, textViewBody; | |
private final LinearLayout linearLayoutEmail; | |
public EmailViewHolder(@NonNull View itemView) { | |
super(itemView); | |
textViewFrom = itemView.findViewById(R.id.textViewFrom); | |
textViewSubject = itemView.findViewById(R.id.textViewSubject); | |
textViewBody = itemView.findViewById(R.id.textViewBody); | |
linearLayoutEmail = itemView.findViewById(R.id.linearLayoutEmail); | |
} | |
public TextView getTextViewFrom() { | |
return textViewFrom; | |
} | |
public TextView getTextViewSubject() { | |
return textViewSubject; | |
} | |
public TextView getTextViewBody() { | |
return textViewBody; | |
} | |
public LinearLayout getLinearLayoutEmail() { | |
return linearLayoutEmail; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment