mirror of
https://github.com/syncthing/syncthing-android.git
synced 2025-01-08 11:11:34 +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 {
|
try {
|
||||||
mViewPager.setAdapter(mSectionsPagerAdapter);
|
mViewPager.setAdapter(mSectionsPagerAdapter);
|
||||||
|
mViewPager.setOffscreenPageLimit(numPages);
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
/**
|
/**
|
||||||
* IllegalStateException happens due to a bug in FragmentStatePagerAdapter.
|
* IllegalStateException happens due to a bug in FragmentStatePagerAdapter.
|
||||||
|
@ -294,7 +295,6 @@ public class MainActivity extends SyncthingActivity
|
||||||
.setPositiveButton(android.R.string.ok, (dialog, which) -> {})
|
.setPositiveButton(android.R.string.ok, (dialog, which) -> {})
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
mViewPager.setOffscreenPageLimit(numPages);
|
|
||||||
TabLayout tabLayout = findViewById(R.id.tabContainer);
|
TabLayout tabLayout = findViewById(R.id.tabContainer);
|
||||||
tabLayout.setupWithViewPager(mViewPager);
|
tabLayout.setupWithViewPager(mViewPager);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue