Fixed
Status Update
Comments
[Deleted User] <[Deleted User]> #2
Hi, thanks for reaching out to us and reporting this issue! Will share this to the internal teams and open a report on your behalf. Will reach back with updates as soon as I have one.
Thanks!
so...@google.com <so...@google.com> #3
This has created significant limitations in our app - we need to enable COEP so we can use SharedArrayBuffer for some performance-intensive code, however we currently can't do this and embed YouTube videos at the same time, which we need to support. Credentialless/anonymous iframes would theoretically also solve this issue, but this is not widely adopted in browsers (and WebKit is in fact resistant to implementing it due to user safety concerns: https://github.com/WebKit/standards-positions/issues/45 )
se...@google.com <se...@google.com> #5
Thanks for the report!
I will fix the background issue on this bug.
Looking at the clickable link, it appears correct in my quick repro. Please file a separate bug for that with repro screenshot and code listing, thanks!
bu...@google.com <bu...@google.com> #9
Hi. I've received your bug and will wait until https://android-review.googlesource.com/2153805 is closed and then unCc myself.
bu...@google.com <bu...@google.com> #11
Hi. I've received your bug and will wait until https://android-review.googlesource.com/2153805 is closed and then assign the bug to seanmcq@google.com and unCc myself.
ap...@google.com <ap...@google.com> #12
Project: platform/frameworks/support
Branch: androidx-main
commit 15ef5cb171dd7b91555fda17a41a12029b60f320
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Jul 14 16:11:33 2022
Draw background in EmojiSpan
TextLine draws ReplacementSpans prior to configuring BackgroundSpans,
in a separate for loop. As a result, replacement spans don't honor surrounding
backgrounds.
Change EmojiSpan to apply background itself, as if TextLayout had correctly
rastered behind the replacement span or updated the TextPaint with bgColor.
Test: ./gradlew :e2:e2:cAT
Bug: b/230525134
Relnote: "Emoji2 will now correctly draw backgrounds from BackgroundSpan."
Change-Id: Ide6a8542179a2676cefc16dcf3f3d43e6f376de6
M emoji2/emoji2/src/androidTest/java/androidx/emoji2/text/EmojiSpanTest.java
M samples/SupportEmojiDemos/src/main/java/com/example/android/support/text/emoji/MainFragment.java
M emoji2/emoji2/src/main/java/androidx/emoji2/text/TypefaceEmojiSpan.java
M samples/SupportEmojiDemos/src/main/java/com/example/android/support/text/emoji/ConfigLayout.java
https://android-review.googlesource.com/2153805
Branch: androidx-main
commit 15ef5cb171dd7b91555fda17a41a12029b60f320
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Jul 14 16:11:33 2022
Draw background in EmojiSpan
TextLine draws ReplacementSpans prior to configuring BackgroundSpans,
in a separate for loop. As a result, replacement spans don't honor surrounding
backgrounds.
Change EmojiSpan to apply background itself, as if TextLayout had correctly
rastered behind the replacement span or updated the TextPaint with bgColor.
Test: ./gradlew :e2:e2:cAT
Bug:
Relnote: "Emoji2 will now correctly draw backgrounds from BackgroundSpan."
Change-Id: Ide6a8542179a2676cefc16dcf3f3d43e6f376de6
M emoji2/emoji2/src/androidTest/java/androidx/emoji2/text/EmojiSpanTest.java
M samples/SupportEmojiDemos/src/main/java/com/example/android/support/text/emoji/MainFragment.java
M emoji2/emoji2/src/main/java/androidx/emoji2/text/TypefaceEmojiSpan.java
M samples/SupportEmojiDemos/src/main/java/com/example/android/support/text/emoji/ConfigLayout.java
se...@google.com <se...@google.com>
na...@google.com <na...@google.com> #14
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.emoji2:emoji2:1.3.0-alpha01
Description
Version used:
Devices/Android versions reproduced on:
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).
SpannableString name = new SpannableString("Test š«š«š« emoji");
name.setSpan(new BackgroundColorSpan(Color.RED), 0, name.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
Textview tv = findViewbyId(R.id.text)
tv.setText(name);