mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Merge pull request #7339 from weihuoya/cache-all-page
Android: cache all page, avoid image flicking when swipe from last page to first page
This commit is contained in:
@ -66,6 +66,7 @@ public final class MainActivity extends AppCompatActivity implements MainView
|
|||||||
PlatformPagerAdapter platformPagerAdapter = new PlatformPagerAdapter(
|
PlatformPagerAdapter platformPagerAdapter = new PlatformPagerAdapter(
|
||||||
getSupportFragmentManager(), this);
|
getSupportFragmentManager(), this);
|
||||||
mViewPager.setAdapter(platformPagerAdapter);
|
mViewPager.setAdapter(platformPagerAdapter);
|
||||||
|
mViewPager.setOffscreenPageLimit(platformPagerAdapter.getCount());
|
||||||
showGames();
|
showGames();
|
||||||
GameFileCacheService.startLoad(this);
|
GameFileCacheService.startLoad(this);
|
||||||
}
|
}
|
||||||
@ -188,6 +189,7 @@ public final class MainActivity extends AppCompatActivity implements MainView
|
|||||||
PlatformPagerAdapter platformPagerAdapter = new PlatformPagerAdapter(
|
PlatformPagerAdapter platformPagerAdapter = new PlatformPagerAdapter(
|
||||||
getSupportFragmentManager(), this);
|
getSupportFragmentManager(), this);
|
||||||
mViewPager.setAdapter(platformPagerAdapter);
|
mViewPager.setAdapter(platformPagerAdapter);
|
||||||
|
mViewPager.setOffscreenPageLimit(platformPagerAdapter.getCount());
|
||||||
mTabLayout.setupWithViewPager(mViewPager);
|
mTabLayout.setupWithViewPager(mViewPager);
|
||||||
mViewPager.setVisibility(View.VISIBLE);
|
mViewPager.setVisibility(View.VISIBLE);
|
||||||
GameFileCacheService.startLoad(this);
|
GameFileCacheService.startLoad(this);
|
||||||
|
Reference in New Issue
Block a user