![]() ![]() Now you have a direct access to the views:įed up with so many getters, setters, toString(), equals()…?ĭata classes in Kotlin give all this for you.ĭata class Person(val name: String, val surname: String, val age: Int) So it’s able to map interfaces with one method into a lambda. ![]() Kotlin has beautiful lambdas and a nice compatibility with Java libraries. The lack of lambdas in Java 7 is the reason why listeners and callbacks are so awful to write. Click listeners are clean and fun to write This will be a set of independent examples in no particular order. I’ve been talking a lot about Kotlin before in this blog, but this is a compilation of things that Kotlin can do for you to simplify Android code. Besides if you subscribe to the list, you’ll receive 5 first chapters for free and a discount at the end of the free ebook. I’ve been working on it for a long time and updating it after new releases. If you already know about Android, this will be a fast track to use Kotlin in your projects. – Kotlin for Android Developers, The book: The best way if you want to learn fast and learn it forever. You shouldn’t miss it, there are articles for beginners and medium levels. – This blog: previous link send you to a place where I compile all the articles that talk about Kotlin. One of the nicest references about a language I know. – Kotlin reference: It’s the best place you can go if you want to dive into all the details regarding the language. There is already a lot of information, but if you want to really focus and learn fast, I recommend you these sources: Where do I start learning Kotlin for Android? Kotlin is here to stay, and I recommend you to start learning about it. I’ve been talking a lot about Kotlin in this blog, but now that Google is also talking about Kotlin, and that Kotlin 1.0 RC has been released, there’s no doubt that Kotlin is much more than just an alternative for Android. ![]()
0 Comments
Leave a Reply. |