ActionBar android with custom shape

女生的网名这么多〃 提交于 2020-01-16 00:46:16

问题


I have to develop an actionBar with a custom shape for an android app.

The actionBar is a rectangle as always, but every option (icon) I add to the actionBar has to be bigger than the actionBar and with a circle shape.

Any ideas how to implement that feature? I can't find how to solve this problem.

Thanks.


回答1:


I think you should remove the ActionBar completely and make your own custom view with desired content (as mentioned) and put that view on top of each activity.

Customizing action bar to such a limit is i think not possible. and even if it is possible it wont be worth so much effort. So make your own Action bar and it will save you trouble and time.




回答2:


I doubt that can be done using an action bar. The shape and style which you have shown, probably can just be a part of the UI of the activity, with action bar disabled for it.

Something like what you have shown would be a custom View. You can create a completely custom View class and use that, or make a reusable layout and include it wherever needed using an include tag.



来源:https://stackoverflow.com/questions/25873654/actionbar-android-with-custom-shape

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