In 3.0 tablet gmail app, when I click on the search button(on the action bar), it moves to the right and takes the whole action bar. How can I do this? Only way I can think is that by hiding all the other custom action bar fields when the search button is clicked. Is there an easier way? Thanks.
You have to add an Action View. You can control which elements of your action bar are automatically "hidden" when there is no place for them declaring android:showAsAction="ifRoom"
in your menu layout and force the ones that you always want to display using android:showAsAction="always"
.
Check the action bar documentation for some samples.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With