I get a "Type mismatch: inferred type is String but Editable! was expected" I used this same code down below and it works?

Viewed 7289
override fun update(message: String) {
    var text = textViewInstructions.text.toString()

    val timer = object : CountDownTimer(3000, 1000) {
        override fun onTick(millisUntilFinished: Long) {
            textViewInstructions.setText(newText)
            textViewInstructions.setSelection(textViewInstructions.text.length)
        }

        override fun onFinish() {
            textViewInstructions.text = ""  // this line here ??
        }
    }
    timer.start()
}
1 Answers

In this case of EditText, You need to use

textViewInstructions.setText("")

Read more here

Related