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

Commit 46023ace authored by John Spurlock's avatar John Spurlock Committed by Android Git Automerger
Browse files

am cd41eb63: QuickSettings: Basic content-resizing for detail panel.

* commit 'cd41eb6385590fadf63ce1b24cc5bf562f66a305':
  QuickSettings: Basic content-resizing for detail panel.
parents a422a07d 2684d5e7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
        android:id="@+id/slider_panel"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="64dip"
        android:layout_toLeftOf="@+id/expand_button_divider" />

    <ImageView
+3 −1
Original line number Diff line number Diff line
@@ -21,7 +21,9 @@
    android:layout_height="wrap_content"
    android:background="@color/system_primary_color"
    android:orientation="vertical"
    android:padding="@dimen/qs_panel_padding" >
    android:paddingTop="@dimen/qs_panel_padding"
    android:paddingLeft="@dimen/qs_panel_padding"
    android:paddingRight="@dimen/qs_panel_padding" >

    <TextView
        android:id="@android:id/title"
+11 −3
Original line number Diff line number Diff line
@@ -191,15 +191,23 @@ public class QSPanel extends ViewGroup {
            final int ch = record.row == 0 ? mLargeCellHeight : mCellHeight;
            record.tileView.measure(exactly(cw), exactly(ch));
        }
        final int actualHeight = rows == 0 ? 0 : getRowTop(rows);
        mDetail.measure(exactly(width), exactly(actualHeight));
        setMeasuredDimension(width, actualHeight);
        int h = rows == 0 ? 0 : getRowTop(rows);
        mDetail.measure(exactly(width), unspecified());
        if (mDetail.getVisibility() == VISIBLE && mDetail.getChildCount() > 0) {
            final int dmh = mDetail.getMeasuredHeight();
            if (dmh > 0) h = dmh;
        }
        setMeasuredDimension(width, h);
    }

    private static int exactly(int size) {
        return MeasureSpec.makeMeasureSpec(size, MeasureSpec.EXACTLY);
    }

    private static int unspecified() {
        return MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
    }

    @Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        final int w = getWidth();
+1 −5
Original line number Diff line number Diff line
@@ -108,12 +108,8 @@ public class NotificationsTile extends QSTile<NotificationsTile.NotificationsSta

    @Override
    protected void handleClick() {
        if (mState.zen) {
            mZenController.setZen(false);
        } else {
        showDetail(true);
    }
    }

    @Override
    protected void handleUpdateState(NotificationsState state, Object arg) {
+3 −1
Original line number Diff line number Diff line
@@ -164,7 +164,9 @@ public class NotificationPanelView extends PanelView implements
        // Calculate quick setting heights.
        mQsMinExpansionHeight = mHeader.getCollapsedHeight() + mQsPeekHeight;
        mQsMaxExpansionHeight = mHeader.getExpandedHeight() + mQsContainer.getHeight();
        if (!mQsExpanded) {
        if (mQsExpanded) {
            setQsStackScrollerPadding(mQsMaxExpansionHeight);
        } else {
            setQsExpansion(mQsMinExpansionHeight);
            positionClockAndNotifications();
            mNotificationStackScroller.setStackHeight(getExpandedHeight());