Last active
December 30, 2017 17:10
-
-
Save the-dagger/19ad39316c531f5ee13e05a96a192ce3 to your computer and use it in GitHub Desktop.
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
fun bind(student: Student) { | |
with(student) { | |
studentName.text = name //the property in Student called directly instead of calling student.name or student.getName() | |
studentSubject.text = subject | |
Picasso.with(itemView.context).load(image).into(studentImage) | |
} | |
itemView.setOnClickListener { Toast.makeText(itemView.context, "Student's name : " + student.name, Toast.LENGTH_SHORT).show() } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment