Project

General

Profile

« Previous | Next » 

Revision d5522531

Added by Leszek Koltunski almost 6 years ago

Bugfix: we need to remember all adjacent TABs, not just half of them to the left or right.

View differences:

src/main/java/org/distorted/examples/effects3d/Effects3DActivity2.java
113 113
    setContentView(view);
114 114

  
115 115
    mViewPager = findViewById(R.id.effects3d_viewpager);
116
    mViewPager.setOffscreenPageLimit( (NUM_TABS+1)/2 );
116
    mViewPager.setOffscreenPageLimit( NUM_TABS-1 );
117 117
    mPager = new Effects3DTabViewPager(this, getSupportFragmentManager() );
118 118
    mViewPager.setAdapter(mPager);
119 119
    TabLayout tabLayout = findViewById(R.id.effects3d_sliding_tabs);

Also available in: Unified diff