Expand EditText in actionBar

view full story

http://stackoverflow.com – this is my actionBar I was using searchView then i banished it since it doesn't support android v2.3, then i went to add an edittext to the actionbar on my own and i have successfully added it. However, i want when the user click on the search icon, the edittext appear and when he click on the arrow the edittext dissapear(Like SearchView). How can i do that? Here's my codes: <item android:id="@+id/search" android:showAsAction="always" android:icon="@drawable/search" android:actionLayout="@layout/edittextxml"/> My Class: @Override public void onCreateOptionsMe (HowTos)