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

Commit 244e4159 authored by Joe Onorato's avatar Joe Onorato
Browse files

Fix the SettingsView so it shows again.

Change-Id: Ie041fd12412ee1de9d1f90604b777db2fd00f550
parent 64b591de
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@
            android:orientation="vertical"
            >
            <ScrollView
                android:id="@+id/notificationScroller"
                android:id="@+id/notification_scroller"
                android:layout_height="wrap_content"
                android:layout_width="match_parent"
                android:layout_weight="1"
@@ -184,6 +184,7 @@
                </com.android.systemui.statusbar.tablet.NotificationLinearLayout>
            </ScrollView>
            <ImageView
                android:id="@+id/notification_glow"
                android:layout_width="match_parent"
                android:layout_height="@dimen/status_bar_panel_bottom_offset"
                android:layout_marginLeft="16dp"
+18 −8
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel,
    View mSettingsButton;
    View mNotificationButton;
    View mNotificationScroller;
    View mNotificationGlow;
    ViewGroup mContentFrame;
    Rect mContentArea;
    View mSettingsView;
@@ -85,7 +86,8 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel,
        mNotificationButton = (ImageView)findViewById(R.id.notification_button);
        mNotificationButton.setOnClickListener(this);

        mNotificationScroller = findViewById(R.id.notificationScroller);
        mNotificationScroller = findViewById(R.id.notification_scroller);
        mNotificationGlow = findViewById(R.id.notification_glow);
        mContentFrame = (ViewGroup)findViewById(R.id.content_frame);
    }

@@ -218,10 +220,11 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel,
    void addSettingsView() {
        LayoutInflater infl = LayoutInflater.from(getContext());
        mSettingsView = infl.inflate(R.layout.status_bar_settings_view, mContentFrame, false);
        mContentFrame.addView(mSettingsView);
        mContentFrame.addView(mSettingsView, mContentFrame.indexOfChild(mNotificationGlow));
    }

    private class Choreographer implements Animator.AnimatorListener {
        boolean mVisible;
        int mBgAlpha;
        ValueAnimator mBgAnim;
        int mPanelHeight;
@@ -245,14 +248,15 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel,
        }

        void startAnimation(boolean visible) {
            if (mBgAnim == null) {
            if (mBgAnim != null && mVisible != visible) {
                mBgAnim.reverse();
                mPositionAnim.reverse();
            } else {
                createAnimation(visible);
                mBgAnim.start();
                mPositionAnim.start();
            } else {
                mBgAnim.reverse();
                mPositionAnim.reverse();
            }
            mVisible = visible;
        }

        void jumpTo(boolean visible) {
@@ -296,7 +300,13 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel,

        public void setPanelHeight(int h) {
            mPanelHeight = h;
            setPanelBottom(mPanelBottom);
            if (mPanelBottom == 0) {
                // fully closed, no animation necessary
                setPanelBottom(0);
            } else {
                // a little bit visible, schedule an animation
                startAnimation(true);
            }
        }

        public void onAnimationCancel(Animator animation) {