Esempio n. 1
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   requestWindowFeature(Window.FEATURE_NO_TITLE);
   setContentView(R.layout.layout_guide_activity);
   mViewPager = (ViewPager) findViewById(R.id.pager);
   background = mViewPager.getBackground();
   mIndicatorLayout = (LinearLayout) findViewById(R.id.indicator_layout);
   mViewPager.setAdapter(new ScreenSlidePagerAdapter(getSupportFragmentManager()));
   setIndicatorLayout();
   setPageChangeListener(mViewPager);
   mViewPager.bringToFront();
 }
  private void setUpViews() {

    mPager = (ViewPager) findViewById(R.id.pager);
    mPagerBackground = mPager.getBackground();
    mIndicatorLayout = (LinearLayout) findViewById(R.id.indicator_layout);

    mPager.setAdapter(new ScreenSlidePagerAdapter(getSupportFragmentManager()));
    setIndicatorLayout();
    setPageChangeListener(mPager);
    mPager.bringToFront();
    // mPagerBackground.setAlpha(0);

    // mPager.setOffscreenPageLimit(2);

  }