Kotlin Textview id reference doesn't work with non-english characters

589 Views Asked by At

i'm create Textview with non-english id in my layout.xml then i want to use it in activity.kt

layout.xml,

<TextView
    android:id="@+id/sonuç"
    .
    .
    ... />

activity.kt,

sonuç.text = "Hello World"

I'm getting an error, Unresolving reference:sonuç

What is the solution?

Update!

var sonuç : TextView = findViewById(R.id.sonuç)
sonuç.text = "Hello World"

This code worked fine in Kotlin. Why?

0

There are 0 best solutions below