summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/danoeh/antennapod/view
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2020-07-19 09:10:35 +0200
committerByteHamster <info@bytehamster.com>2020-07-19 09:10:35 +0200
commit02b4c9542c2ef2a32e7fce2fc4f754058ffe4e9b (patch)
treee3e0d2276f1095dd45547d06f9b925a284ac04a4 /app/src/main/java/de/danoeh/antennapod/view
parentbb753f46c1b22149b173d431b589c054a879a51b (diff)
downloadAntennaPod-02b4c9542c2ef2a32e7fce2fc4f754058ffe4e9b.zip
Change horizontal spacing automatically
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/view')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/view/EpisodeItemListRecyclerView.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/view/EpisodeItemListRecyclerView.java b/app/src/main/java/de/danoeh/antennapod/view/EpisodeItemListRecyclerView.java
index 58d562616..83d90f98b 100644
--- a/app/src/main/java/de/danoeh/antennapod/view/EpisodeItemListRecyclerView.java
+++ b/app/src/main/java/de/danoeh/antennapod/view/EpisodeItemListRecyclerView.java
@@ -2,6 +2,7 @@ package de.danoeh.antennapod.view;
import android.content.Context;
import android.content.SharedPreferences;
+import android.content.res.Configuration;
import android.util.AttributeSet;
import android.view.View;
import androidx.appcompat.view.ContextThemeWrapper;
@@ -39,6 +40,14 @@ public class EpisodeItemListRecyclerView extends RecyclerView {
setLayoutManager(layoutManager);
setHasFixedSize(true);
addItemDecoration(new HorizontalDividerItemDecoration.Builder(getContext()).build());
+ setClipToPadding(false);
+ }
+
+ @Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ int horizontalSpacing = (int) getResources().getDimension(R.dimen.additional_horizontal_spacing);
+ setPadding(horizontalSpacing, getPaddingTop(), horizontalSpacing, getPaddingBottom());
}
public void saveScrollPosition(String tag) {