Get Started with Kotlin on Android
developer.android.com
developer.android.com
As good as it is, Kotlin can't fully mask the awful boilerplate and APIs .
I haven't tinkered with mobile development in awhile, but I remember content providers feeling like an oddly thought-out concept at the time.
As a Kotlin noob, can someone explain to me why the Kotlin on-click listener doesn't need to specify onClick() like the Java one does?
mButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// do something here
}
});
can be replaced with mButton.setOnClickListener((View v) -> {
// do something here
});
which is nice for all callbacks, but especially together with ReactiveX where they are abundant.mButton.setOnClickListener { /* do something here */ }
(In addition to SAM conversions, both the parenthesis and input variable are optional.)
People are using React for Rest requests, and for APIs where you cannot touch them it can be a good idea as it provide ways to join results of requests and other stuff. But if you control the API and it is designed to be simple and with mobile in mind, there shouldn't be uses cases where a simple request give you all you need.
It also gives consistency as you treat the same way a click event than a http request. Some people like this but I don't.
I personally didn't find a good use case to use it in my app, but you might think diferently. So, I suggest you to try it a little at least an decide by yourself.
This can get you started: http://reactivex.io/intro.html