Explore tweets tagged as #KotlinTips
#KotlinTips. Null-safety is the bread and butter of Kotlin! Use the null-safe call to avoid if-null checks:
4
40
306
If you need an array of primitives, like an array of ints, use a specific type like 'IntArray' rather then 'Array<Int>' . #KotlinTips
10
48
385
Learn Kotlin Collection Functions: associateBy. Check the example. Learn and Share π. #AndroidDev #Kotlin #KotlinTips #Developer #Android
1
19
82
You can implement an interface to your companion object or extend it from a class. #Kotlin #KotlinTips #Android #AndroidDev
5
17
124
Kotlin Collection Functions: all. Check the example. Learn and Share . #AndroidDev #Kotlin #KotlinTips #Android #Developer
0
9
81
#KotlinTips. We prefer using default arguments instead of overloading. Default arguments in Kotlin remove nearly all use cases for method and constructor overloading.
4
34
220
Inspired by @JorgeCastilloPr tweet I decided to present & describe various ways of exposing LiveData from ViewModel to a View (usually Fragment). #AndroidDev #Kotlin #KotlinTips #LiveData
10
39
121
In Foo::bar, bar can also be an extension to Foo. Like in Char::isLetterOrDigit. #KotlinTips
1
28
139
To create a map from an iterable or a sequence, use βassociateβ function and specify how to build a map entry from each element. If an element becomes a key, use 'associateWith'. If it becomes a value, use 'associateBy' instead. #KotlinTips
1
35
229
Kotlin filtering function - partition(): filters a collection by a predicate and keeps the elements that don't match it in a separate list. Share it if you learned something new. #Kotlin #KotlinTips #AndroidDev #Android
3
36
141
Kotlin - Idiomatic way to remove duplicate strings from an array. - distinct().- toSet().- toMutableSet().- toHashSet(). Share it if you learned something new. #Kotlin #KotlinTips #AndroidDev
1
27
104
If you want to reference enum constants directly in the code, not as just import them. #KotlinTips
1
24
127
Top Paying Programming Technologies In 2020.Link -> #100DaysOfCode #BlackTechTwitter #CodeNewbie #Python #SCALA #javascript #KotlinTips #DevOps #100DaysOfSwiftUI #coding #backend #FrontEnd #ruby #perl #scala #technology #TechNews
0
11
4
Kotlin Best Practices: Constants in Kotlin. Check the example. Learn and Share. #Kotlin #KotlinTips #AndroidDev #Developer
5
11
74
Learn Kotlin Collection Functions: chunked. Check the example. Learn and Share π. #AndroidDev #Kotlin #KotlinTips #Android #Developer
1
6
43