very simple android eventbus library feautures:
- very very light, about ~ 1kb
- support java and android
- very fast and easy to use
its code styling is like otto eventbus (really thanks square cause their otto eventbus library) i wrote it just for training! download latest jar here
to register (when you need event handling):
MBus.register(this);to unregister (when you dont need event handling):
MBus.unregister(this);to subscribe new event:
MBus.subscribe("hello");
MBus.subscribe(new MyObject());to handle events:
@RegisterBus
public void showMeString(String str){
}
@RegisterBus
public void customObj(MyObject obj){
}- otto for its beautifull coding style