-
You can check whether the 'lateinit' property was initialized using 'isInitialized' on the corresponding property reference.
#KotlinTips https://pl.kotl.in/3ow9K3Gs7?utm_campaign=tips&utm_source=twitter&utm_medium=social …pic.twitter.com/VWoOQPexju
-
Use the combination of safe cast and ‘let’ to only perform an action if the expression has a specific type
#KotlinTips pic.twitter.com/yQmy6CyhE6 -
Use ‘it’ only in the simplest scenarios, when its type is clear from the context. Otherwise, introduce an explicit lambda parameter or use member references. It’s especially important for call chains where the lambda parameter type changes from one call to the next
#KotlinTips pic.twitter.com/Z8ZFvfbAv7 -
Use the @JvmName annotation to change the generated class name containing all the package-level functions and properties. Use @JvmMultifileClass to combine the contents of several files under one "facade class".
#KotlinTips pic.twitter.com/weMMIuYgIB -
If you get lost inside nested scopes, remember that 'this.' always refers to the innermost one, which is useful for making sure something comes from the current scope instead of being inherited from an outer one.
#KotlinTips pic.twitter.com/XLUtKPUmQO
-
I am finally resuming this after 1month of no coding.
#Android#KotlinTips#kotlinpic.twitter.com/6tCPr4KT7e
-
For the love of Android
#Kotlin#Android#AndroidStudio#KotlinTips https://link.medium.com/7UCKemHnv3 -
Kotlin support in Sublime Text
#sublime#kotlintips#kotlin https://www.kotlintips.com/kotlin-support-in-sublime-text/ …pic.twitter.com/yntzfQK3Nk
-
Default implementation for Kotlin interfaces
#kotlintips#java#kotlinhttps://www.kotlintips.com/default-implementation-for-kotlin-interfaces/ … -
The Kotlin/JS Gradle plugin ships with webpack-dev-server. Together with Gradle continuous builds (using the "-t" run configuration argument in IntelliJ IDEA or by invoking ./gradlew -t run), you can have your page reload automatically whenever you change your code.
#KotlinTips pic.twitter.com/Xzx5744G9Q -
Determining the Kotlin version at runtime
#KotlinTips#assertj#kotlinversionhttps://www.kotlintips.com/determining-the-kotlin-version-at-runtime/ … -
Have you ever explored Returns, Jumps & Labels in Kotlin? Learn about it from here: https://blog.mindorks.com/learn-kotlin-returns-jumps-labels … Keep supporting, keep learning, keep sharing.
#AndroidDev#kotlin#KotlinTips -
Curious about what font we’ve been using for
#KotlinTips all this time? It’s the new font from JetBrains: JetBrains Mono! https://www.jetbrains.com/lp/mono/ pic.twitter.com/8nkoXv7jLL -
To write typesafe HTML directly inside your Kotlin code, use the kotlinx.html library. This is especially useful when building apps for the browser using Kotlin/JS!
#KotlinTips pic.twitter.com/j3GDaI2udR
-
Backing fields in
#Kotlin - It is generated for any property if it uses the default implementation of any of its accessor or custom accessor references it through the field - It can be accessed inside accessors only with name 'field'#KotlinTips#AndroidDevpic.twitter.com/yQ5GMaGJRN
Prikaži ovu nit -
raw strings in
#Kotlin - raw strings are wrapped by """ instead of " - See example in the following image the difference between trimIndent & trimMargin#KotlinTips#AndroidDevpic.twitter.com/BAQgwcMWPh
-
-
The method of .drop(k) removes k first symbols from the string. Also, it returns the resulting string.
#KotlinTips pic.twitter.com/vFFGPgrUjT
-
Still battling with overriding unnecessary custom view constructors and java operability.
@JvmOverloads is made for you.#KotlinTips#kotlin#Android#AndroidDev#custom#viewpic.twitter.com/ihFDxvETm6
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.