Android - Is it correct to use Event Buses (like Otto) for UI elements communication? -
can (is correct to) use event bus communicate between ui views? exemple, use communicate between fragments instead of implementing listener?
can use same instance of bus more 1 operation?
thank you
yes.
otto built reason: communicate fragments
, activities
aside without need of serializing through intent
s.
also, instance question: can reuse bus wherever want to. sometimes, though, prefer create different buses separate groups of classes communicating: example, in mvp architecture, have bus each m-v-p group, or in example, bus communicating specific service running, etc.
this example on how use library.
Comments
Post a Comment