Loading packages/SystemUI/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,7 @@ android_library { "androidx.lifecycle_lifecycle-extensions", "androidx.dynamicanimation_dynamicanimation", "androidx-constraintlayout_constraintlayout", "iconloader_base", "SystemUI-tags", "SystemUI-proto", "metrics-helper-lib", Loading packages/SystemUI/res/values/dimens.xml +5 −3 Original line number Diff line number Diff line Loading @@ -1110,7 +1110,9 @@ <!-- Padding between status bar and bubbles when displayed in expanded state --> <dimen name="bubble_padding_top">16dp</dimen> <!-- Size of individual bubbles. --> <dimen name="individual_bubble_size">52dp</dimen> <dimen name="individual_bubble_size">60dp</dimen> <!-- Size of bubble icon bitmap. --> <dimen name="bubble_icon_bitmap_size">52dp</dimen> <!-- Size of the circle around the bubbles when they're in the dismiss target. --> <dimen name="bubble_dismiss_encircle_size">56dp</dimen> <!-- How much to inset the icon in the circle --> Loading Loading @@ -1142,9 +1144,9 @@ <!-- Offset between bubbles in their stacked position. --> <dimen name="bubble_stack_offset">5dp</dimen> <!-- How far offscreen the bubble stack rests. --> <dimen name="bubble_stack_offscreen">5dp</dimen> <dimen name="bubble_stack_offscreen">9dp</dimen> <!-- How far down the screen the stack starts. --> <dimen name="bubble_stack_starting_offset_y">100dp</dimen> <dimen name="bubble_stack_starting_offset_y">96dp</dimen> <!-- Size of image buttons in the bubble header --> <dimen name="bubble_header_icon_size">48dp</dimen> <!-- Space between the pointer triangle and the bubble expanded view --> Loading packages/SystemUI/src/com/android/systemui/bubbles/BadgeRenderer.java +3 −3 Original line number Diff line number Diff line Loading @@ -55,9 +55,9 @@ public class BadgeRenderer { /** Space between the center of the dot and the top or left of the bubble stack. */ static float getDotCenterOffset(Context context) { final int iconSizePx = context.getResources().getDimensionPixelSize(R.dimen.individual_bubble_size); return SIZE_PERCENTAGE * iconSizePx; final int iconBitmapSize = context.getResources().getDimensionPixelSize(R.dimen.bubble_icon_bitmap_size); return SIZE_PERCENTAGE * iconBitmapSize; } static float getDotRadius(float dotCenterOffset) { Loading packages/SystemUI/src/com/android/systemui/bubbles/BadgedImageView.java +4 −3 Original line number Diff line number Diff line Loading @@ -32,7 +32,8 @@ import com.android.systemui.R; public class BadgedImageView extends ImageView { private BadgeRenderer mDotRenderer; private int mIconSize; private int mIconBitmapSize; private Rect mTempBounds = new Rect(); private Point mTempPoint = new Point(); Loading @@ -56,7 +57,7 @@ public class BadgedImageView extends ImageView { public BadgedImageView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); mIconSize = getResources().getDimensionPixelSize(R.dimen.individual_bubble_size); mIconBitmapSize = getResources().getDimensionPixelSize(R.dimen.bubble_icon_bitmap_size); mDotRenderer = new BadgeRenderer(getContext()); TypedArray ta = context.obtainStyledAttributes( Loading @@ -69,7 +70,7 @@ public class BadgedImageView extends ImageView { super.onDraw(canvas); if (mShowUpdateDot) { getDrawingRect(mTempBounds); mTempPoint.set((getWidth() - mIconSize) / 2, getPaddingTop()); mTempPoint.set((getWidth() - mIconBitmapSize) / 2, getPaddingTop()); mDotRenderer.draw(canvas, mUpdateDotColor, mTempBounds, mDotScale, mTempPoint, mOnLeft); } Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleFlyoutView.java +5 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ public class BubbleFlyoutView extends FrameLayout { private final int mFlyoutSpaceFromBubble; private final int mPointerSize; private final int mBubbleSize; private final int mBubbleIconBitmapSize; private final int mFlyoutElevation; private final int mBubbleElevation; private final int mFloatingBackgroundColor; Loading Loading @@ -143,7 +144,9 @@ public class BubbleFlyoutView extends FrameLayout { mFlyoutPadding = res.getDimensionPixelSize(R.dimen.bubble_flyout_padding_x); mFlyoutSpaceFromBubble = res.getDimensionPixelSize(R.dimen.bubble_flyout_space_from_bubble); mPointerSize = res.getDimensionPixelSize(R.dimen.bubble_flyout_pointer_size); mBubbleSize = res.getDimensionPixelSize(R.dimen.individual_bubble_size); mBubbleIconBitmapSize = res.getDimensionPixelSize(R.dimen.bubble_icon_bitmap_size); mBubbleElevation = res.getDimensionPixelSize(R.dimen.bubble_elevation); mFlyoutElevation = res.getDimensionPixelSize(R.dimen.bubble_flyout_elevation); mNewDotOffsetFromBubbleBounds = BadgeRenderer.getDotCenterOffset(context); Loading Loading @@ -216,7 +219,8 @@ public class BubbleFlyoutView extends FrameLayout { post(() -> { // Multi line flyouts get top-aligned to the bubble. if (mFlyoutText.getLineCount() > 1) { setTranslationY(stackPos.y); float bubbleIconTopPadding = (mBubbleSize - mBubbleIconBitmapSize) / 2f; setTranslationY(stackPos.y + bubbleIconTopPadding); } else { // Single line flyouts are vertically centered with respect to the bubble. setTranslationY( Loading Loading
packages/SystemUI/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,7 @@ android_library { "androidx.lifecycle_lifecycle-extensions", "androidx.dynamicanimation_dynamicanimation", "androidx-constraintlayout_constraintlayout", "iconloader_base", "SystemUI-tags", "SystemUI-proto", "metrics-helper-lib", Loading
packages/SystemUI/res/values/dimens.xml +5 −3 Original line number Diff line number Diff line Loading @@ -1110,7 +1110,9 @@ <!-- Padding between status bar and bubbles when displayed in expanded state --> <dimen name="bubble_padding_top">16dp</dimen> <!-- Size of individual bubbles. --> <dimen name="individual_bubble_size">52dp</dimen> <dimen name="individual_bubble_size">60dp</dimen> <!-- Size of bubble icon bitmap. --> <dimen name="bubble_icon_bitmap_size">52dp</dimen> <!-- Size of the circle around the bubbles when they're in the dismiss target. --> <dimen name="bubble_dismiss_encircle_size">56dp</dimen> <!-- How much to inset the icon in the circle --> Loading Loading @@ -1142,9 +1144,9 @@ <!-- Offset between bubbles in their stacked position. --> <dimen name="bubble_stack_offset">5dp</dimen> <!-- How far offscreen the bubble stack rests. --> <dimen name="bubble_stack_offscreen">5dp</dimen> <dimen name="bubble_stack_offscreen">9dp</dimen> <!-- How far down the screen the stack starts. --> <dimen name="bubble_stack_starting_offset_y">100dp</dimen> <dimen name="bubble_stack_starting_offset_y">96dp</dimen> <!-- Size of image buttons in the bubble header --> <dimen name="bubble_header_icon_size">48dp</dimen> <!-- Space between the pointer triangle and the bubble expanded view --> Loading
packages/SystemUI/src/com/android/systemui/bubbles/BadgeRenderer.java +3 −3 Original line number Diff line number Diff line Loading @@ -55,9 +55,9 @@ public class BadgeRenderer { /** Space between the center of the dot and the top or left of the bubble stack. */ static float getDotCenterOffset(Context context) { final int iconSizePx = context.getResources().getDimensionPixelSize(R.dimen.individual_bubble_size); return SIZE_PERCENTAGE * iconSizePx; final int iconBitmapSize = context.getResources().getDimensionPixelSize(R.dimen.bubble_icon_bitmap_size); return SIZE_PERCENTAGE * iconBitmapSize; } static float getDotRadius(float dotCenterOffset) { Loading
packages/SystemUI/src/com/android/systemui/bubbles/BadgedImageView.java +4 −3 Original line number Diff line number Diff line Loading @@ -32,7 +32,8 @@ import com.android.systemui.R; public class BadgedImageView extends ImageView { private BadgeRenderer mDotRenderer; private int mIconSize; private int mIconBitmapSize; private Rect mTempBounds = new Rect(); private Point mTempPoint = new Point(); Loading @@ -56,7 +57,7 @@ public class BadgedImageView extends ImageView { public BadgedImageView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); mIconSize = getResources().getDimensionPixelSize(R.dimen.individual_bubble_size); mIconBitmapSize = getResources().getDimensionPixelSize(R.dimen.bubble_icon_bitmap_size); mDotRenderer = new BadgeRenderer(getContext()); TypedArray ta = context.obtainStyledAttributes( Loading @@ -69,7 +70,7 @@ public class BadgedImageView extends ImageView { super.onDraw(canvas); if (mShowUpdateDot) { getDrawingRect(mTempBounds); mTempPoint.set((getWidth() - mIconSize) / 2, getPaddingTop()); mTempPoint.set((getWidth() - mIconBitmapSize) / 2, getPaddingTop()); mDotRenderer.draw(canvas, mUpdateDotColor, mTempBounds, mDotScale, mTempPoint, mOnLeft); } Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleFlyoutView.java +5 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ public class BubbleFlyoutView extends FrameLayout { private final int mFlyoutSpaceFromBubble; private final int mPointerSize; private final int mBubbleSize; private final int mBubbleIconBitmapSize; private final int mFlyoutElevation; private final int mBubbleElevation; private final int mFloatingBackgroundColor; Loading Loading @@ -143,7 +144,9 @@ public class BubbleFlyoutView extends FrameLayout { mFlyoutPadding = res.getDimensionPixelSize(R.dimen.bubble_flyout_padding_x); mFlyoutSpaceFromBubble = res.getDimensionPixelSize(R.dimen.bubble_flyout_space_from_bubble); mPointerSize = res.getDimensionPixelSize(R.dimen.bubble_flyout_pointer_size); mBubbleSize = res.getDimensionPixelSize(R.dimen.individual_bubble_size); mBubbleIconBitmapSize = res.getDimensionPixelSize(R.dimen.bubble_icon_bitmap_size); mBubbleElevation = res.getDimensionPixelSize(R.dimen.bubble_elevation); mFlyoutElevation = res.getDimensionPixelSize(R.dimen.bubble_flyout_elevation); mNewDotOffsetFromBubbleBounds = BadgeRenderer.getDotCenterOffset(context); Loading Loading @@ -216,7 +219,8 @@ public class BubbleFlyoutView extends FrameLayout { post(() -> { // Multi line flyouts get top-aligned to the bubble. if (mFlyoutText.getLineCount() > 1) { setTranslationY(stackPos.y); float bubbleIconTopPadding = (mBubbleSize - mBubbleIconBitmapSize) / 2f; setTranslationY(stackPos.y + bubbleIconTopPadding); } else { // Single line flyouts are vertically centered with respect to the bubble. setTranslationY( Loading