Add contrast pill to workspace apps

When the flag is enabled, allow the BubbleTextView to draw a background
pill behind the app title. Also change the color of the text to properly
ensure contrast.  The contrast pill is only enabled for workpace apps,
so attempt draw the pill only for DoubleShadowBubbleTextView elements.

Bug: 341217082
Flag: com.android.launcher3.enable_contrast_tiles
Test: Manual, visual change
Change-Id: Idce27bd8dfca4b525c762fcd0873562f31b45b8f
This commit is contained in:
Ana Salazar Maldonado
2024-10-22 21:20:20 +00:00
parent 2e8707dffb
commit bdbad823ce
4 changed files with 127 additions and 1 deletions
@@ -102,6 +102,9 @@ public class DoubleShadowBubbleTextView extends BubbleTextView {
@Override
public void onDraw(Canvas canvas) {
if (shouldDrawAppContrastTile()) {
drawAppContrastTile(canvas);
}
// If text is transparent or shadow alpha is 0, don't draw any shadow
if (skipDoubleShadow()) {
super.onDraw(canvas);