sp; pager.setCurrentItem(2); } else { pager.setCurrentItem(3); } } }); pager = (ViewPager) findViewById(R.id.viewpage); final ArrayList<View> list = new ArrayList<View>(); Intent intent = new Intent(context, A.class); list.add(getView("A", intent)); Intent intent2 = new Intent(context, B.class); list.add(getView("B", intent2)); Intent intent3 = new Intent(context, C.class); list.add(getView("C", intent3)); Intent intent4 = new Intent(context, D.class); list.add(getView("D", intent4)); pager.setAdapter(new PagerAdapter() { @Override public void destroyItem(View arg0, int arg1, Object arg2) { ViewPager pViewPager = ((ViewPager) arg0); &nbs
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页