Communication between nested fragments in Android

前端 未结 4 1246
无人共我
无人共我 2020-12-07 17:00

I recently learned how to make nested fragments in Android. I don\'t know how communication is supposed to happen, though.

From reading the fragment commun

4条回答
  •  抹茶落季
    2020-12-07 18:03

    With the release of the architecture components you should probably have a look at the viewmodel architecture component.
    In combination with live data you will be easily able to communicate between arbitrarily nested fragments. You might also to take a look at the todoapp and how they handle events there.

提交回复
热议问题