SlideShare a Scribd company logo
1 of 31
The State of Kotlin 2018
Prepared by Shady Selim
facebook.com/Kotlin.Cairo
+
Speaker Bio
• Official Google Speaker
• GDG Helwan Founder & Leader
• Kotlin Cairo User Group Founder
• Mentor and tester in Udacity Nanodegree
• Mobile & Web Evangelist
• Technology savvy
• Think tank
• UI/UX freak
linkedin.com/in/ShadySelim/
@dr_Shady_Selim
+
Kotlin History
• Created by Jetbrains on 2011
• Open sourced on 2012
• Reached version 1 on 2016
• Adopted by Google on 2017
+
Google announce Kotlin as 1st Class language
+
Kotlin is:
• Statically typed programming language targeting the JVM
• Support for functional and OO paradigms
• Pragmatic, safe, concise, great Java interop
• Free and open-source
• Drastically reduces the amount of boilerplate code
• Having Lambda expression
• Avoids entire classes of errors such as null pointer exceptions
• Supported by Google
+
Kotlin Strengths
• Modeling the data of your application concisely and expressively
• Creating reusable abstractions using functional programming
techniques
• Creating expressive domain-specific languages (DSL)
• Java interop ensures that all existing Java frameworks can be used
• No rewrite required to start using Kotlin in existing codebase
• Existing investment is fully preserved
+
Kotlin Strengths
+
• Extensions
• Anko (Commons, Layouts, SQLite, & Coroutines)
• No new
• No semi colon
• Smart casting
• Great IDE and tooling supports
• Variables (val vs. var)
• Functional and OOP paradigm
Java Model Class Example
+
Java Model Class Example, cont.
+
Java Model Class Example, cont.
+
Kotlin Model Class Example
+
Kotlin Data Class
+
• Provides a Customer class with the following functionality:
• getters (and setters in case of vars) for all properties
• equals()
• hashCode()
• toString()
• copy()
• component1(), component2(), …, for all properties (see Data classes)
String Interpolation
+
println("Name $name")
Switch Case (aka: Instance Checks)
+
when (x) {
is Foo -> ...
is Bar -> ...
else -> ...
}
For Loop (aka: Ranges)
+
for (i in 1..100) { ... } // closed range: includes 100
for (i in 1 until 100) { ... } // half-open range: does not include 100
for (x in 2..10 step 2) { ... }
for (x in 10 downTo 1) { ... }
if (x in 1..10) { ... }
String Interpolation
+
val positives = list.filter { x -> x > 0 }
Filtering a list
Filtering a list
val positives = list.filter { it > 0 }
Extension Functions
+
fun String.spaceToCamelCase() { ... }
"Convert this to camelcase".spaceToCamelCase()
If not null shorthand
+
val files = File("Test").listFiles()
println(files?.size)
What if want to not accept null and throw exception in case of Null?
println(files!!.size)
If not null and else shorthand
+
val files = File("Test").listFiles()
println(files?.size ?: "empty")
Executing a statement if null
val values = ...
val email = values["email"] ?: throw IllegalStateException("Email is missing!")
Calling multiple methods on an object
+
class Turtle {
fun penDown()
fun penUp()
fun turn(degrees: Double)
fun forward(pixels: Double)
}
val myTurtle = Turtle()
with(myTurtle) { //draw a 100 pix square
penDown()
for(i in 1..4) {
forward(100.0)
turn(90.0)
}
penUp()
}
What's new in Android (Google I/O '18)
+
youtube.com/watch?v=eMHsnvhcf78&list=PLVVyfDfMc59tyEmN_V1Gv9imR8Ujld1MW&index=4
min 7 , sec 22
Modern Android development: Android Jetpack,
Kotlin, and more (Google I/O 2018)
+
youtube.com/watch?v=IrMw7MEgADk&list=PLVVyfDfMc59tyEmN_V1Gv9imR8Ujld1MW&index=9
min 16 , sec 12
Android KTX
+
A set of Kotlin extensions for Android app development. The
goal of Android KTX is to make Android development with
Kotlin more concise, pleasant, and idiomatic by leveraging
the features of the language such as extension
functions/properties, lambdas, named parameters, and
parameter defaults. It is an explicit goal of this project to not
add any new features to the existing Android APIs.
github.com/android/android-ktx/
Android KTX – cont.
+
view.viewTreeObserver.addOnPreDrawListener(
object : ViewTreeObserver.OnPreDrawListener {
override fun onPreDraw(): Boolean {
viewTreeObserver.removeOnPreDrawListener(this)
actionToBeTriggered()
return true
}
})
Kotlin:
view.doOnPreDraw { actionToBeTriggered() }
Kotlin with Android KTX:
How to learn Kotlin? (1)
+
How to learn Kotlin? (2)
+
try.kotlinlang.org/#/Kotlin%20Koans/Introduction/Hello,%20world!/Task.kt
How to learn Kotlin? (3)
+
https://eg.udacity.com/course/kotlin-bootcamp-for-programmers--ud9011
How to learn Kotlin? (4)
+
caster.io/lessons/android-mvvm-pattern-introduction-to-mvvm-for-android-with-data-binding
Try Kotlin Sandbox
+
https://kotlin.link/
+
Thank You
+

