New class ContentsAdapter for the ViewPager