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

Commit 6556c074 authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 4903822 - vertical gravity bugs in action bar custom views

Change-Id: I20a319bf8fd5b5acf823a2651639f94d6efac5e4
parent e0ac113b
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -988,8 +988,8 @@ public class ActionBarView extends AbsActionBarView {
            int ypos = 0;
            switch (gravity & Gravity.VERTICAL_GRAVITY_MASK) {
                case Gravity.CENTER_VERTICAL:
                    final int paddedTop = mTop + getPaddingTop();
                    final int paddedBottom = mBottom - getPaddingBottom();
                    final int paddedTop = getPaddingTop();
                    final int paddedBottom = mBottom - mTop - getPaddingBottom();
                    ypos = ((paddedBottom - paddedTop) - customView.getMeasuredHeight()) / 2;
                    break;
                case Gravity.TOP:
@@ -1000,7 +1000,10 @@ public class ActionBarView extends AbsActionBarView {
                            - bottomMargin;
                    break;
            }
            x += positionChild(customView, xpos, ypos, contentHeight);
            final int customWidth = customView.getMeasuredWidth();
            customView.layout(xpos, ypos, xpos + customWidth,
                    ypos + customView.getMeasuredHeight());
            x += customWidth;
        }

        if (mProgressView != null) {