Loading packages/SystemUI/res/drawable/qs_navbar_scrim.xml 0 → 100644 +25 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License --> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:type="linear" android:angle="90" android:startColor="#55000000" android:endColor="#00000000" /> </shape> No newline at end of file packages/SystemUI/res/layout/status_bar_expanded.xml +8 −0 Original line number Diff line number Diff line Loading @@ -115,4 +115,12 @@ layout="@layout/keyguard_bottom_area" android:visibility="gone" /> <com.android.systemui.statusbar.AlphaOptimizedView android:id="@+id/qs_navbar_scrim" android:layout_height="96dp" android:layout_width="match_parent" android:layout_gravity="bottom" android:visibility="invisible" android:background="@drawable/qs_navbar_scrim" /> </com.android.systemui.statusbar.phone.NotificationPanelView><!-- end of sliding panel --> packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +20 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ public class NotificationPanelView extends PanelView implements private TextView mClockView; private View mReserveNotificationSpace; private MirrorView mSystemIconsCopy; private View mQsNavbarScrim; private NotificationStackScrollLayout mNotificationStackScroller; private int mNotificationTopPadding; Loading Loading @@ -149,6 +150,8 @@ public class NotificationPanelView extends PanelView implements private boolean mShadeEmpty; private boolean mQsScrimEnabled = true; public NotificationPanelView(Context context, AttributeSet attrs) { super(context, attrs); mSystemIconsCopy = new MirrorView(context); Loading Loading @@ -183,6 +186,7 @@ public class NotificationPanelView extends PanelView implements mLinearOutSlowInInterpolator = AnimationUtils.loadInterpolator(getContext(), android.R.interpolator.linear_out_slow_in); mKeyguardBottomArea = (KeyguardBottomAreaView) findViewById(R.id.keyguard_bottom_area); mQsNavbarScrim = findViewById(R.id.qs_navbar_scrim); mAfforanceHelper = new KeyguardAffordanceHelper(this, getContext()); } Loading Loading @@ -882,6 +886,10 @@ public class NotificationPanelView extends PanelView implements mKeyguardShowing && !expandVisually ? View.INVISIBLE : View.VISIBLE); mScrollView.setTouchEnabled(mQsExpanded); updateEmptyShadeView(); mQsNavbarScrim.setVisibility(mStatusBarState == StatusBarState.SHADE && mQsExpanded && !mStackScrollerOverscrolling && mQsScrimEnabled ? View.VISIBLE : View.INVISIBLE); } private void setQsExpansion(float height) { Loading @@ -908,6 +916,10 @@ public class NotificationPanelView extends PanelView implements mKeyguardStatusBar.setAlpha(alpha); } } if (mStatusBarState == StatusBarState.SHADE && mQsExpanded && !mStackScrollerOverscrolling && mQsScrimEnabled) { mQsNavbarScrim.setAlpha(getQsExpansionFraction()); } } private void updateNotificationScrim(float height) { Loading Loading @@ -1629,4 +1641,12 @@ public class NotificationPanelView extends PanelView implements // Hide "No notifications" in QS. mNotificationStackScroller.updateEmptyShadeView(mShadeEmpty && !mQsExpanded); } public void setQsScrimEnabled(boolean qsScrimEnabled) { boolean changed = mQsScrimEnabled != qsScrimEnabled; mQsScrimEnabled = qsScrimEnabled; if (changed) { updateQsState(); } } } packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +1 −0 Original line number Diff line number Diff line Loading @@ -650,6 +650,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, if (mSearchPanelView != null) { mSearchPanelView.setHorizontal(isVertical); } mNotificationPanel.setQsScrimEnabled(!isVertical); } }); mNavigationBarView.setOnTouchListener(new View.OnTouchListener() { Loading Loading
packages/SystemUI/res/drawable/qs_navbar_scrim.xml 0 → 100644 +25 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License --> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:type="linear" android:angle="90" android:startColor="#55000000" android:endColor="#00000000" /> </shape> No newline at end of file
packages/SystemUI/res/layout/status_bar_expanded.xml +8 −0 Original line number Diff line number Diff line Loading @@ -115,4 +115,12 @@ layout="@layout/keyguard_bottom_area" android:visibility="gone" /> <com.android.systemui.statusbar.AlphaOptimizedView android:id="@+id/qs_navbar_scrim" android:layout_height="96dp" android:layout_width="match_parent" android:layout_gravity="bottom" android:visibility="invisible" android:background="@drawable/qs_navbar_scrim" /> </com.android.systemui.statusbar.phone.NotificationPanelView><!-- end of sliding panel -->
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +20 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ public class NotificationPanelView extends PanelView implements private TextView mClockView; private View mReserveNotificationSpace; private MirrorView mSystemIconsCopy; private View mQsNavbarScrim; private NotificationStackScrollLayout mNotificationStackScroller; private int mNotificationTopPadding; Loading Loading @@ -149,6 +150,8 @@ public class NotificationPanelView extends PanelView implements private boolean mShadeEmpty; private boolean mQsScrimEnabled = true; public NotificationPanelView(Context context, AttributeSet attrs) { super(context, attrs); mSystemIconsCopy = new MirrorView(context); Loading Loading @@ -183,6 +186,7 @@ public class NotificationPanelView extends PanelView implements mLinearOutSlowInInterpolator = AnimationUtils.loadInterpolator(getContext(), android.R.interpolator.linear_out_slow_in); mKeyguardBottomArea = (KeyguardBottomAreaView) findViewById(R.id.keyguard_bottom_area); mQsNavbarScrim = findViewById(R.id.qs_navbar_scrim); mAfforanceHelper = new KeyguardAffordanceHelper(this, getContext()); } Loading Loading @@ -882,6 +886,10 @@ public class NotificationPanelView extends PanelView implements mKeyguardShowing && !expandVisually ? View.INVISIBLE : View.VISIBLE); mScrollView.setTouchEnabled(mQsExpanded); updateEmptyShadeView(); mQsNavbarScrim.setVisibility(mStatusBarState == StatusBarState.SHADE && mQsExpanded && !mStackScrollerOverscrolling && mQsScrimEnabled ? View.VISIBLE : View.INVISIBLE); } private void setQsExpansion(float height) { Loading @@ -908,6 +916,10 @@ public class NotificationPanelView extends PanelView implements mKeyguardStatusBar.setAlpha(alpha); } } if (mStatusBarState == StatusBarState.SHADE && mQsExpanded && !mStackScrollerOverscrolling && mQsScrimEnabled) { mQsNavbarScrim.setAlpha(getQsExpansionFraction()); } } private void updateNotificationScrim(float height) { Loading Loading @@ -1629,4 +1641,12 @@ public class NotificationPanelView extends PanelView implements // Hide "No notifications" in QS. mNotificationStackScroller.updateEmptyShadeView(mShadeEmpty && !mQsExpanded); } public void setQsScrimEnabled(boolean qsScrimEnabled) { boolean changed = mQsScrimEnabled != qsScrimEnabled; mQsScrimEnabled = qsScrimEnabled; if (changed) { updateQsState(); } } }
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +1 −0 Original line number Diff line number Diff line Loading @@ -650,6 +650,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, if (mSearchPanelView != null) { mSearchPanelView.setHorizontal(isVertical); } mNotificationPanel.setQsScrimEnabled(!isVertical); } }); mNavigationBarView.setOnTouchListener(new View.OnTouchListener() { Loading