More Related Content

What's hot

What's hot (20)

Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
 
Intro to Kotlin
Intro to KotlinIntro to Kotlin
Intro to Kotlin
 
Jug trojmiasto 2014.04.24 tricky stuff in java grammar and javac
Jug trojmiasto 2014.04.24  tricky stuff in java grammar and javacJug trojmiasto 2014.04.24  tricky stuff in java grammar and javac
Jug trojmiasto 2014.04.24 tricky stuff in java grammar and javac
 
Value objects in JS - an ES7 work in progress
Value objects in JS - an ES7 work in progressValue objects in JS - an ES7 work in progress
Value objects in JS - an ES7 work in progress
 
Web futures
Web futuresWeb futures
Web futures
 
Scala jargon cheatsheet
Scala jargon cheatsheetScala jargon cheatsheet
Scala jargon cheatsheet
 
Roslyn and C# 6.0 New Features
Roslyn and C# 6.0 New FeaturesRoslyn and C# 6.0 New Features
Roslyn and C# 6.0 New Features
 
Scala: Object-Oriented Meets Functional, by Iulian Dragos
Scala: Object-Oriented Meets Functional, by Iulian DragosScala: Object-Oriented Meets Functional, by Iulian Dragos
Scala: Object-Oriented Meets Functional, by Iulian Dragos
 
Extensible Operators and Literals for JavaScript
Extensible Operators and Literals for JavaScriptExtensible Operators and Literals for JavaScript
Extensible Operators and Literals for JavaScript
 
JS Responsibilities
JS ResponsibilitiesJS Responsibilities
JS Responsibilities
 
Int64
Int64Int64
Int64
 
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
 
Session 4#
Session 4#Session 4#
Session 4#
 
Kotlin
KotlinKotlin
Kotlin
 
6 Programming Languages under investigation
6 Programming Languages under investigation6 Programming Languages under investigation
6 Programming Languages under investigation
 
JavaScript Foundations Day1
JavaScript Foundations Day1JavaScript Foundations Day1
JavaScript Foundations Day1
 
Lua. The Splendors and Miseries of Game Scripting
Lua. The Splendors and Miseries of Game ScriptingLua. The Splendors and Miseries of Game Scripting
Lua. The Splendors and Miseries of Game Scripting
 
Getting started with C++
Getting started with C++Getting started with C++
Getting started with C++
 
XAML/C# to HTML/JS
XAML/C# to HTML/JSXAML/C# to HTML/JS
XAML/C# to HTML/JS
 
Monte Carlo C++
Monte Carlo C++Monte Carlo C++
Monte Carlo C++
 

Similar to Intro to kotlin 2018

Dr archana dhawan bajaj - c# dot net
Dr archana dhawan bajaj - c# dot netDr archana dhawan bajaj - c# dot net
Dr archana dhawan bajaj - c# dot net
Dr-archana-dhawan-bajaj
 

Similar to Intro to kotlin 2018 (20)

Kotlin for android 2019
Kotlin for android 2019Kotlin for android 2019
Kotlin for android 2019
 
Kotlin: Why Do You Care?
Kotlin: Why Do You Care?Kotlin: Why Do You Care?
Kotlin: Why Do You Care?
 
Being Expressive in Code
Being Expressive in CodeBeing Expressive in Code
Being Expressive in Code
 
Polyglot
PolyglotPolyglot
Polyglot
 
Who killed object oriented design?
Who killed object oriented design?Who killed object oriented design?
Who killed object oriented design?
 
Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)
 
Kotlin fundamentals - By: Ipan Ardian
Kotlin fundamentals - By: Ipan ArdianKotlin fundamentals - By: Ipan Ardian
Kotlin fundamentals - By: Ipan Ardian
 
Kotlin Fundamentals
Kotlin Fundamentals Kotlin Fundamentals
Kotlin Fundamentals
 
