0

Je travaille sur une application nécessitant un SearchView dans le fragment de recherche.SearchView avec des coins arrondis dans ActionBar

Je sais évidemment comment créer un SearchView classique, mais comment est-il possible de le personnaliser pour obtenir un résultat comme celui-ci:

enter image description here

Répondre

0

Utilisez CardView pour envelopper les SearchView

enter image description here

<android.support.v7.widget.CardView 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_margin="5dp" 
    app:cardBackgroundColor="@android:color/darker_gray" 
    app:cardCornerRadius="5dp" 
    app:cardUseCompatPadding="true"> 

    <android.support.v7.widget.SearchView 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" /> 

</android.support.v7.widget.CardView>