Android: How to access viewholder at position (from outside the adapter) -


i have recycler view adapter. hosts 3 views. each view has imageview. when user clicks on image (1 out of 3) creates new intent use photo app , returns caller when done. caller (the activity, created recyclerview , adapter) handles onactivityresult. there need set thumbnail image taken in mentioned intent corresponding selected imageview.

question. in activity, how know imageview (out of available 3) modify ? activity knows position of item in recycler view adapter clicked on.

is possible somehow reference particular imageview in adapter using position? this: activity: adapter.getimageview(position)

edit: solution was: keeping track of imageviews in adapter , stored ref in arraylist in `onbindviewholder. can use adapter.getimageview(position)

i believe can setonclicklistener imageview (or row view) in adapter. fire intent there.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -