Make the flyout dismissable with a gesture.
This adds the flyout-to-dot transition, and encapulates the flyout logic in a custom view. This also adds support for the 'new' dot changing sides (previously unimplemented) and animates it changing sides when the stack changes sides.
Test: atest SystemUITests
Fixes: 129768381
Bugs: 129768381
Change-Id: I90697b437cf14e5c5a211c87ed2c131a12e697e7
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BadgedImageView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BadgedImageView.java
index f15e8e4..783780f 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BadgedImageView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BadgedImageView.java
@@ -57,7 +57,7 @@
int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
mIconSize = getResources().getDimensionPixelSize(R.dimen.individual_bubble_size);
- mDotRenderer = new BadgeRenderer(mIconSize);
+ mDotRenderer = new BadgeRenderer(getContext());
TypedArray ta = context.obtainStyledAttributes(
new int[] {android.R.attr.colorBackgroundFloating});
@@ -83,6 +83,10 @@
invalidate();
}
+ public boolean getDotPosition() {
+ return mOnLeft;
+ }
+
/**
* Set whether the dot should show or not.
*/