Zoom notifications on lockscreen after tapping.
For the double tap interaction, this change introduces a new cue
that the notifications must be double-tapped: With the first tap,
the tapped notifications gets larger and the others fade out a bit.
Change-Id: Ib48ff0291aee1a5ec083b9e7ed1021bc420514cf
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index a9fda63..fdf4dbf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -25,7 +25,8 @@
import com.android.internal.widget.SizeAdaptiveLayout;
import com.android.systemui.R;
-public class ExpandableNotificationRow extends FrameLayout {
+public class ExpandableNotificationRow extends FrameLayout
+ implements LatestItemView.OnActivatedListener {
private int mRowMinHeight;
private int mRowMaxHeight;
@@ -51,6 +52,8 @@
private SizeAdaptiveLayout mPrivateLayout;
private int mMaxExpandHeight;
private boolean mMaxHeightNeedsUpdate;
+ private NotificationActivator mActivator;
+ private LatestItemView.OnActivatedListener mOnActivatedListener;
public ExpandableNotificationRow(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -62,8 +65,10 @@
mPublicLayout = (SizeAdaptiveLayout) findViewById(R.id.expandedPublic);
mPrivateLayout = (SizeAdaptiveLayout) findViewById(R.id.expanded);
mLatestItemView = (LatestItemView) findViewById(R.id.container);
- }
+ mActivator = new NotificationActivator(this);
+ mLatestItemView.setOnActivatedListener(this);
+ }
public void setHeightRange(int rowMinHeight, int rowMaxHeight) {
mRowMinHeight = rowMinHeight;
@@ -202,6 +207,7 @@
*/
public void setDimmed(boolean dimmed) {
mLatestItemView.setDimmed(dimmed);
+ mActivator.setDimmed(dimmed);
}
public int getMaxExpandHeight() {
@@ -220,6 +226,28 @@
mLatestItemView.setLocked(locked);
}
+ public void setOnActivatedListener(LatestItemView.OnActivatedListener listener) {
+ mOnActivatedListener = listener;
+ }
+
+ public NotificationActivator getActivator() {
+ return mActivator;
+ }
+
+ @Override
+ public void onActivated(View view) {
+ if (mOnActivatedListener != null) {
+ mOnActivatedListener.onActivated(this);
+ }
+ }
+
+ @Override
+ public void onReset(View view) {
+ if (mOnActivatedListener != null) {
+ mOnActivatedListener.onReset(this);
+ }
+ }
+
/**
* Sets the resource id for the background of this notification.
*