Android Split Action Bar-icons only in the bottom

2019-04-16 17:16发布

问题:

I want to force the icons to be placed in the Bottom bar of Android's split action bar, while making sure that the top action bar remains empty. I have experimented a lot, but have not been able to figure out how to do this.

I am sure it is possible, because I have seen it in the Google Maps app. See the image below:

split action bar with icons http://imageshack.us/a/img856/3592/portraito.png

回答1:

The split action bar is only used on -small/-normal screens in portrait orientation -- in all other cases, the action bar behaves normally without a split.

The Samsung Galaxy Tab 2 is a -large device. It will not use a split action bar, regardless of whether it is held in portrait, landscape, or is being stepped on by an elephant.

If you are seeing apps that run on such devices that appear to have split action bars, then they are not using the action bar for those items, but instead are rolling their own bottom bar. This is not advisable.

(note: no actual elephants were harmed in the creation of this answer)