java - Disadvantages of using an event bus to update the interface? -



java - Disadvantages of using an event bus to update the interface? -

i have started utilize event bus library otto updating interface (activities) different components in android application. instance, when alter model class made, post event bus or if asynctask has finished, post event event bus in onpostexecute method.

so far using 1 event bus user interface updates. noticed paused activities receive these events yet. in documentation states

the paused activity not receive user input , cannot execute code.

which find controversial, can explain this, code of course of study executed on different thread, still in activity.

my question is, usage result in disadvantages? having multiple activies beingness paused, executing events, updating elements of (paused) activities or ignoring them. result in noticeable overhead or can ignore it?

is there different approach when 1 wants utilize event bus updating interface?

does result in noticeable overhead or can ignore it?

that impossible in abstract. depend on work doing , how doing it.

is there different approach when 1 wants utilize event bus updating interface?

there no requirement activities , fragments listening events while in background. example, can register events in onresume() , unregister in onpause(). can utilize other techniques (e.g., otto's @producer pattern) update activity's/fragment's ui en masse when comes foreground in onresume().

java android multithreading android-activity otto

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -