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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top