Have the split ActionBar display twice as many icons

社会主义新天地 提交于 2019-12-03 13:20:32
Benoit Duffez

Looks like I posted too fast, it seems it's not possible.

Duplicates:

Apparently this is not possible. However they did it in gmail/gplus, maybe using a custom view for the bottom part... Still expecting a better answer to this!

Reto Meier's word on this:

I think the problem with splitting the actions between the top and bottom is that it would make it more difficult to perform actions. Actions should be the most important things to do on an Activity -- splitting them between the top and bottom of the screen means users need to look in two places rather than one.

I was also wondering how these apps had icons in both bars, so I decompiled two of them.

What I found is that these two apps didn't implement the ActionBar at all and use custom layouts for both bars. I'm not sure if I can name these apps here, but they are well known apps with 10M+ downloads.

I strongly suggest to go the same way if you don't like the default ActionBar (which have very little room for customization) and create custom layouts instead (not necessary for both bars, it depends on your needs).

It's quite easy to reproduce the split action bar layout. Its height is always 48dp whatever the device is, so a simple LinearLayout or RelativeLayout with a fixed height and some transparent image buttons work very vell. In only 15 minutes you get a fully customizable split action bar.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!