mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Change offscreenPageLimit to 1
This commit is contained in:
parent
5bec2e610e
commit
ec7f9d3002
1 changed files with 1 additions and 1 deletions
|
|
@ -179,7 +179,7 @@ public class HomeFragment extends Fragment {
|
||||||
|
|
||||||
discoverSongAdapter = new DiscoverSongAdapter(activity, requireContext());
|
discoverSongAdapter = new DiscoverSongAdapter(activity, requireContext());
|
||||||
bind.discoverSongViewPager.setAdapter(discoverSongAdapter);
|
bind.discoverSongViewPager.setAdapter(discoverSongAdapter);
|
||||||
bind.discoverSongViewPager.setOffscreenPageLimit(3);
|
bind.discoverSongViewPager.setOffscreenPageLimit(1);
|
||||||
homeViewModel.getDiscoverSongSample().observe(requireActivity(), songs -> {
|
homeViewModel.getDiscoverSongSample().observe(requireActivity(), songs -> {
|
||||||
if (songs == null) {
|
if (songs == null) {
|
||||||
if (bind != null) bind.homeDiscoveryPlaceholder.placeholder.setVisibility(View.VISIBLE);
|
if (bind != null) bind.homeDiscoveryPlaceholder.placeholder.setVisibility(View.VISIBLE);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue