Skip to content

Commit

Permalink
Bring back AudioPlayerFragment pager's setOffscreenPageLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
ebraminio committed Apr 10, 2020
1 parent 64fb23f commit 0416230
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -131,7 +131,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
pager = root.findViewById(R.id.pager);
pager.setAdapter(new AudioPlayerPagerAdapter(this));
// Required for getChildAt(int) in ViewPagerBottomSheetBehavior to return the correct page
// pager.setOffscreenPageLimit(NUM_CONTENT_FRAGMENTS);
pager.setOffscreenPageLimit((int) NUM_CONTENT_FRAGMENTS);
pager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
@Override
public void onPageSelected(int position) {
Expand Down

0 comments on commit 0416230

Please sign in to comment.