From 04a8ee5787707c25c100acb1e575f19f054e9d62 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Sat, 28 Jan 2023 12:56:11 +0100 Subject: [PATCH] Reduce padding of horizontal home sections to better align them with the titles (#6290) --- .../antennapod/ui/home/sections/EpisodesSurpriseSection.java | 2 ++ .../de/danoeh/antennapod/ui/home/sections/QueueSection.java | 2 ++ .../antennapod/ui/home/sections/SubscriptionsSection.java | 2 ++ 3 files changed, 6 insertions(+) diff --git a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/EpisodesSurpriseSection.java b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/EpisodesSurpriseSection.java index 8aaeb1412..7e2c855e9 100644 --- a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/EpisodesSurpriseSection.java +++ b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/EpisodesSurpriseSection.java @@ -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(); } diff --git a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/QueueSection.java b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/QueueSection.java index e35068e58..070d56ed6 100644 --- a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/QueueSection.java +++ b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/QueueSection.java @@ -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; } diff --git a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/SubscriptionsSection.java b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/SubscriptionsSection.java index b10d20e7b..b9a1bf8e8 100644 --- a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/SubscriptionsSection.java +++ b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/SubscriptionsSection.java @@ -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; }