From 7cc7044fe587e680be61f5386552e3cfc4264d26 Mon Sep 17 00:00:00 2001 From: Floens Date: Wed, 13 May 2015 20:39:16 +0200 Subject: [PATCH] Add padding to the postcell divider --- .../src/main/java/org/floens/chan/ui/cell/PostCell.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Clover/app/src/main/java/org/floens/chan/ui/cell/PostCell.java b/Clover/app/src/main/java/org/floens/chan/ui/cell/PostCell.java index 6c32f9bc..bcfa5d8e 100644 --- a/Clover/app/src/main/java/org/floens/chan/ui/cell/PostCell.java +++ b/Clover/app/src/main/java/org/floens/chan/ui/cell/PostCell.java @@ -63,6 +63,7 @@ public class PostCell extends RelativeLayout implements PostLinkable.Callback { private TextView comment; private TextView replies; private ImageView options; + private View divider; private boolean commentClickable = false; private CharSequence iconsSpannable; @@ -113,6 +114,7 @@ public class PostCell extends RelativeLayout implements PostLinkable.Callback { comment = (TextView) findViewById(R.id.comment); replies = (TextView) findViewById(R.id.replies); options = (ImageView) findViewById(R.id.options); + divider = findViewById(R.id.divider); int textSizeSp = Integer.parseInt(ChanSettings.fontSize.get()); paddingPx = dp(textSizeSp - 6); @@ -142,6 +144,11 @@ public class PostCell extends RelativeLayout implements PostLinkable.Callback { options.setBackgroundResource(R.drawable.item_background); } + RelativeLayout.LayoutParams dividerParams = (LayoutParams) divider.getLayoutParams(); + dividerParams.leftMargin = paddingPx; + dividerParams.rightMargin = paddingPx; + divider.setLayoutParams(dividerParams); + TypedArray ta = getContext().obtainStyledAttributes(new int[]{ R.attr.post_details_color, R.attr.post_highlighted_color,