diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2023-01-28 12:56:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-28 12:56:11 +0100 |
commit | 04a8ee5787707c25c100acb1e575f19f054e9d62 (patch) | |
tree | 1a27c89893e50cc7f08400b988a6fbe2e1c780eb /app/src | |
parent | 12793de6047e0b5c7e8e4b4fd6e49c181324b406 (diff) | |
download | AntennaPod-04a8ee5787707c25c100acb1e575f19f054e9d62.zip |
Reduce padding of horizontal home sections to better align them with the titles (#6290)
Diffstat (limited to 'app/src')
3 files changed, 6 insertions, 0 deletions
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; } |