Android SearchView
SearchView:
According to Android Developers, SearchView is a widget in an application that is used to allow the user input of search values.
It is commonly used to enable users to look for something in the application through using a search bar.
The SearchView widget is one of the widgets from the Android widget collection and it is typically located in the application bar or toolbar.
Example:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SearchViewExample"
android:orientation="vertical"
android:padding="16dp">
<SearchView
android:id="@+id/search_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<ListView
android:id="@+id/search_listview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
Output