
I am trying to implement Action Bar using ActionBar Sherlock. I have three Action Button one of which is a Search Button. On Clicking of the Search Button the Search input field should be displayed which i have already implemented. But i want it to take the full width of the Action Bar. Any idea how i can achieve the same.
first make a editTextLayout
layout_search.xml
In you menu xml add
android:actionLayoutandandroid:showAsAction="always|collapseActionView"for Search option.
For other option make
android:showAsAction="ifRoom"menu.xml
in your activity or fragment override onCreateOptionsMenu like this
fragment.java
and add textWatcherListener