Avatar ·

How to programmatically move cursor to end of text in EditText in Kotlin?

Hello everyone! I'm a beginner Android developer in Kotlin, and I've encountered what seems like a simple task, but I can't figure it out. I have a screen with an input field (EditText) and a button. The user enters text, then presses the button, and I add some suffix to this text (for example, a unit of measurement: " kg"). After adding, the cursor should automatically move to the very end of the text so that the user can immediately continue typing without tapping the end of the line. Here is my current code: ```kotlin val editText = findViewById(R.id.myEditText) val button = findViewById