Remove icon from searchview in ActionBar

I am using the v7 virtual machine support library. When I expand the search, I get a view.

enter image description here

I do not want this search icon on the left. Instead, I want to put it in a tooltip, as shown below.

enter image description here

I want to do this programmatically. How can i achieve this?

Thank.

+4
source share
1 answer

I think I understood what the answer is.

To expand the default search if I use

mSearchView.setIconifiedByDefault(false); 

it will display a search bar, for example, the first image

If I use mSearchView.onActionViewExpanded();, then it is displayed as a second image.

+9
source

Source: https://habr.com/ru/post/1538632/


All Articles