Fixed
Status Update
Comments
an...@northwesternmutual.com <an...@northwesternmutual.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit a330c0d3bcdd41326f37968a60e6084ad4a2e32c
Author: Chet Haase <chet@google.com>
Date: Wed Jul 05 07:26:46 2023
Convert APIs using PointF to use Float instead
PointF is a convenient mechanism for passing around x.y values
representing 2D points. But there are downsides, including:
- Converting to PointF: You may not have the data in PointF form
to begin with, so using an API which takes PointF requires converting
the data to that form (including allocating a PointF object every time)
- Mutability: Point structures can be mutated internally, causing
unpredictability in what that mutation means. Should the library
react to those changes? Ignore them? Do defensive copies (requiring
even more allocations)? Using primitive types like Float make the
behavior more obvious (by making the data inherently immutable).
- Allocations: Whenever we use object types, there are necessarily
allocations on the Java heap for them. This puts pressure on the GC
at both allocation and collection time. Given the amount of points
being passed around (especially at morph creation time, when curves
are being split and created), this causes a lot of PointF objects to
be allocated (even temporarily). Using Float avoids that problem.
Also fixed bug with unclosed paths causing discontinuity at the
start/end point.
Bug: 276466399
Bug: 290254314
Test: integration and unit tests pass
Relnote: PointF parameters changed to Float pairs
Change-Id: Id4705d27c7be31b26ade8186b99fffe2e2f8450e
M graphics/graphics-shapes/api/current.txt
M graphics/graphics-shapes/api/restricted_current.txt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicShapeTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonMeasureTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/RoundedPolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/ShapesTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/TestUtils.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Cubic.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/CubicShape.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FeatureMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FloatMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Morph.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/PolygonMeasure.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/RoundedPolygon.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Shapes.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Utils.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/DebugDraw.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/ShapeEditor.kt
M graphics/integration-tests/testapp/src/main/java/androidx/graphics/shapes/test/MaterialShapes.kt
https://android-review.googlesource.com/2649119
Branch: androidx-main
commit a330c0d3bcdd41326f37968a60e6084ad4a2e32c
Author: Chet Haase <chet@google.com>
Date: Wed Jul 05 07:26:46 2023
Convert APIs using PointF to use Float instead
PointF is a convenient mechanism for passing around x.y values
representing 2D points. But there are downsides, including:
- Converting to PointF: You may not have the data in PointF form
to begin with, so using an API which takes PointF requires converting
the data to that form (including allocating a PointF object every time)
- Mutability: Point structures can be mutated internally, causing
unpredictability in what that mutation means. Should the library
react to those changes? Ignore them? Do defensive copies (requiring
even more allocations)? Using primitive types like Float make the
behavior more obvious (by making the data inherently immutable).
- Allocations: Whenever we use object types, there are necessarily
allocations on the Java heap for them. This puts pressure on the GC
at both allocation and collection time. Given the amount of points
being passed around (especially at morph creation time, when curves
are being split and created), this causes a lot of PointF objects to
be allocated (even temporarily). Using Float avoids that problem.
Also fixed bug with unclosed paths causing discontinuity at the
start/end point.
Bug: 276466399
Bug: 290254314
Test: integration and unit tests pass
Relnote: PointF parameters changed to Float pairs
Change-Id: Id4705d27c7be31b26ade8186b99fffe2e2f8450e
M graphics/graphics-shapes/api/current.txt
M graphics/graphics-shapes/api/restricted_current.txt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicShapeTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonMeasureTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/RoundedPolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/ShapesTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/TestUtils.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Cubic.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/CubicShape.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FeatureMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FloatMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Morph.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/PolygonMeasure.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/RoundedPolygon.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Shapes.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Utils.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/DebugDraw.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/ShapeEditor.kt
M graphics/integration-tests/testapp/src/main/java/androidx/graphics/shapes/test/MaterialShapes.kt
co...@google.com <co...@google.com> #3
PointF was the main (possibly only) mutability issue, marking this as fixed
an...@northwesternmutual.com <an...@northwesternmutual.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.graphics:graphics-shapes:1.0.0-alpha04
an...@northwesternmutual.com <an...@northwesternmutual.com> #5
Hello! It has been about a month since I last checked in. Just seeing where this is at and if a fix is being planned. Thanks!
se...@google.com <se...@google.com>
an...@northwesternmutual.com <an...@northwesternmutual.com> #6
Hello, is there any update on this issue yet?
sg...@google.com <sg...@google.com>
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit 94c9c1be861c2cc6640411680244cde9c4e2372e
Author: Shalom Gibly <sgibly@google.com>
Date: Wed Mar 13 17:10:06 2024
Adds size customization to top app bars
- Added parameters to allow changing the fixed and expanded heights for
all types of top app bars.
- Deprecated (with Hidden) the previous experimental functions and
created new ones that take those params.
- Removed an older deprecated SmallTopAppBar functions
- Fix a performance issue where the single-line top app bars were
recomposing too much when scrolling content.
- Applied a heightIn with a max value to the app bar to better support
showing of DropDown menus from the app bar.
- Fix an accessibility issue with the Medium app bar that was cutting
some of the displayed title when using large font and display.
Fixes: 316594552
Fixes: 323403446
Fixes: 300953236
Fixes: 286296147
Fixes: 330410290
Bug: 308540676
Test: Added tests to AppBarTest.kt
Relnote: "Top app bar APIs now support custom heights for both fixed
and collapsible sections.
Fixed an issue that caused single-line top app bars to recompose too
many times when scrolling content.
Resolved an issue where MediumTopAppBar truncated titles on devices
with large font/display settings."
Change-Id: Ib8b0ce45ed461e7d5110e1473a90ab48c268caa6
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/AppBarTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/AppBar.kt
https://android-review.googlesource.com/3000717
Branch: androidx-main
commit 94c9c1be861c2cc6640411680244cde9c4e2372e
Author: Shalom Gibly <sgibly@google.com>
Date: Wed Mar 13 17:10:06 2024
Adds size customization to top app bars
- Added parameters to allow changing the fixed and expanded heights for
all types of top app bars.
- Deprecated (with Hidden) the previous experimental functions and
created new ones that take those params.
- Removed an older deprecated SmallTopAppBar functions
- Fix a performance issue where the single-line top app bars were
recomposing too much when scrolling content.
- Applied a heightIn with a max value to the app bar to better support
showing of DropDown menus from the app bar.
- Fix an accessibility issue with the Medium app bar that was cutting
some of the displayed title when using large font and display.
Fixes: 316594552
Fixes: 323403446
Fixes: 300953236
Fixes: 286296147
Fixes: 330410290
Bug: 308540676
Test: Added tests to AppBarTest.kt
Relnote: "Top app bar APIs now support custom heights for both fixed
and collapsible sections.
Fixed an issue that caused single-line top app bars to recompose too
many times when scrolling content.
Resolved an issue where MediumTopAppBar truncated titles on devices
with large font/display settings."
Change-Id: Ib8b0ce45ed461e7d5110e1473a90ab48c268caa6
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/AppBarTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/AppBar.kt
an...@northwesternmutual.com <an...@northwesternmutual.com> #8
Hello! I see this has been marked fixed since March, though I don't see a release version attached to it. Is there a planned release we can expect this fix?
Thanks!
Thanks!
Description
Jetpack Compose component used: MediumTopAppBar
Android Studio Build: #AI-221.6008.13.2211.9514443
Kotlin version: "1.8.20"
Steps to Reproduce or Code Sample to Reproduce:
When trying to create a Collapsing Toolbar with a Scaffold & MediumTopAppBar the Title Text is cut off. This happens when the largest text size is enabled on the device. This is what the code looks like:
```
Scaffold(
modifier = Modifier
.nestedScroll(scrollBehavior.nestedScrollConnection),
containerColor = Theme.colors.background,
contentColor = Theme.colors.surface,
topBar = {
MediumTopAppBar(
title = { Text(text = "Cash Flow", maxLines = 1) },
...
```
Also attached is what the it looks like in the view