I am developing an android app, where I want to put action bar for phones below API 11. I am following the below link.

http://hmkcode.com/add-actionbar-to-android-2-3-x/

I am making use of the v7 support library, and I am able to get the actionbar. But, the problem is I want to add a navigational listener or tab listener to the action bar. How is it possible.

Please help! Thanks in Advance.

有帮助吗?

解决方案

You should use ActionBarSherlock. It is an excellent library of tools that allow you to use Action Bars in older phones and is widely used. The catch is that all your Activities will need to extend SherlockActivity instead of Activity and you have to be careful to call methods like getSherlockActivity() in Fragments instead of getActivity().

其他提示

I prefer HoloEverywhere library

It allows much more than ActionBarSherlock, but makes your app ~3Mb bigger in size

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top