显示在标签片段的最好方法?片段、标签、方法

2023-09-04 03:44:47 作者:深夜一个人数伤疤

我正在写一个应用程序,其中每个选项卡必须显示不同的ListFragment看法。我已经完成工作的ListFragment和它的作品没有任何问题。现在,我想他们使用标签来显示,这样任何ListFragment可以通过选择各自的选项卡进行访问。 什么是做到这一点的最好方法是什么?

I'm writing an app in which each tab must display a different ListFragment view. I've finished working on the ListFragment and it works without any issues. Now, I would like to display them using tabs so that any ListFragment can be accessed by selecting it's respective tab. What's the best way to do this?

推荐答案

一个很好的方法是使用ActionBarSherlock + ViewPager:

A good way is to use ActionBarSherlock + ViewPager :

的http://www.androidbegin.com/tutorial/android-actionbarsherlock-viewpager-tabs-tutorial/