Animate the bubble badge
The bubble badge now scales together with the expand and collapse
animation of the bubble bar. The badge for the selected bubble is
always kept at full scale.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 349826874
Test: manual
- create some bubbles in the bubble bar
- expand and collapse the bar
- observe badge icons scale accordingly
Change-Id: I04e9174f4a921e404cb3162337f594c16478b16c
This commit is contained in:
1 parent
453734f09e
commit
612263104b
2 files changed
+7
-17
No files matched your search
@@ -300,18 +300,9 @@ public class BubbleView extends ConstraintLayout {
|
||||
}
|
||||
}
|
||||
|
||||
void updateBadgeVisibility(boolean show) {
|
||||
if (mBubble instanceof BubbleBarOverflow) {
|
||||
// The overflow bubble does not have a badge, so just bail.
|
||||
return;
|
||||
}
|
||||
BubbleBarBubble bubble = (BubbleBarBubble) mBubble;
|
||||
Bitmap appBadgeBitmap = bubble.getBadge();
|
||||
int translationX = mOnLeft
|
||||
? -(bubble.getIcon().getWidth() - appBadgeBitmap.getWidth())
|
||||
: 0;
|
||||
mAppIcon.setTranslationX(translationX);
|
||||
mAppIcon.setVisibility(show ? VISIBLE : GONE);
|
||||
void setBadgeScale(float fraction) {
|
||||
mAppIcon.setScaleX(fraction);
|
||||
mAppIcon.setScaleY(fraction);
|
||||
}
|
||||
|
||||
boolean hasUnseenContent() {
|
||||
|
||||
Reference in new issue
Block a user