This is a question about how to hand over the position value when clicked in recyclerview.

Asked 1 years ago, Updated 1 years ago, 94 views

When you click one view in the Recycler view, you take one value of the array containing the data in the clicked view and (AsyncTask) asynchronous communication. At this time, the value to post to json is the value of the imported array, so how can I hand it over? I'm not sure about the event when I click on the Recycler View. ㅜ<

java android json recyclerview

2022-09-22 13:05

1 Answers

I understand that you want to receive a position value when you click on the RecyclerView item. When creating ViewHolder within the Adapter in the same way as the link below, please apply click listener to View. For reference, positions can be imported as a function of getChildLayoutPosition(view) in RecyclerView.


2022-09-22 13:05

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.