BridgeLab.kt
- 1fun titleFrom(view: TextView): String {
- 2 val raw = view.text
- 3 return raw?.toString()?.trim().orEmpty()
- 4}
A Java helper at the edge
The Java method returns CharSequence. Kotlin decides what null means before the UI sees it.
- The Java signature is not annotated. The Kotlin call treats the result as a platform type.
- Conversion happens in one function, titleFrom.
- The composable receives a String, never the raw Java value.