Introductory talk about Kotlin for Android. In this talk my goal is to teach you something about Kotlin and show how you can use Kotlin to build robust and less crashable apps while having fun developing.
and JavaScript • Works everywhere where Java works • 100% interoperable with Java™ • Combines Object Oriented and Functional features • Made by good folks at JetBrains • Open source
MyFragment.newInstance()) } // Old way val trans = fragmentManager.beginTransaction() trans.replace(R.id.home_content, MyFragment.newInstance()) trans.commit()
your task long executionTime = System.currentTimeMillis() - startTime; System.out.println("Execution Time = " + executionTime + "ms"); // Kotlin val executionTime = measureTimeMillis { // Do your task } println("Execution Time = $executionTime ms")
(6K) to your app • No static methods and variables. The same functionality can be achieved using companion objects • Difficulty in coding in functional paradigm
be a better way to do something • Use Kotlin to Java converter to convert Java files to Kotlin (Shortcut: Ctrl + Alt + Shift + K) • You can begin writing test cases or data classes for your models to slowly start adding Kotlin to your project
of respective companies. • Kotlin Official Website • Kotlin and Android • Why Kotlin-ize your Android Development Medium - Akshay Chordiya • Antonio Leiva Blog • Android Development with Kotlin — Jake Wharton • Easter Functions in Kotlin • Being more productive with Kotlin • Kotlin - Goodbye findViewById