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

Commit fd4235f2 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Fix overly huge PanelView."

parents dba6ca00 3b239999
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -623,9 +623,7 @@ public class PanelView extends FrameLayout {
                mExpandedHeight = mMaxPanelHeight;
            }
        }
        heightMeasureSpec = MeasureSpec.makeMeasureSpec(
                getDesiredMeasureHeight(), MeasureSpec.AT_MOST);
        setMeasuredDimension(widthMeasureSpec, heightMeasureSpec);
        setMeasuredDimension(getMeasuredWidth(), getDesiredMeasureHeight());
    }

    protected int getDesiredMeasureHeight() {
@@ -705,11 +703,6 @@ public class PanelView extends FrameLayout {
     * @return the default implementation simply returns the maximum height.
     */
    protected int getMaxPanelHeight() {
        if (mMaxPanelHeight <= 0) {
            if (DEBUG) logf("Forcing measure() since mMaxPanelHeight=" + mMaxPanelHeight);
            measure(MeasureSpec.makeMeasureSpec(android.view.ViewGroup.LayoutParams.WRAP_CONTENT, MeasureSpec.EXACTLY),
                    MeasureSpec.makeMeasureSpec(android.view.ViewGroup.LayoutParams.WRAP_CONTENT, MeasureSpec.EXACTLY));
        }
        return mMaxPanelHeight;
    }