From 53d3c134032477f85cbf76105d646ef388455eda Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Tue, 19 Feb 2019 08:02:28 +0100 Subject: [PATCH] MainActivity: Remove setOffscreenPageLimit (fixes #327) (fixes #321) --- .../nutomic/syncthingandroid/activities/MainActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java b/app/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java index a6c11084..664c0287 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java @@ -280,7 +280,11 @@ public class MainActivity extends SyncthingActivity }; try { mViewPager.setAdapter(mSectionsPagerAdapter); - mViewPager.setOffscreenPageLimit(numPages); + /** + * See issues #321, #327 + * Call stack on IllegalStateException: onServiceStateChange/updateViewPager/setOffscreenPageLimit + */ + // mViewPager.setOffscreenPageLimit(numPages); } catch (IllegalStateException e) { /** * IllegalStateException happens due to a bug in FragmentStatePagerAdapter.