Created
January 15, 2019 16:16
-
-
Save manuelernesto/48498575fe8a8cca8484819d5bd8132e 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
class Holder( | |
itemView: View, | |
val people: List<Person>, | |
val context: Context) : RecyclerView.ViewHolder(itemView), | |
View.OnClickListener { | |
val name: TextView = itemView.findViewById(R.id.list_name) | |
val email: TextView = itemView.findViewById(R.id.list_email) | |
val phone: TextView = itemView.findViewById(R.id.list_phone) | |
init {itemView.setOnClickListener(this)} | |
override fun onClick(v: View?) { | |
val person = people[adapterPosition] | |
val intent = Intent(context, UpdateFirestoreActivity::class.java) | |
intent.putExtra("Person", person) | |
context.startActivity(intent) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment