I am developing Android project in Kotlin.
I got my toolbar:
@BindView(R.id.tool_bar)
lateinit var toolbar: Toolbar
I want to set its title :
// student.id is a int type
toolbar.title = student.id
Student's id is a Int
type. toolbar.title expects a value of type CharSequence
. How to assign my id to toolbar's title? I mean how can I convert student.id
to CharSequence
so that I can assign it to my toolbar title ?