Status Update
Comments
si...@google.com <si...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Louis Pullen-Freilich <
Link:
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
Expand for full commit details
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
These APIs allow overscroll to have events dispatched to it by one component, and rendered in a separate component.
Fixes: b/266550551
Fixes: b/204650733
Fixes: b/255554340
Fixes: b/229537244
Test: OverscrollTest
Relnote: "Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling APIs - these APIs create a wrapped instance of the provided overscroll effect that doesn't draw / handle events respectively, which allows for rendering overscroll in a separate component from the component that is dispatching events. For example, disabling drawing the overscroll inside a lazy list, and then drawing the overscroll separately on top / elsewhere."
Change-Id: Idbb3d91546b49c1987a041f959bce4b2b09a9f61
Files:
- M
compose/foundation/foundation/api/current.txt
- M
compose/foundation/foundation/api/restricted_current.txt
- M
compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/OverscrollDemo.kt
- M
compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/OverscrollSample.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/OverscrollTest.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Overscroll.kt
Hash: f64e25b7a473c757d080521e7dd97b3f6670f60d
Date: Fri Nov 01 18:43:56 2024
si...@google.com <si...@google.com>
so...@google.com <so...@google.com>
64...@gmail.com <64...@gmail.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-alpha06
androidx.compose.foundation:foundation-android:1.8.0-alpha06
androidx.compose.foundation:foundation-jvmstubs:1.8.0-alpha06
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-alpha06
gl...@gmail.com <gl...@gmail.com> #4
al...@gmail.com <al...@gmail.com> #5
I'm also curious the status of this feature and whether it is still on the roadmap?
so...@google.com <so...@google.com> #6
This is a tracking bug for a feature that's going to be Muhammad's main project hence reassigning.
ap...@google.com <ap...@google.com> #7
Branch: androidx-main
commit aad20b6ccc65dac68c4a9b94efd75837e28fd73f
Author: Muhammad Ali Shah <muhammadalis@google.com>
Date: Tue Aug 27 13:50:27 2024
AutoSize: Create API
See design doc go/autosize
Test: Tested equals(), checked that the stepBased implementation was falling back to minFontSize = maxFontSize if minFontSize > maxFontSize and throwing IllegalArgumentExceptions with all other potential combinations of illegal arguments, checked if getFontSize() acts as intended including edge cases like when overflow always and never occurs.
Bug: 139320827
Change-Id: I3f24abe306ed832876bbfc9cb5d5a1aa3b25edb0
A compose/foundation/foundation/src/androidUnitTest/kotlin/androidx/compose/foundation/text/AutoSizeTest.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/AutoSize.kt
jo...@google.com <jo...@google.com> #8
Please note that the above change is part of a chain of changes. We will publish the API at a later time and provide updates on this tracking bug.
mu...@google.com <mu...@google.com>
ap...@google.com <ap...@google.com> #9
Branch: androidx-main
commit 786f64663f1da5efe7c98344ac7c7ad90724acbc
Author: Muhammad Ali Shah <muhammadalis@google.com>
Date: Tue Sep 03 16:08:00 2024
AutoSize: Implement ParagraphLayoutCache logic
Also add autoSize parameter to TextAnnotatedStringElement and TextAnnotatedStringNode
Test: Checked valid and invalid sequences of font sizes, different constraints, different texts, Ellipsis/Visual overflow behavior, compatibility with the em unit and behavior when minLines is greater than 1. All works as intended.
Bug: 139320827
Change-Id: If73d75ef8555132f221cdefc2242eb56228ab292
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/ParagraphLayoutCacheTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/TextStringSimpleNodeInvalidationTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/ParagraphLayoutCache.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextStringSimpleElement.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextStringSimpleNode.kt
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit 5d923a5049d9f073055745cb2d2563066cc9d996
Author: Muhammad Ali Shah <muhammadalis@google.com>
Date: Thu Sep 12 13:26:43 2024
AutoSize: Implement MultiParagraphLayoutCache logic
Test: Checked valid and invalid sequences of font sizes, different constraints, different texts, Ellipsis/Visual overflow behavior, compatibility with the em unit and behavior when minLines is greater than 1. All works as intended.
Bug: 139320827
Change-Id: I38196267ae1d2b7605c64c1741d19883747f35b2
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCacheTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringNodeInvalidationTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCache.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringElement.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringNode.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringElement.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringNode.kt
mu...@google.com <mu...@google.com>
lp...@google.com <lp...@google.com>
ap...@google.com <ap...@google.com> #11
Project: platform/frameworks/support
Branch: androidx-main
Author: Jossi Wolf <
Link:
Publish AutoSize Text
Expand for full commit details
Publish AutoSize Text
AutoSize is now public and sealed and does not expose any API. All methods are moved to the internal TextAutoSize, which will let us publish the API for custom AutoSize implementations in the future if needed.
Test: Existing
Bug: 139320827
Relnote: "Support for auto-sizing text. Pass an AutoSize instance (e.g. AutoSize.StepBased) to your favorite text composable (like BasicText) and see your text size adapt to the available space!"
Change-Id: Ice7e09b9cac7be10ab5e681ec57d994d50102583
Files:
- M
compose/foundation/foundation/api/current.txt
- M
compose/foundation/foundation/api/restricted_current.txt
- M
compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeText.kt
- M
compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/AutoSizeTestUtils.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCacheTest.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/ParagraphLayoutCacheTest.kt
- M
compose/foundation/foundation/src/androidUnitTest/kotlin/androidx/compose/foundation/text/AutoSizeTest.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/AutoSize.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
- A
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/AutoSizeTextLayoutScope.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCache.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/ParagraphLayoutCache.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringElement.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringNode.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringElement.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringNode.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextStringSimpleElement.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextStringSimpleNode.kt
Hash: 54dd40666510382dd44ed84ec92903dba3af5df8
Date: Mon Oct 14 16:43:38 2024
jo...@google.com <jo...@google.com>
eb...@netflix.com <eb...@netflix.com> #12
Hello, out of curiosity, is is something for compose 1.8 or later?
jo...@google.com <jo...@google.com> #13
This will land in 1.8, pending possible API refinements. We will comment on this issue when the change is included in a release.
pr...@google.com <pr...@google.com> #14
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-alpha05
androidx.compose.foundation:foundation-android:1.8.0-alpha05
androidx.compose.foundation:foundation-jvmstubs:1.8.0-alpha05
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-alpha05
an...@justdice.io <an...@justdice.io> #15
I tested out androidx.compose.foundation:foundation:1.8.0-alpha05
and noticed that BasicText
with an autoSize
argument just cuts off the text with maxLines
set to 1.
On Android Views, when using android:autoSizeTextType="uniform"
and android:maxLines="1"
, the TextView
properly sizes down until the min text size is reached.
<LinearLayout
android:layout_width="15dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="2sp"
android:autoSizeMaxTextSize="14sp"
android:maxLines="1"
android:text="Test" />
</LinearLayout>
Box(Modifier.width(15.dp)) {
BasicText("Test", autoSize = AutoSize.StepBased(2.sp, 14.sp), maxLines = 1)
}
jo...@google.com <jo...@google.com> #16
Thanks for the report! Please file a new bug in this component for tracking purposes. Thank you!
an...@justdice.io <an...@justdice.io> #17
Linked issue:
Description