how to TextView textView in kotlin
# android
s
how to TextView textView in kotlin
g
sikanderbhutto: sorry? Do you mean create variable of particular type?
s
in java TextView id set findviewbyid now in kotlin how can i do
l
@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
Just write your code in java, copy and paste to Kotlin file
s
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