Android Kotlin – Run Event After Finish Type on EditText

Android provide easy way to code event when user finish type on edittext call “setOnEditorActionListener”, for example it catch when user select “enter” button on the keyboard. So no need to check every user input on the EditText that cause your app run slowly. Just insert this code to implement it:

But if you want a spesific case, for example you want an event that run when user enter “search” option on EditText you absolutely can do it too. First you need to make “search” option available when user enter your EditText, enter this code on your layout EditText: