I have a recycler view adapter. Thus, he has 3 species. Just every view has an ImageView. When the user clicks on the image (1 of 3), he creates a new intention to use the application for photos and returns it to the caller when this is done. The caller (the asset created by RecyclerView and its adapter) processes onActivityResult. From there, I need to set the thumbnail, which was made in the specified intent, to the correspondingly selected ImageView.
Question. In my activity, how can I find out which imageView (from the available 3) to change? My activity only knows about the position that the element clicked in the recycler view adapter.
Is it possible to somehow get a link to a specific image in the adapter using only the position? So something like this: from activity: adapter.getImageView(position)
EDIT: So I decided: I tracked all ImageViews in the adapter and saved their ref in ArrayList in `onBindViewHolder. so now i can just use adapter.getImageView (position)
android android-recyclerview android-viewholder
vankiz
source share