Search code examples
androidandroid-layoutandroid-recyclerviewonclicklisteneronitemclicklistener

Update View in Activity in response to recycler view item click


I have this type of activity layout Activity Layout

In my layout, the yellow portion is my recyclerview, which is currently working as the expandable list. Now in my scenario, when the user clicks on any item in the recyclerview than the layout changes in the activity shown by, green area and its child in the image. Is there any way to do so?


Solution

  • Here is the simple example of pass value from recyclerview to activity using eventbus. Try this maybe will help you to solve your problem.