1

I have already implemented Search Interface for my app following the steps outlined in the guide below:

https://developer.android.com/guide/topics/search/search-dialog

I want to create custom styling for the SearchView as used in Google Chrome app and Google Photos app

enter image description here

enter image description here

How can we style Android SearchView embedded in Toolbar using Android Support Library?

I've already seen the following answer but that's limited to icons and text styling. I want to create custom borders and backgrounds.

https://stackoverflow.com/a/28018439/4419474

Chebyr
  • 2,171
  • 1
  • 20
  • 30

1 Answers1

0

You can create a drawable XML with shape rectangle and add the tags of corner radius, solid colour to define your background shape.

Then add this drawable XML as background to the cardView. Inside this cardview add your SearchView widget.

Please let me know if you need any more help.

hemandroid
  • 568
  • 4
  • 12