Loading packages/SystemUI/res/drawable/notification_guts_bg.xml +2 −1 Original line number Diff line number Diff line Loading @@ -17,5 +17,6 @@ <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="@color/notification_guts_bg_color" /> <corners android:radius="@dimen/notification_material_rounded_rect_radius" /> <!--The radius is 1dp smaller than the notification one, to avoid aliasing bugs on the corners --> <corners android:radius="1dp" /> </shape> packages/SystemUI/res/layout/notification_guts.xml +2 −3 Original line number Diff line number Diff line Loading @@ -15,11 +15,10 @@ limitations under the License. --> <FrameLayout <com.android.systemui.statusbar.NotificationGuts xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/notification_guts_bg" android:id="@+id/notification_guts" android:visibility="gone" android:clickable="true" Loading Loading @@ -87,4 +86,4 @@ android:src="@drawable/ic_settings" /> </LinearLayout> </FrameLayout> </com.android.systemui.statusbar.NotificationGuts> packages/SystemUI/res/values/colors.xml +2 −2 Original line number Diff line number Diff line Loading @@ -101,9 +101,9 @@ <color name="segmented_button_text_inactive">#99afbdc4</color><!-- 60% --> <!-- The "inside" of a notification, reached via longpress --> <color name="notification_guts_bg_color">#ff424242</color><!-- grey 800 --> <color name="notification_guts_bg_color">@color/system_secondary_color</color> <color name="notification_guts_title_color">#FFFFFFFF</color> <color name="notification_guts_text_color">#99FFFFFF</color> <color name="notification_guts_text_color">#b2FFFFFF</color> <color name="notification_guts_btn_color">#FFFFFFFF</color> <color name="search_panel_card_color">#ffffff</color> Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +7 −6 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ public abstract class BaseStatusBar extends SystemUI implements protected int mZenMode; // which notification is currently being longpress-examined by the user private View mNotificationGutsExposed; private NotificationGuts mNotificationGutsExposed; private TimeInterpolator mLinearOutSlowIn, mFastOutLinearIn; Loading Loading @@ -739,15 +739,16 @@ public abstract class BaseStatusBar extends SystemUI implements if (v.getWindowToken() == null) return false; // Assume we are a status_bar_notification_row final View guts = v.findViewById(R.id.notification_guts); final NotificationGuts guts = (NotificationGuts) v.findViewById( R.id.notification_guts); if (guts == null) return false; // Already showing? if (guts.getVisibility() == View.VISIBLE) return false; guts.setVisibility(View.VISIBLE); final double horz = Math.max(v.getWidth() - x, x); final double vert = Math.max(v.getHeight() - y, y); final double horz = Math.max(guts.getWidth() - x, x); final double vert = Math.max(guts.getActualHeight() - y, y); final float r = (float) Math.hypot(horz, vert); final Animator a = ViewAnimationUtils.createCircularReveal(guts, x, y, 0, r); Loading @@ -764,11 +765,11 @@ public abstract class BaseStatusBar extends SystemUI implements public void dismissPopups() { if (mNotificationGutsExposed != null) { final View v = mNotificationGutsExposed; final NotificationGuts v = mNotificationGutsExposed; mNotificationGutsExposed = null; final int x = (v.getLeft() + v.getRight()) / 2; final int y = (v.getTop() + v.getBottom()) / 2; final int y = (v.getTop() + v.getActualHeight() / 2); final Animator a = ViewAnimationUtils.createCircularReveal(v, x, y, x, 0); a.setDuration(200); Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +4 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private ExpansionLogger mLogger; private String mLoggingKey; private boolean mWasReset; private NotificationGuts mGuts; public interface ExpansionLogger { public void logNotificationExpansion(String key, boolean userAction, boolean expanded); Loading Loading @@ -103,6 +104,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { super.onFinishInflate(); mPublicLayout = (NotificationContentView) findViewById(R.id.expandedPublic); mPrivateLayout = (NotificationContentView) findViewById(R.id.expanded); mGuts = (NotificationGuts) findViewById(R.id.notification_guts); mVetoButton = findViewById(R.id.veto); } Loading Loading @@ -360,6 +362,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { public void setActualHeight(int height, boolean notifyListeners) { mPrivateLayout.setActualHeight(height); mPublicLayout.setActualHeight(height); mGuts.setActualHeight(height); invalidate(); super.setActualHeight(height, notifyListeners); } Loading @@ -381,6 +384,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { super.setClipTopAmount(clipTopAmount); mPrivateLayout.setClipTopAmount(clipTopAmount); mPublicLayout.setClipTopAmount(clipTopAmount); mGuts.setClipTopAmount(clipTopAmount); } public void notifyContentUpdated() { Loading Loading
packages/SystemUI/res/drawable/notification_guts_bg.xml +2 −1 Original line number Diff line number Diff line Loading @@ -17,5 +17,6 @@ <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="@color/notification_guts_bg_color" /> <corners android:radius="@dimen/notification_material_rounded_rect_radius" /> <!--The radius is 1dp smaller than the notification one, to avoid aliasing bugs on the corners --> <corners android:radius="1dp" /> </shape>
packages/SystemUI/res/layout/notification_guts.xml +2 −3 Original line number Diff line number Diff line Loading @@ -15,11 +15,10 @@ limitations under the License. --> <FrameLayout <com.android.systemui.statusbar.NotificationGuts xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/notification_guts_bg" android:id="@+id/notification_guts" android:visibility="gone" android:clickable="true" Loading Loading @@ -87,4 +86,4 @@ android:src="@drawable/ic_settings" /> </LinearLayout> </FrameLayout> </com.android.systemui.statusbar.NotificationGuts>
packages/SystemUI/res/values/colors.xml +2 −2 Original line number Diff line number Diff line Loading @@ -101,9 +101,9 @@ <color name="segmented_button_text_inactive">#99afbdc4</color><!-- 60% --> <!-- The "inside" of a notification, reached via longpress --> <color name="notification_guts_bg_color">#ff424242</color><!-- grey 800 --> <color name="notification_guts_bg_color">@color/system_secondary_color</color> <color name="notification_guts_title_color">#FFFFFFFF</color> <color name="notification_guts_text_color">#99FFFFFF</color> <color name="notification_guts_text_color">#b2FFFFFF</color> <color name="notification_guts_btn_color">#FFFFFFFF</color> <color name="search_panel_card_color">#ffffff</color> Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +7 −6 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ public abstract class BaseStatusBar extends SystemUI implements protected int mZenMode; // which notification is currently being longpress-examined by the user private View mNotificationGutsExposed; private NotificationGuts mNotificationGutsExposed; private TimeInterpolator mLinearOutSlowIn, mFastOutLinearIn; Loading Loading @@ -739,15 +739,16 @@ public abstract class BaseStatusBar extends SystemUI implements if (v.getWindowToken() == null) return false; // Assume we are a status_bar_notification_row final View guts = v.findViewById(R.id.notification_guts); final NotificationGuts guts = (NotificationGuts) v.findViewById( R.id.notification_guts); if (guts == null) return false; // Already showing? if (guts.getVisibility() == View.VISIBLE) return false; guts.setVisibility(View.VISIBLE); final double horz = Math.max(v.getWidth() - x, x); final double vert = Math.max(v.getHeight() - y, y); final double horz = Math.max(guts.getWidth() - x, x); final double vert = Math.max(guts.getActualHeight() - y, y); final float r = (float) Math.hypot(horz, vert); final Animator a = ViewAnimationUtils.createCircularReveal(guts, x, y, 0, r); Loading @@ -764,11 +765,11 @@ public abstract class BaseStatusBar extends SystemUI implements public void dismissPopups() { if (mNotificationGutsExposed != null) { final View v = mNotificationGutsExposed; final NotificationGuts v = mNotificationGutsExposed; mNotificationGutsExposed = null; final int x = (v.getLeft() + v.getRight()) / 2; final int y = (v.getTop() + v.getBottom()) / 2; final int y = (v.getTop() + v.getActualHeight() / 2); final Animator a = ViewAnimationUtils.createCircularReveal(v, x, y, x, 0); a.setDuration(200); Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +4 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private ExpansionLogger mLogger; private String mLoggingKey; private boolean mWasReset; private NotificationGuts mGuts; public interface ExpansionLogger { public void logNotificationExpansion(String key, boolean userAction, boolean expanded); Loading Loading @@ -103,6 +104,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { super.onFinishInflate(); mPublicLayout = (NotificationContentView) findViewById(R.id.expandedPublic); mPrivateLayout = (NotificationContentView) findViewById(R.id.expanded); mGuts = (NotificationGuts) findViewById(R.id.notification_guts); mVetoButton = findViewById(R.id.veto); } Loading Loading @@ -360,6 +362,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { public void setActualHeight(int height, boolean notifyListeners) { mPrivateLayout.setActualHeight(height); mPublicLayout.setActualHeight(height); mGuts.setActualHeight(height); invalidate(); super.setActualHeight(height, notifyListeners); } Loading @@ -381,6 +384,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { super.setClipTopAmount(clipTopAmount); mPrivateLayout.setClipTopAmount(clipTopAmount); mPublicLayout.setClipTopAmount(clipTopAmount); mGuts.setClipTopAmount(clipTopAmount); } public void notifyContentUpdated() { Loading