开发者

How Pass data from one fragment to another

In one of my project i am using 2 fragments.one fragment is displaying a list of items.So i want when the topic will be selected in first fragment the details should be changed in another fragment.Data i am able to pass fr开发者_运维问答om one fragment to other but the view is not changing.In which method i should implement the view of second fragment so that it can change accordingly.


See this link. It describes exactly your problem.

Basically, you have a listener on the items fragment to be notified on each item selection. The class implementing the listener interface may be the Activity or even the other fragment. When the listener is notified, it updates the details fragment.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