https://kotlinlang.org logo
#android
Title
# android
s

sikanderbhutto

06/21/2017, 10:45 AM
how to TextView textView in kotlin
g

gildor

06/21/2017, 11:11 AM
sikanderbhutto: sorry? Do you mean create variable of particular type?
s

sikanderbhutto

06/21/2017, 11:12 AM
in java TextView id set findviewbyid now in kotlin how can i do
l

Loránd

06/21/2017, 11:44 AM
@sikanderbhutto I assume you mean finding a view of type TextView in your layout? In Kotlin from your activity you can do:
Copy code
val textView = findViewById(R.id.view_id) as TextView
g

gildor

06/21/2017, 2:50 PM
Just write your code in java, copy and paste to Kotlin file
s

sikanderbhutto

06/22/2017, 5:57 AM
I need kotlin tutorial please share with me
g
kotlin docs are very good btw https://kotlinlang.org/docs/reference/
if you like video tutorials, this is a nice video tutorial -

https://www.youtube.com/watch?v=H_oGi8uuDpA

Actually bunch of them in internet
👍 2
5 Views