Dr archana dhawan bajaj - c# dot net
Dr archana dhawan bajaj - c# dot netDr archana dhawan bajaj - c# dot net
Dr archana dhawan bajaj - c# dot net
 
Kotlin for Android Development
Kotlin for Android DevelopmentKotlin for Android Development
Kotlin for Android Development
 
Introduction to Kotlin
Introduction to KotlinIntroduction to Kotlin
Introduction to Kotlin
 
Why Kotlin is your next language?
Why Kotlin is your next language? Why Kotlin is your next language?
Why Kotlin is your next language?
 
Ceylon - the language and its tools
Ceylon - the language and its toolsCeylon - the language and its tools
Ceylon - the language and its tools
 
Go 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoGo 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX Go
 
Scala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghScala @ TechMeetup Edinburgh
Scala @ TechMeetup Edinburgh
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojure
 
Kotlin Overview
Kotlin OverviewKotlin Overview
Kotlin Overview
 
Kotlin for Android devs
Kotlin for Android devsKotlin for Android devs
Kotlin for Android devs
 
"Scala in Goozy", Alexey Zlobin
"Scala in Goozy", Alexey Zlobin "Scala in Goozy", Alexey Zlobin
"Scala in Goozy", Alexey Zlobin
 
Go from a PHP Perspective
Go from a PHP PerspectiveGo from a PHP Perspective
Go from a PHP Perspective
 

More from Shady Selim

More from Shady Selim (20)

What is Kotlin Multiplaform? Why & How?
What is Kotlin Multiplaform? Why & How? What is Kotlin Multiplaform? Why & How?
What is Kotlin Multiplaform? Why & How?
 
Kotlin native for iOS and Android
Kotlin native for iOS and AndroidKotlin native for iOS and Android
Kotlin native for iOS and Android
 
Introduction on Mobile development
Introduction on Mobile developmentIntroduction on Mobile development
Introduction on Mobile development
 
Game development using Flutter
Game development using FlutterGame development using Flutter
Game development using Flutter
 
I/O 2019 android updates
I/O 2019 android updatesI/O 2019 android updates
I/O 2019 android updates
 
What's new in android 2018 (dev fest)
What's new in android 2018 (dev fest)What's new in android 2018 (dev fest)
What's new in android 2018 (dev fest)
 
Intro to Flutter
Intro to FlutterIntro to Flutter
Intro to Flutter
 
The magic of flutter
The magic of flutterThe magic of flutter
The magic of flutter
 
Intro to Kotlin
Intro to KotlinIntro to Kotlin
Intro to Kotlin
 
Intro to Kotlin Minia GDG DevFest 2017
Intro to Kotlin Minia GDG DevFest 2017Intro to Kotlin Minia GDG DevFest 2017
Intro to Kotlin Minia GDG DevFest 2017
 
Kotlin for Frontend & Backend Web development
Kotlin for Frontend & Backend Web developmentKotlin for Frontend & Backend Web development
Kotlin for Frontend & Backend Web development
 
Kotlin for android
Kotlin for androidKotlin for android
Kotlin for android
 
Intro to Kotlin
Intro to KotlinIntro to Kotlin
Intro to Kotlin
 
Firebase
FirebaseFirebase
Firebase
 
Android content provider explained
Android content provider explainedAndroid content provider explained
Android content provider explained
 
Design for Web and Mobile
Design for Web and MobileDesign for Web and Mobile
Design for Web and Mobile
 
Towards a better higher education system by Shady Selim
Towards a better higher education system by Shady SelimTowards a better higher education system by Shady Selim
Towards a better higher education system by Shady Selim
 
Android Programing Course Material Labs
Android Programing Course Material LabsAndroid Programing Course Material Labs
Android Programing Course Material Labs
 
Android Programing Course Material
Android Programing Course Material Android Programing Course Material
Android Programing Course Material
 
Cross mobility
Cross mobilityCross mobility
Cross mobility
 

Recently uploaded

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Recently uploaded (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 

Intro to kotlin 2018

  • 1. The State of Kotlin 2018 Prepared by Shady Selim facebook.com/Kotlin.Cairo +
  • 2. Speaker Bio • Official Google Speaker • GDG Helwan Founder & Leader • Kotlin Cairo User Group Founder • Mentor and tester in Udacity Nanodegree • Mobile & Web Evangelist • Technology savvy • Think tank • UI/UX freak linkedin.com/in/ShadySelim/ @dr_Shady_Selim +
  • 3. Kotlin History • Created by Jetbrains on 2011 • Open sourced on 2012 • Reached version 1 on 2016 • Adopted by Google on 2017 +
  • 4. Google announce Kotlin as 1st Class language +
  • 5. Kotlin is: • Statically typed programming language targeting the JVM • Support for functional and OO paradigms • Pragmatic, safe, concise, great Java interop • Free and open-source • Drastically reduces the amount of boilerplate code • Having Lambda expression • Avoids entire classes of errors such as null pointer exceptions • Supported by Google +
  • 6. Kotlin Strengths • Modeling the data of your application concisely and expressively • Creating reusable abstractions using functional programming techniques • Creating expressive domain-specific languages (DSL) • Java interop ensures that all existing Java frameworks can be used • No rewrite required to start using Kotlin in existing codebase • Existing investment is fully preserved +
  • 7. Kotlin Strengths + • Extensions • Anko (Commons, Layouts, SQLite, & Coroutines) • No new • No semi colon • Smart casting • Great IDE and tooling supports • Variables (val vs. var) • Functional and OOP paradigm
  • 8. Java Model Class Example +
  • 9. Java Model Class Example, cont. +
  • 10. Java Model Class Example, cont. +
  • 11. Kotlin Model Class Example +
  • 12. Kotlin Data Class + • Provides a Customer class with the following functionality: • getters (and setters in case of vars) for all properties • equals() • hashCode() • toString() • copy() • component1(), component2(), …, for all properties (see Data classes)
  • 14. Switch Case (aka: Instance Checks) + when (x) { is Foo -> ... is Bar -> ... else -> ... }
  • 15. For Loop (aka: Ranges) + for (i in 1..100) { ... } // closed range: includes 100 for (i in 1 until 100) { ... } // half-open range: does not include 100 for (x in 2..10 step 2) { ... } for (x in 10 downTo 1) { ... } if (x in 1..10) { ... }
  • 16. String Interpolation + val positives = list.filter { x -> x > 0 } Filtering a list Filtering a list val positives = list.filter { it > 0 }
  • 17. Extension Functions + fun String.spaceToCamelCase() { ... } "Convert this to camelcase".spaceToCamelCase()
  • 18. If not null shorthand + val files = File("Test").listFiles() println(files?.size) What if want to not accept null and throw exception in case of Null? println(files!!.size)
  • 19. If not null and else shorthand + val files = File("Test").listFiles() println(files?.size ?: "empty") Executing a statement if null val values = ... val email = values["email"] ?: throw IllegalStateException("Email is missing!")
  • 20. Calling multiple methods on an object + class Turtle { fun penDown() fun penUp() fun turn(degrees: Double) fun forward(pixels: Double) } val myTurtle = Turtle() with(myTurtle) { //draw a 100 pix square penDown() for(i in 1..4) { forward(100.0) turn(90.0) } penUp() }
  • 21. What's new in Android (Google I/O '18) + youtube.com/watch?v=eMHsnvhcf78&list=PLVVyfDfMc59tyEmN_V1Gv9imR8Ujld1MW&index=4 min 7 , sec 22
  • 22. Modern Android development: Android Jetpack, Kotlin, and more (Google I/O 2018) + youtube.com/watch?v=IrMw7MEgADk&list=PLVVyfDfMc59tyEmN_V1Gv9imR8Ujld1MW&index=9 min 16 , sec 12
  • 23. Android KTX + A set of Kotlin extensions for Android app development. The goal of Android KTX is to make Android development with Kotlin more concise, pleasant, and idiomatic by leveraging the features of the language such as extension functions/properties, lambdas, named parameters, and parameter defaults. It is an explicit goal of this project to not add any new features to the existing Android APIs. github.com/android/android-ktx/
  • 24. Android KTX – cont. + view.viewTreeObserver.addOnPreDrawListener( object : ViewTreeObserver.OnPreDrawListener { override fun onPreDraw(): Boolean { viewTreeObserver.removeOnPreDrawListener(this) actionToBeTriggered() return true } }) Kotlin: view.doOnPreDraw { actionToBeTriggered() } Kotlin with Android KTX:
  • 25. How to learn Kotlin? (1) +
  • 26. How to learn Kotlin? (2) + try.kotlinlang.org/#/Kotlin%20Koans/Introduction/Hello,%20world!/Task.kt
  • 27. How to learn Kotlin? (3) + https://eg.udacity.com/course/kotlin-bootcamp-for-programmers--ud9011
  • 28. How to learn Kotlin? (4) + caster.io/lessons/android-mvvm-pattern-introduction-to-mvvm-for-android-with-data-binding