Status Update
Comments
al...@google.com <al...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Anastasia Soboleva <
Link:
Add internal APIs to add bullet list from the AnnotatedString builder
Expand for full commit details
Add internal APIs to add bullet list from the AnnotatedString builder
When we're past API freeze, make this APIs public.
Bug: 299662276, 139326648
Test: AnnotatedStringBuilderTest
Change-Id: I2212987ce813ff55cca3d2a4fa4aeb23dd86ec01
Files:
- M
compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphHelper.android.kt
- M
compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
- M
compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/style/BulletSpan.android.kt
- M
compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/AnnotatedStringBuilderTest.kt
- M
compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
- M
compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Bullet.kt
Hash: eb01d1a28091a1c7c7d370a0000d0a077f6c0d0c
Date: Tue Oct 15 19:21:49 2024
se...@google.com <se...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Anastasia Soboleva <
Link:
Add ul/li tags support to fromHtml
Expand for full commit details
Add ul/li tags support to fromHtml
Unlike TextView where indentation is added but bullet is always drawn at 0, in this implementation the bullet follows the start of text in the paragraph meaning that it's drawn with the indentation.
Test: new tests and updated demo
Bug: 299662276, 139326648
Relnote: "AnnotatedString.fromHtml now supports <ul>/<li> tags"
Change-Id: I7c2fe1717e72b66da4b2613efbeeb7b6f5ebb44e
Files:
- M
compose/ui/ui-text/samples/src/main/res/values/styled-string-for-sample.xml
- M
compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/AnnotatedStringFromHtmlTest.kt
- M
compose/ui/ui-text/src/androidInstrumentedTest/res/values/styled-string-for-test.xml
- M
compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/Html.android.kt
- M
compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphHelper.android.kt
- M
compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
- A
compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/style/BulletSpan.android.kt
- M
compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/style/DrawStyleSpan.android.kt
- M
compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/AnnotatedStringBuilderTest.kt
- M
compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
- A
compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Bullet.kt
Hash: b6d4b40b1a0ffe65c9869ddcde3f133534a10a89
Date: Tue Oct 15 14:30:50 2024
te...@gmail.com <te...@gmail.com> #4
Could it be deferred until attachToWindow?
ap...@google.com <ap...@google.com> #5
Branch: androidx-main
commit 78e22170788df05b5676110cb903adafd26f4731
Author: Sean McQuillan <seanmcq@google.com>
Date: Fri Dec 03 15:42:40 2021
Don't call setKeyListener from AppCompat constructors
This leaked a partially constructed this instance to overrides of
setKeyListener.
Instead, explicitly call super. for all calls made during constructor.
No behavior changes for apps that don't override setKeyListener.
Relnote: "AppCompatEditText, AppCompatAutoCompleteTextView, and
AppCompatMultiAutoCompleteTextView will not call overriden
setKeyListener during the constructor. Fixes
Test: ./gradlew :appc:appc:cAT
Fixes:
Change-Id: I5c13aa13569e9a916a4af097153da40cbcf27366
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatMultiAutoCompleteTextView.java
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatAutoCompleteTextViewEmojiTest.java
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatEditTextEmojiTest.java
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatEditText.java
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatAutoCompleteTextView.java
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatMultiAutoCompleteTextViewEmojiTest.java
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatEmojiEditTextHelper.java
se...@google.com <se...@google.com> #6
Thanks. After exploring, it seemed that the behavior change in onAttachedToWindow was undesireable.
However, with a bit of code duplication it's possible to avoid dispatched calls to setKeyListener from the constructor, so we opted for that approach.
Thank you for the report!
te...@gmail.com <te...@gmail.com> #7
Very appreciated you look for it and found a way to not force me keep forever a try-catch to managed this behavior :)
Good continuation,
best regards
Description
Version used: 1.4.0
Devices/Android versions reproduced on: All
Problem is since version 1.4.0, AppCompatEditText constructor call addTextChangedListener during instantiation which is not a final method.
In my lib, I have overrided this method in my sub class to do some job and improve behavior when you add a textWatcher.
But this overrided method can't be called before the construction is fully processed... And since AppCompatEditText call now this method in its constructor, it always failed and crash since the sub construction has not been done yet...
The problem doesn't exist up to version 1.3.1