Bring back AudioPlayerFragment pager's setOffscreenPageLimit
The reason needs cast: https://issuetracker.google.com/issues/144669596
This commit is contained in:
parent
75e9ee9e0d
commit
260d7ee944
|
@ -131,7 +131,7 @@ public class AudioPlayerFragment extends Fragment implements
|
||||||
pager = root.findViewById(R.id.pager);
|
pager = root.findViewById(R.id.pager);
|
||||||
pager.setAdapter(new AudioPlayerPagerAdapter(this));
|
pager.setAdapter(new AudioPlayerPagerAdapter(this));
|
||||||
// Required for getChildAt(int) in ViewPagerBottomSheetBehavior to return the correct page
|
// 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() {
|
pager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onPageSelected(int position) {
|
public void onPageSelected(int position) {
|
||||||
|
|
Loading…
Reference in New Issue