回答

0

好的,你需要使用的是一个ViewPager这将显示你的内容作为页面你想要的视图,它会让你在它们之间滑动。

Here是一个简单的入门指南。希望这有帮助

+0

谢谢you.But我一直在寻找光标和viewpager一个政党成员,因为正如我说,我有数据。 – Hanane

0

你可以将你的CursorAdapter包装在PagerAdapter中以获得两者的功能。它应该是这个样子,虽然我没有这个代码密切测试:

public class CursorPagerAdapter extends PagerAdapter { 
    private CursorAdapter mCursorAdapter; 

    public CursorPagerAdapter(CursorAdapter cursorAdapter) { 
     mCursorAdapter = cursorAdapter; 
    } 

    @Override 
    public int getCount() { 
     return mCursorAdapter.getCount(); 
    } 

    @Override 
    public boolean isViewFromObject(View view, Object object) { 
     return view == object; 
    } 

    @Override 
    public Object instantiateItem(ViewGroup container, int position) { 
     View view = mCursorAdapter.getView(position, null, container); 
     mCursorAdapter.getCursor().moveToPosition(position); 
     mCursorAdapter.bindView(view, container.getContext(), mCursorAdapter.getCursor()); 
     return view; 
    } 

    @Override 
    public void destroyItem(ViewGroup container, int position, Object object) { 
     container.removeView((View)object); 
    } 

}