how to use material 3 searchbar from xml

45 views Asked by At

I want to use material 3 searchbar in my kotlin app, I can't figure out how to put and get the text in searchbar, when I click on it, it behaves like a button (shows ripples) but can't put text in it

<com.google.android.material.search.SearchBar
    android:id="@+id/search_bar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:backgroundTint="@color/navigationbarcolor"
    android:hint="Search" />
0

There are 0 answers