mirror of
https://github.com/syncthing/syncthing-android.git
synced 2025-01-07 10:42:07 +00:00
parent
30efd903b5
commit
e468f5a29c
1 changed files with 1 additions and 1 deletions
|
@ -280,6 +280,7 @@ public class MainActivity extends SyncthingActivity
|
|||
};
|
||||
try {
|
||||
mViewPager.setAdapter(mSectionsPagerAdapter);
|
||||
mViewPager.setOffscreenPageLimit(numPages);
|
||||
} catch (IllegalStateException e) {
|
||||
/**
|
||||
* IllegalStateException happens due to a bug in FragmentStatePagerAdapter.
|
||||
|
@ -294,7 +295,6 @@ public class MainActivity extends SyncthingActivity
|
|||
.setPositiveButton(android.R.string.ok, (dialog, which) -> {})
|
||||
.show();
|
||||
}
|
||||
mViewPager.setOffscreenPageLimit(numPages);
|
||||
TabLayout tabLayout = findViewById(R.id.tabContainer);
|
||||
tabLayout.setupWithViewPager(mViewPager);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue