Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin extensions #2

Closed
lub0s opened this issue May 5, 2016 · 3 comments
Closed

Kotlin extensions #2

lub0s opened this issue May 5, 2016 · 3 comments

Comments

@lub0s
Copy link

lub0s commented May 5, 2016

Why is the kotlin code without these extensions https://kotlinlang.org/docs/tutorials/android-plugin.html ? it would reduce your code a bit and make it more readable imo

@SidneyXu
Copy link
Owner

SidneyXu commented May 6, 2016

Actually kotlin extension was already used.

dependencies {
    classpath 'com.android.tools.build:gradle:1.3.1'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
}

The official page is outdated.

@abreslav
Copy link
Contributor

abreslav commented May 6, 2016

Then the "Find View" section needs to be updated to something like:

Kotlin

With Kotlin Android Extensions enabled (no extra dependencies needed):

val title = view.text1

(maybe mention the old way too, but as a fallback)

@SidneyXu
Copy link
Owner

SidneyXu commented May 7, 2016

close #4

@SidneyXu SidneyXu closed this as completed May 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants