kotlin-guides
kotlin-guides copied to clipboard
A set of guides for writing Kotlin for Android.
Mandate attaching close parentheses to the preceding tokens, a la the Google Java style guide.
Suggestion if you do not change anything else think about the beginner with Kotlin and Android Studio The path to Lint Checks in kotlin-guides page reads as follows File ->...
https://android.github.io/kotlin-guides/style.html#import-statements > Wildcard imports (of any type) are not allowed. This rule seems contradictory to currently accepted standards for general Kotlin and Kotlin w/ Android development. To borrow from what...
The Kotlin language code style documentation makes clear that for multi-line, multi-argument method calls the arguments should appear on their own lines (potentially in groups): ```kotlin drawSquare( x = 10,...
I think Java prefers ```java if (condition1 && condition 2 || condition3) { // do something } ``` This style would make sense to me in Kotlin as well, but...
I'm translating guides to Chinese, but wondering how to contribute without modifying the source file. Any help would be appreciated.
https://android.github.io/kotlin-guides/interop.html#function-overloads-for-defaults mentions this but in a different context. This is useful even in pure Kotlin, regardless of Java interop because it doesn't require naming the other parameters at the call...
The current guide says: "When a line is broken at a non-assignment operator the break comes before the symbol". Unfortunately this breaks semantics for +/- operators, which can be used...
The style guide is currently silent about which of these is preferred: ```kotlin someFunction( someOtherFunction( someThirdFunction( param1, param2, param3))) ``` ```kotlin someFunction( someOtherFunction( someThirdFunction( param1, param2, param3 ) ) )...
### Such as  ### needs a standard format. (Maybe mine is correct or not)