Make scrolling nice again

This commit is contained in:
Adrian Ulrich committed 2015-12-31 21:30:20 +01:00
1 parent 6910376b17
commit 1d5ce6d239
2 files changed
+2 -2

No files matched your search

@@ -185,7 +185,6 @@ public class LibraryActivity
mViewPager = pager;
SharedPreferences settings = PlaybackService.getSettings(this);
pager.setOnPageChangeListener(pagerAdapter);
View controls = getLayoutInflater().inflate(R.layout.actionbar_controls, null);
mTitle = (TextView)controls.findViewById(R.id.title);
@@ -204,6 +203,7 @@ public class LibraryActivity
mVanillaTabLayout = (VanillaTabLayout)findViewById(R.id.sliding_tabs);
mVanillaTabLayout.inheritElevation(getActionBar());
mVanillaTabLayout.setOnPageChangeListener(pagerAdapter);
loadTabOrder();
int page = settings.getInt(PrefKeys.LIBRARY_PAGE, PrefDefaults.LIBRARY_PAGE);
@@ -812,7 +812,7 @@ public class LibraryPagerAdapter
// onPageSelected and setPrimaryItem are called in similar cases, and it
// would be nice to use just one of them, but each has caveats:
// - onPageSelected isn't called when the ViewPager is first
// initialized
// initialized if there is no scrolling to do
// - setPrimaryItem isn't called until scrolling is complete, which
// makes tab bar and limiter updates look bad
// So we use both.