aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github/daneren2005
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2013-07-01 13:01:02 -0700
committerdaneren2005 <daneren2005@gmail.com>2013-07-01 13:01:02 -0700
commit9bebdf720ee3326445729a1ca5c046c97d8f503d (patch)
tree88c5deb97f22ae363a5e85cee2678986ba17f914 /subsonic-android/src/github/daneren2005
parentba540b9b9218756c479b98616fe9f1000cab0d2d (diff)
downloaddsub-9bebdf720ee3326445729a1ca5c046c97d8f503d.tar.gz
dsub-9bebdf720ee3326445729a1ca5c046c97d8f503d.tar.bz2
dsub-9bebdf720ee3326445729a1ca5c046c97d8f503d.zip
Stop ViewPager from destroying off screen fragments
Diffstat (limited to 'subsonic-android/src/github/daneren2005')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java
index 3b6a456d..edbf216a 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java
@@ -149,6 +149,7 @@ public class MainActivity extends SubsonicActivity {
});
viewPager = (ViewPager) findViewById(R.id.pager);
+ viewPager.setOffscreenPageLimit(4);
pagerAdapter = new TabPagerAdapter(this, viewPager);
viewPager.setAdapter(pagerAdapter);
viewPager.setOnPageChangeListener(pagerAdapter);