Tag: pager

从ViewPager获得专注的视图

我使用ViewPager左右轻扫切换视图。 ViewPager需要一个适配器,所以我build立了这个: public class ListViewPagerAdapter extends PagerAdapter { protected static final String TAG = "ListViewPagerAdapter"; protected static final int NUM_VIEWS = 3; protected final Activity mActivity; public ListViewPagerAdapter(Activity activity) { mActivity = activity; } @Override public int getCount() { return NUM_VIEWS; } @Override public void startUpdate(View container) {} @Override public Object instantiateItem(View container, int position) […]