Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20761fcd authored by Vladimir Baryshnikov's avatar Vladimir Baryshnikov
Browse files

Fix dividers for LinearLayout (TabWidget)



child.getTop()/child.getLeft - already contains offset for divider height/width,
so we need to subtract it, otherwise divider will be drawn behind the child.

Change-Id: Idd6e5aa4b20e84c64daaefdf393bc00fafb26c45
Signed-off-by: default avatarVladimir Baryshnikov <vovkab@gmail.com>
parent b4cee0f8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -307,7 +307,7 @@ public class LinearLayout extends ViewGroup {
            if (child != null && child.getVisibility() != GONE) {
                if (hasDividerBeforeChildAt(i)) {
                    final LayoutParams lp = (LayoutParams) child.getLayoutParams();
                    final int top = child.getTop() - lp.topMargin;
                    final int top = child.getTop() - lp.topMargin - mDividerHeight;
                    drawHorizontalDivider(canvas, top);
                }
            }
@@ -334,7 +334,7 @@ public class LinearLayout extends ViewGroup {
            if (child != null && child.getVisibility() != GONE) {
                if (hasDividerBeforeChildAt(i)) {
                    final LayoutParams lp = (LayoutParams) child.getLayoutParams();
                    final int left = child.getLeft() - lp.leftMargin;
                    final int left = child.getLeft() - lp.leftMargin - mDividerWidth;
                    drawVerticalDivider(canvas, left);
                }
            }