Loading quickstep/res/layout/bubblebar_flyout.xml +5 −5 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ xmlns:tools="http://schemas.android.com/tools"> <ImageView android:id="@+id/bubble_flyout_avatar" android:id="@+id/bubble_flyout_icon" android:layout_width="50dp" android:layout_height="36dp" android:paddingEnd="@dimen/bubblebar_flyout_avatar_message_space" Loading @@ -30,14 +30,14 @@ tools:src="#ff0000"/> <TextView android:id="@+id/bubble_flyout_name" android:id="@+id/bubble_flyout_title" android:layout_width="0dp" android:layout_height="wrap_content" android:fontFamily="@*android:string/config_bodyFontFamilyMedium" android:maxLines="1" android:ellipsize="end" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toEndOf="@id/bubble_flyout_avatar" app:layout_constraintStart_toEndOf="@id/bubble_flyout_icon" tools:text="Sender"/> <TextView Loading @@ -47,8 +47,8 @@ android:fontFamily="@*android:string/config_bodyFontFamily" android:maxLines="2" android:ellipsize="end" app:layout_constraintTop_toBottomOf="@id/bubble_flyout_name" app:layout_constraintStart_toEndOf="@id/bubble_flyout_avatar" app:layout_constraintTop_toBottomOf="@id/bubble_flyout_title" app:layout_constraintStart_toEndOf="@id/bubble_flyout_icon" tools:text="This is a message"/> </merge> quickstep/src/com/android/launcher3/taskbar/bubbles/flyout/BubbleBarFlyoutMessage.kt +1 −6 Original line number Diff line number Diff line Loading @@ -18,9 +18,4 @@ package com.android.launcher3.taskbar.bubbles.flyout import android.graphics.drawable.Drawable data class BubbleBarFlyoutMessage( val senderAvatar: Drawable?, val senderName: CharSequence, val message: CharSequence, val isGroupChat: Boolean, ) data class BubbleBarFlyoutMessage(val icon: Drawable?, val title: String, val message: String) quickstep/src/com/android/launcher3/taskbar/bubbles/flyout/BubbleBarFlyoutView.kt +24 −24 Original line number Diff line number Diff line Loading @@ -44,11 +44,11 @@ class BubbleBarFlyoutView(context: Context, private val positioner: BubbleBarFly const val MIN_EXPANSION_PROGRESS_FOR_CONTENT_ALPHA = 0.75f } private val sender: TextView by lazy(LazyThreadSafetyMode.NONE) { findViewById(R.id.bubble_flyout_name) } private val title: TextView by lazy(LazyThreadSafetyMode.NONE) { findViewById(R.id.bubble_flyout_title) } private val avatar: ImageView by lazy(LazyThreadSafetyMode.NONE) { findViewById(R.id.bubble_flyout_avatar) } private val icon: ImageView by lazy(LazyThreadSafetyMode.NONE) { findViewById(R.id.bubble_flyout_icon) } private val message: TextView by lazy(LazyThreadSafetyMode.NONE) { findViewById(R.id.bubble_flyout_text) } Loading Loading @@ -171,8 +171,8 @@ class BubbleBarFlyoutView(context: Context, private val positioner: BubbleBarFly /** Sets the data for the flyout and starts playing the expand animation. */ fun showFromCollapsed(flyoutMessage: BubbleBarFlyoutMessage, expandAnimation: () -> Unit) { avatar.alpha = 0f sender.alpha = 0f icon.alpha = 0f title.alpha = 0f message.alpha = 0f setData(flyoutMessage) val txToCollapsedPosition = Loading Loading @@ -202,18 +202,18 @@ class BubbleBarFlyoutView(context: Context, private val positioner: BubbleBarFly private fun setData(flyoutMessage: BubbleBarFlyoutMessage) { // the avatar is only displayed in group chat messages if (flyoutMessage.senderAvatar != null && flyoutMessage.isGroupChat) { avatar.visibility = VISIBLE avatar.setImageDrawable(flyoutMessage.senderAvatar) if (flyoutMessage.icon != null) { icon.visibility = VISIBLE icon.setImageDrawable(flyoutMessage.icon) } else { avatar.visibility = GONE icon.visibility = GONE } val minTextViewWidth: Int val maxTextViewWidth: Int if (avatar.visibility == VISIBLE) { minTextViewWidth = minFlyoutWidth - avatar.width - flyoutPadding * 2 maxTextViewWidth = maxFlyoutWidth - avatar.width - flyoutPadding * 2 if (icon.visibility == VISIBLE) { minTextViewWidth = minFlyoutWidth - icon.width - flyoutPadding * 2 maxTextViewWidth = maxFlyoutWidth - icon.width - flyoutPadding * 2 } else { // when there's no avatar, the width of the text view is constant, so we're setting the // min and max to the same value Loading @@ -221,13 +221,13 @@ class BubbleBarFlyoutView(context: Context, private val positioner: BubbleBarFly maxTextViewWidth = minTextViewWidth } if (flyoutMessage.senderName.isEmpty()) { sender.visibility = GONE if (flyoutMessage.title.isEmpty()) { title.visibility = GONE } else { sender.minWidth = minTextViewWidth sender.maxWidth = maxTextViewWidth sender.text = flyoutMessage.senderName sender.visibility = VISIBLE title.minWidth = minTextViewWidth title.maxWidth = maxTextViewWidth title.text = flyoutMessage.title title.visibility = VISIBLE } message.minWidth = minTextViewWidth Loading @@ -240,17 +240,17 @@ class BubbleBarFlyoutView(context: Context, private val positioner: BubbleBarFly expansionProgress = fraction updateTranslationForAnimation(message) updateTranslationForAnimation(sender) updateTranslationForAnimation(avatar) updateTranslationForAnimation(title) updateTranslationForAnimation(icon) // start fading in the content only after we're past the threshold val alpha = ((expansionProgress - MIN_EXPANSION_PROGRESS_FOR_CONTENT_ALPHA) / (1f - MIN_EXPANSION_PROGRESS_FOR_CONTENT_ALPHA)) .coerceIn(0f, 1f) sender.alpha = alpha title.alpha = alpha message.alpha = alpha avatar.alpha = alpha icon.alpha = alpha translationZ = collapsedElevation + (flyoutElevation - collapsedElevation) * expansionProgress Loading Loading @@ -368,7 +368,7 @@ class BubbleBarFlyoutView(context: Context, private val positioner: BubbleBarFly ) ) backgroundColor = ta.getColor(0, defaultBackgroundColor) sender.setTextColor(ta.getColor(1, defaultTextColor)) title.setTextColor(ta.getColor(1, defaultTextColor)) message.setTextColor(ta.getColor(2, defaultTextColor)) ta.recycle() backgroundPaint.color = backgroundColor Loading quickstep/tests/multivalentScreenshotTests/src/com/android/launcher3/taskbar/bubbles/flyout/BubbleBarFlyoutViewScreenshotTest.kt +18 −36 Original line number Diff line number Diff line Loading @@ -63,12 +63,7 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { val flyout = BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = false)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = null, senderName = "sender", message = "message", isGroupChat = false, ) BubbleBarFlyoutMessage(icon = null, title = "sender", message = "message") ) {} flyout.updateExpansionProgress(1f) flyout Loading @@ -82,12 +77,7 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { val flyout = BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = true)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = null, senderName = "sender", message = "message", isGroupChat = false, ) BubbleBarFlyoutMessage(icon = null, title = "sender", message = "message") ) {} flyout.updateExpansionProgress(1f) flyout Loading @@ -102,10 +92,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = true)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = null, senderName = "sender", icon = null, title = "sender", message = "really, really, really, really, really long message. like really.", isGroupChat = false, ) ) {} flyout.updateExpansionProgress(1f) Loading @@ -121,10 +110,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = false)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "message", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(1f) Loading @@ -140,10 +128,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = true)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "message", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(1f) Loading @@ -159,10 +146,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = true)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "really, really, really, really, really long message. like really.", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(1f) Loading @@ -178,10 +164,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = true)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "collapsed on left", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(0f) Loading @@ -197,10 +182,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = false)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "collapsed on right", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(0f) Loading @@ -222,10 +206,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { ) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "expanded 90% on left", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(0.9f) Loading @@ -247,10 +230,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { ) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "expanded 80% on right", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(0.8f) Loading quickstep/tests/multivalentTests/src/com/android/launcher3/taskbar/bubbles/flyout/BubbleBarFlyoutControllerTest.kt +2 −3 Original line number Diff line number Diff line Loading @@ -39,8 +39,7 @@ class BubbleBarFlyoutControllerTest { private lateinit var flyoutController: BubbleBarFlyoutController private lateinit var flyoutContainer: FrameLayout private val context = ApplicationProvider.getApplicationContext<Context>() private val flyoutMessage = BubbleBarFlyoutMessage(senderAvatar = null, "sender name", "message", isGroupChat = false) private val flyoutMessage = BubbleBarFlyoutMessage(icon = null, "sender name", "message") private var onLeft = true @Before Loading Loading @@ -87,7 +86,7 @@ class BubbleBarFlyoutControllerTest { flyoutController.setUpFlyout(flyoutMessage) assertThat(flyoutContainer.childCount).isEqualTo(1) val flyout = flyoutContainer.getChildAt(0) val sender = flyout.findViewById<TextView>(R.id.bubble_flyout_name) val sender = flyout.findViewById<TextView>(R.id.bubble_flyout_title) assertThat(sender.text).isEqualTo("sender name") val message = flyout.findViewById<TextView>(R.id.bubble_flyout_text) assertThat(message.text).isEqualTo("message") Loading Loading
quickstep/res/layout/bubblebar_flyout.xml +5 −5 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ xmlns:tools="http://schemas.android.com/tools"> <ImageView android:id="@+id/bubble_flyout_avatar" android:id="@+id/bubble_flyout_icon" android:layout_width="50dp" android:layout_height="36dp" android:paddingEnd="@dimen/bubblebar_flyout_avatar_message_space" Loading @@ -30,14 +30,14 @@ tools:src="#ff0000"/> <TextView android:id="@+id/bubble_flyout_name" android:id="@+id/bubble_flyout_title" android:layout_width="0dp" android:layout_height="wrap_content" android:fontFamily="@*android:string/config_bodyFontFamilyMedium" android:maxLines="1" android:ellipsize="end" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toEndOf="@id/bubble_flyout_avatar" app:layout_constraintStart_toEndOf="@id/bubble_flyout_icon" tools:text="Sender"/> <TextView Loading @@ -47,8 +47,8 @@ android:fontFamily="@*android:string/config_bodyFontFamily" android:maxLines="2" android:ellipsize="end" app:layout_constraintTop_toBottomOf="@id/bubble_flyout_name" app:layout_constraintStart_toEndOf="@id/bubble_flyout_avatar" app:layout_constraintTop_toBottomOf="@id/bubble_flyout_title" app:layout_constraintStart_toEndOf="@id/bubble_flyout_icon" tools:text="This is a message"/> </merge>
quickstep/src/com/android/launcher3/taskbar/bubbles/flyout/BubbleBarFlyoutMessage.kt +1 −6 Original line number Diff line number Diff line Loading @@ -18,9 +18,4 @@ package com.android.launcher3.taskbar.bubbles.flyout import android.graphics.drawable.Drawable data class BubbleBarFlyoutMessage( val senderAvatar: Drawable?, val senderName: CharSequence, val message: CharSequence, val isGroupChat: Boolean, ) data class BubbleBarFlyoutMessage(val icon: Drawable?, val title: String, val message: String)
quickstep/src/com/android/launcher3/taskbar/bubbles/flyout/BubbleBarFlyoutView.kt +24 −24 Original line number Diff line number Diff line Loading @@ -44,11 +44,11 @@ class BubbleBarFlyoutView(context: Context, private val positioner: BubbleBarFly const val MIN_EXPANSION_PROGRESS_FOR_CONTENT_ALPHA = 0.75f } private val sender: TextView by lazy(LazyThreadSafetyMode.NONE) { findViewById(R.id.bubble_flyout_name) } private val title: TextView by lazy(LazyThreadSafetyMode.NONE) { findViewById(R.id.bubble_flyout_title) } private val avatar: ImageView by lazy(LazyThreadSafetyMode.NONE) { findViewById(R.id.bubble_flyout_avatar) } private val icon: ImageView by lazy(LazyThreadSafetyMode.NONE) { findViewById(R.id.bubble_flyout_icon) } private val message: TextView by lazy(LazyThreadSafetyMode.NONE) { findViewById(R.id.bubble_flyout_text) } Loading Loading @@ -171,8 +171,8 @@ class BubbleBarFlyoutView(context: Context, private val positioner: BubbleBarFly /** Sets the data for the flyout and starts playing the expand animation. */ fun showFromCollapsed(flyoutMessage: BubbleBarFlyoutMessage, expandAnimation: () -> Unit) { avatar.alpha = 0f sender.alpha = 0f icon.alpha = 0f title.alpha = 0f message.alpha = 0f setData(flyoutMessage) val txToCollapsedPosition = Loading Loading @@ -202,18 +202,18 @@ class BubbleBarFlyoutView(context: Context, private val positioner: BubbleBarFly private fun setData(flyoutMessage: BubbleBarFlyoutMessage) { // the avatar is only displayed in group chat messages if (flyoutMessage.senderAvatar != null && flyoutMessage.isGroupChat) { avatar.visibility = VISIBLE avatar.setImageDrawable(flyoutMessage.senderAvatar) if (flyoutMessage.icon != null) { icon.visibility = VISIBLE icon.setImageDrawable(flyoutMessage.icon) } else { avatar.visibility = GONE icon.visibility = GONE } val minTextViewWidth: Int val maxTextViewWidth: Int if (avatar.visibility == VISIBLE) { minTextViewWidth = minFlyoutWidth - avatar.width - flyoutPadding * 2 maxTextViewWidth = maxFlyoutWidth - avatar.width - flyoutPadding * 2 if (icon.visibility == VISIBLE) { minTextViewWidth = minFlyoutWidth - icon.width - flyoutPadding * 2 maxTextViewWidth = maxFlyoutWidth - icon.width - flyoutPadding * 2 } else { // when there's no avatar, the width of the text view is constant, so we're setting the // min and max to the same value Loading @@ -221,13 +221,13 @@ class BubbleBarFlyoutView(context: Context, private val positioner: BubbleBarFly maxTextViewWidth = minTextViewWidth } if (flyoutMessage.senderName.isEmpty()) { sender.visibility = GONE if (flyoutMessage.title.isEmpty()) { title.visibility = GONE } else { sender.minWidth = minTextViewWidth sender.maxWidth = maxTextViewWidth sender.text = flyoutMessage.senderName sender.visibility = VISIBLE title.minWidth = minTextViewWidth title.maxWidth = maxTextViewWidth title.text = flyoutMessage.title title.visibility = VISIBLE } message.minWidth = minTextViewWidth Loading @@ -240,17 +240,17 @@ class BubbleBarFlyoutView(context: Context, private val positioner: BubbleBarFly expansionProgress = fraction updateTranslationForAnimation(message) updateTranslationForAnimation(sender) updateTranslationForAnimation(avatar) updateTranslationForAnimation(title) updateTranslationForAnimation(icon) // start fading in the content only after we're past the threshold val alpha = ((expansionProgress - MIN_EXPANSION_PROGRESS_FOR_CONTENT_ALPHA) / (1f - MIN_EXPANSION_PROGRESS_FOR_CONTENT_ALPHA)) .coerceIn(0f, 1f) sender.alpha = alpha title.alpha = alpha message.alpha = alpha avatar.alpha = alpha icon.alpha = alpha translationZ = collapsedElevation + (flyoutElevation - collapsedElevation) * expansionProgress Loading Loading @@ -368,7 +368,7 @@ class BubbleBarFlyoutView(context: Context, private val positioner: BubbleBarFly ) ) backgroundColor = ta.getColor(0, defaultBackgroundColor) sender.setTextColor(ta.getColor(1, defaultTextColor)) title.setTextColor(ta.getColor(1, defaultTextColor)) message.setTextColor(ta.getColor(2, defaultTextColor)) ta.recycle() backgroundPaint.color = backgroundColor Loading
quickstep/tests/multivalentScreenshotTests/src/com/android/launcher3/taskbar/bubbles/flyout/BubbleBarFlyoutViewScreenshotTest.kt +18 −36 Original line number Diff line number Diff line Loading @@ -63,12 +63,7 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { val flyout = BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = false)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = null, senderName = "sender", message = "message", isGroupChat = false, ) BubbleBarFlyoutMessage(icon = null, title = "sender", message = "message") ) {} flyout.updateExpansionProgress(1f) flyout Loading @@ -82,12 +77,7 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { val flyout = BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = true)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = null, senderName = "sender", message = "message", isGroupChat = false, ) BubbleBarFlyoutMessage(icon = null, title = "sender", message = "message") ) {} flyout.updateExpansionProgress(1f) flyout Loading @@ -102,10 +92,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = true)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = null, senderName = "sender", icon = null, title = "sender", message = "really, really, really, really, really long message. like really.", isGroupChat = false, ) ) {} flyout.updateExpansionProgress(1f) Loading @@ -121,10 +110,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = false)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "message", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(1f) Loading @@ -140,10 +128,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = true)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "message", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(1f) Loading @@ -159,10 +146,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = true)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "really, really, really, really, really long message. like really.", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(1f) Loading @@ -178,10 +164,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = true)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "collapsed on left", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(0f) Loading @@ -197,10 +182,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { BubbleBarFlyoutView(context, FakeBubbleBarFlyoutPositioner(isOnLeft = false)) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "collapsed on right", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(0f) Loading @@ -222,10 +206,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { ) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "expanded 90% on left", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(0.9f) Loading @@ -247,10 +230,9 @@ class BubbleBarFlyoutViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { ) flyout.showFromCollapsed( BubbleBarFlyoutMessage( senderAvatar = ColorDrawable(Color.RED), senderName = "sender", icon = ColorDrawable(Color.RED), title = "sender", message = "expanded 80% on right", isGroupChat = true, ) ) {} flyout.updateExpansionProgress(0.8f) Loading
quickstep/tests/multivalentTests/src/com/android/launcher3/taskbar/bubbles/flyout/BubbleBarFlyoutControllerTest.kt +2 −3 Original line number Diff line number Diff line Loading @@ -39,8 +39,7 @@ class BubbleBarFlyoutControllerTest { private lateinit var flyoutController: BubbleBarFlyoutController private lateinit var flyoutContainer: FrameLayout private val context = ApplicationProvider.getApplicationContext<Context>() private val flyoutMessage = BubbleBarFlyoutMessage(senderAvatar = null, "sender name", "message", isGroupChat = false) private val flyoutMessage = BubbleBarFlyoutMessage(icon = null, "sender name", "message") private var onLeft = true @Before Loading Loading @@ -87,7 +86,7 @@ class BubbleBarFlyoutControllerTest { flyoutController.setUpFlyout(flyoutMessage) assertThat(flyoutContainer.childCount).isEqualTo(1) val flyout = flyoutContainer.getChildAt(0) val sender = flyout.findViewById<TextView>(R.id.bubble_flyout_name) val sender = flyout.findViewById<TextView>(R.id.bubble_flyout_title) assertThat(sender.text).isEqualTo("sender name") val message = flyout.findViewById<TextView>(R.id.bubble_flyout_text) assertThat(message.text).isEqualTo("message") Loading