Loading packages/SystemUI/res/drawable/notification_scrim.xml 0 → 100644 +22 −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"> <solid android:color="#34000000" /> <corners android:radius="@*android:dimen/notification_material_rounded_rect_radius" /> </shape> No newline at end of file packages/SystemUI/res/layout/status_bar_notification_keyguard_overflow.xml +6 −0 Original line number Diff line number Diff line Loading @@ -49,4 +49,10 @@ android:layout_width="120dp" android:layout_height="wrap_content" /> <com.android.systemui.statusbar.NotificationScrimView android:id="@+id/scrim_view" android:layout_width="match_parent" android:layout_height="match_parent" /> </com.android.systemui.statusbar.NotificationOverflowContainer> packages/SystemUI/res/layout/status_bar_notification_row.xml +5 −0 Original line number Diff line number Diff line Loading @@ -48,4 +48,9 @@ android:padding="2dp" /> <com.android.systemui.statusbar.NotificationScrimView android:id="@+id/scrim_view" android:layout_width="match_parent" android:layout_height="match_parent" /> </com.android.systemui.statusbar.ExpandableNotificationRow> packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -320,6 +320,9 @@ device. --> <dimen name="unlock_move_distance">75dp</dimen> <!-- Distance after which the scrim starts fading in when dragging down the quick settings --> <dimen name="notification_scrim_wait_distance">100dp</dimen> <!-- Move distance for the unlock hint animation on the lockscreen --> <dimen name="hint_move_distance">75dp</dimen> Loading packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +9 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView private NotificationBackgroundView mBackgroundNormal; private NotificationBackgroundView mBackgroundDimmed; private NotificationScrimView mScrimView; private ObjectAnimator mBackgroundAnimator; private RectF mAppearAnimationRect = new RectF(); private PorterDuffColorFilter mAppearAnimationFilter; Loading Loading @@ -153,6 +154,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView mBackgroundDimmed = (NotificationBackgroundView) findViewById(R.id.backgroundDimmed); updateBackground(); updateBackgroundResources(); mScrimView = (NotificationScrimView) findViewById(R.id.scrim_view); } private final Runnable mTapTimeoutRunnable = new Runnable() { Loading Loading @@ -379,6 +381,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView setPivotY(actualHeight / 2); mBackgroundNormal.setActualHeight(actualHeight); mBackgroundDimmed.setActualHeight(actualHeight); mScrimView.setActualHeight(actualHeight); } @Override Loading @@ -386,6 +389,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView super.setClipTopAmount(clipTopAmount); mBackgroundNormal.setClipTopAmount(clipTopAmount); mBackgroundDimmed.setClipTopAmount(clipTopAmount); mScrimView.setClipTopAmount(clipTopAmount); } @Override Loading @@ -405,6 +409,11 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView } } @Override public void setScrimAmount(float scrimAmount) { mScrimView.setAlpha(scrimAmount); } private void startAppearAnimation(boolean isAppearing, float translationDirection, long delay, final Runnable onFinishedRunnable) { if (mAppearAnimator != null) { Loading Loading
packages/SystemUI/res/drawable/notification_scrim.xml 0 → 100644 +22 −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"> <solid android:color="#34000000" /> <corners android:radius="@*android:dimen/notification_material_rounded_rect_radius" /> </shape> No newline at end of file
packages/SystemUI/res/layout/status_bar_notification_keyguard_overflow.xml +6 −0 Original line number Diff line number Diff line Loading @@ -49,4 +49,10 @@ android:layout_width="120dp" android:layout_height="wrap_content" /> <com.android.systemui.statusbar.NotificationScrimView android:id="@+id/scrim_view" android:layout_width="match_parent" android:layout_height="match_parent" /> </com.android.systemui.statusbar.NotificationOverflowContainer>
packages/SystemUI/res/layout/status_bar_notification_row.xml +5 −0 Original line number Diff line number Diff line Loading @@ -48,4 +48,9 @@ android:padding="2dp" /> <com.android.systemui.statusbar.NotificationScrimView android:id="@+id/scrim_view" android:layout_width="match_parent" android:layout_height="match_parent" /> </com.android.systemui.statusbar.ExpandableNotificationRow>
packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -320,6 +320,9 @@ device. --> <dimen name="unlock_move_distance">75dp</dimen> <!-- Distance after which the scrim starts fading in when dragging down the quick settings --> <dimen name="notification_scrim_wait_distance">100dp</dimen> <!-- Move distance for the unlock hint animation on the lockscreen --> <dimen name="hint_move_distance">75dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +9 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView private NotificationBackgroundView mBackgroundNormal; private NotificationBackgroundView mBackgroundDimmed; private NotificationScrimView mScrimView; private ObjectAnimator mBackgroundAnimator; private RectF mAppearAnimationRect = new RectF(); private PorterDuffColorFilter mAppearAnimationFilter; Loading Loading @@ -153,6 +154,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView mBackgroundDimmed = (NotificationBackgroundView) findViewById(R.id.backgroundDimmed); updateBackground(); updateBackgroundResources(); mScrimView = (NotificationScrimView) findViewById(R.id.scrim_view); } private final Runnable mTapTimeoutRunnable = new Runnable() { Loading Loading @@ -379,6 +381,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView setPivotY(actualHeight / 2); mBackgroundNormal.setActualHeight(actualHeight); mBackgroundDimmed.setActualHeight(actualHeight); mScrimView.setActualHeight(actualHeight); } @Override Loading @@ -386,6 +389,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView super.setClipTopAmount(clipTopAmount); mBackgroundNormal.setClipTopAmount(clipTopAmount); mBackgroundDimmed.setClipTopAmount(clipTopAmount); mScrimView.setClipTopAmount(clipTopAmount); } @Override Loading @@ -405,6 +409,11 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView } } @Override public void setScrimAmount(float scrimAmount) { mScrimView.setAlpha(scrimAmount); } private void startAppearAnimation(boolean isAppearing, float translationDirection, long delay, final Runnable onFinishedRunnable) { if (mAppearAnimator != null) { Loading