Question

I am using action bar support v7 library. When I expand search view I get look like this.

enter image description here

I dont want this search icon on left. Instead I want to place it in hint like image below.

enter image description here

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

Thanks.

Was it helpful?

Solution

I think I figured out what the answer is.

To expand searchview by default if I use

mSearchView.setIconifiedByDefault(false); 

it will show search bar like first image

If I use mSearchView.onActionViewExpanded(); then it shows like second image.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top