-
Notifications
You must be signed in to change notification settings - Fork 727
Closed
Description
I am using a OnModelClickListener
to add click listener on an imageView. I want to change the image when the view is clicked. I m little confused on how to achieve the same. How to change the underlying model data? Also, I don't want to fetch all the data again. Should I change the image from the clicklistener itself? I am using a PagedListEpoxyController
. I don't want to re-fetch the data again from the repository
.
override fun onClick(model: ItemCustomViewModel_?, parentView: ItemCustomView?, clickedView: View?, position: Int) {
val userName = model!!.post().publishedBy.userName
emmiter(if (model.post().publishedBy.following) FollowEvent(userName) else UnFollowEvent(userName))
}
bernaferrari, erluxman and PedroAlvarado
Metadata
Metadata
Assignees
Labels
No labels