|
|
|
|
|
by lnanek2
3620 days ago
|
|
Yes, that's pretty full of boilerplate, even for Java, which is notoriously boilerplate. There are more established event buses in Android with simpler syntax, like greenrobot's:
EventBus.getInstance().post(new LogEvent("v1", "v2")); Seen here:
http://greenrobot.org/eventbus/documentation/how-to-get-star... You can have multiple event buses and other customization there as needed, but you have sensible defaults to keep code small most of the time too. Square also has one called Otto. If you want a lot of syntax and Java rather than Android, you might as well go full streaming with the RxJava library. |
|