How to change a fragment depending on the item selected [closed]

0

I have a list where I have several options and win the description appears, but I do not know how I can make the fragment that contains the description change according to the item that I select.

    
asked by Kike hatake 29.06.2017 в 16:48
source

1 answer

0

You should give more information.

You have an activity and two fragments A and B. The fragment A contains the list and the fragment B contains the description. This is the typical Master-Detail case. The way you would have to load the information from Fragment A to Fragment B would be through the activity. Fragment A sends the information to the activity and the activity is sent to fragment B.

It could also be done with events / bus, but I would advise you before you could see how the activities and fragments work together.

Greetings.

    
answered by 29.06.2017 / 17:15
source