Chrome-like display of menu

2019-05-19 23:13发布

I'm trying to find some information on how to create a menu that looks like the top of the menu for chrome for Android. I have tried experimenting with implementing icons for Android 4.0, but no luck. Tried googeling, but the only thing i found was an answer that said icons can't be implemented when API >= 11.

How does Chrome do it then? It's made for devices that's 4.0+!

enter image description here

2条回答
Anthone
2楼-- · 2019-05-19 23:55

Any ListView can be associated with HeaderViewListAdapter, using this you can attach seperate layouts as a header and or footer to your listViews.

As Vinodkumar said, you can also use ListPopupWindow with HeaderViewListAdapters.

In the Android reference: HeaderViewListAdapter and ListPopupWindow

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-05-20 00:11

Use popup list window to achieve this. As you can add header and footer to any list, you can create one linear layout with back forward and star like options.. Add that view to the popup window.

查看更多
登录 后发表回答