Reduce padding of horizontal home sections to better align them with the titles (#6290)

This commit is contained in:
ByteHamster 2023-01-28 12:56:11 +01:00 committed by GitHub
parent 12793de604
commit 04a8ee5787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -65,6 +65,8 @@ public class EpisodesSurpriseSection extends HomeSection {
viewBinding.recyclerView.setLayoutManager(
new LinearLayoutManager(getContext(), RecyclerView.HORIZONTAL, false));
viewBinding.recyclerView.setAdapter(listAdapter);
int paddingHorizontal = (int) (12 * getResources().getDisplayMetrics().density);
viewBinding.recyclerView.setPadding(paddingHorizontal, 0, paddingHorizontal, 0);
if (seed == 0) {
seed = new Random().nextInt();
}

View File

@ -58,6 +58,8 @@ public class QueueSection extends HomeSection {
viewBinding.recyclerView.setLayoutManager(
new LinearLayoutManager(getContext(), RecyclerView.HORIZONTAL, false));
viewBinding.recyclerView.setAdapter(listAdapter);
int paddingHorizontal = (int) (12 * getResources().getDisplayMetrics().density);
viewBinding.recyclerView.setPadding(paddingHorizontal, 0, paddingHorizontal, 0);
return view;
}

View File

@ -44,6 +44,8 @@ public class SubscriptionsSection extends HomeSection {
listAdapter = new HorizontalFeedListAdapter((MainActivity) getActivity());
listAdapter.setDummyViews(NUM_FEEDS);
viewBinding.recyclerView.setAdapter(listAdapter);
int paddingHorizontal = (int) (12 * getResources().getDisplayMetrics().density);
viewBinding.recyclerView.setPadding(paddingHorizontal, 0, paddingHorizontal, 0);
return view;
}