Set up ViewPager and PagerAdapter to use cursor