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

Commit cd8ad7c7 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Don't draw a middle divider on the first visible view."

parents 935ccfd9 bf68f833
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -562,9 +562,17 @@ public class LinearLayout extends ViewGroup {
            return (mShowDividers & SHOW_DIVIDER_BEGINNING) != 0;
        } else if (childIndex == getChildCount()) {
            return (mShowDividers & SHOW_DIVIDER_END) != 0;
        } else {
            return (mShowDividers & SHOW_DIVIDER_MIDDLE) != 0;
        } else if ((mShowDividers & SHOW_DIVIDER_MIDDLE) != 0) {
            boolean hasVisibleViewBefore = false;
            for (int i = childIndex - 1; i >= 0; i--) {
                if (getChildAt(i).getVisibility() != GONE) {
                    hasVisibleViewBefore = true;
                    break;
                }
            }
            return hasVisibleViewBefore;
        }
        return false;
    }

    /**