Why direct communication between fragments is not recommended?

后端 未结 2 657
陌清茗
陌清茗 2020-12-11 16:43

while learning android fragments on developer.android.com it is specified that direct communication between two fragment is not recommended. I want to know what will be the

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-11 17:42

    A Fragment is just a UI component that does a little more than draw itself. In the scope of this question, its no different from a View.

    So a very comparable question would be: why cannot two Views communicate with each other directly?

提交回复
热议问题