aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/ml')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
index 09bb8e27..04b23880 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
@@ -1755,8 +1755,13 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) holder.itemView.getLayoutParams();
params.height = ViewGroup.LayoutParams.WRAP_CONTENT;
int marginPixel = (int) Utils.convertDpToPixel(8, mActivity);
- params.topMargin = marginPixel;
- params.bottomMargin = marginPixel;
+ if (holder instanceof PostCard2VideoAutoplayViewHolder || holder instanceof PostCard2WithPreviewViewHolder
+ || holder instanceof PostCard2TextTypeViewHolder) {
+ ((PostBaseViewHolder) holder).itemView.setPadding(0, marginPixel, 0, 0);
+ } else {
+ params.topMargin = marginPixel;
+ params.bottomMargin = marginPixel;
+ }
holder.itemView.setLayoutParams(params);
((PostBaseViewHolder) holder).itemView.setBackgroundTintList(ColorStateList.valueOf(mCardViewBackgroundColor));
((PostBaseViewHolder) holder).titleTextView.setTextColor(mPostTitleColor);