Below is an example of using a SearchView in an Android application using java/Kotlin. In this example, we'll create a simple app with a SearchView in the action bar, and we'll handle search queries.
Here is the tutorial for Kotlin
Open Device Manager, run the emulator, and then run the application. Next, check the working output and check the output you declared in your code.