Add padding to the postcell divider

filtering
Floens 10 years ago
parent 839c1fc9f6
commit 7cc7044fe5
  1. 7
      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,

Loading…
Cancel
Save