Skip to content

Commit c7e5a2f

Browse files
Adam Powellandroid code review
authored andcommitted
Merge "Fix dividers for LinearLayout (TabWidget)"
2 parents 5aeb858 + 20761fc commit c7e5a2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/java/android/widget/LinearLayout.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ void drawDividersVertical(Canvas canvas) {
307307
if (child != null && child.getVisibility() != GONE) {
308308
if (hasDividerBeforeChildAt(i)) {
309309
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
310-
final int top = child.getTop() - lp.topMargin;
310+
final int top = child.getTop() - lp.topMargin - mDividerHeight;
311311
drawHorizontalDivider(canvas, top);
312312
}
313313
}
@@ -334,7 +334,7 @@ void drawDividersHorizontal(Canvas canvas) {
334334
if (child != null && child.getVisibility() != GONE) {
335335
if (hasDividerBeforeChildAt(i)) {
336336
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
337-
final int left = child.getLeft() - lp.leftMargin;
337+
final int left = child.getLeft() - lp.leftMargin - mDividerWidth;
338338
drawVerticalDivider(canvas, left);
339339
}
340340
}

0 commit comments

Comments
 (0)