Status Update
Comments
ma...@google.com <ma...@google.com>
se...@google.com <se...@google.com> #2
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
da...@gmail.com <da...@gmail.com> #3
da...@well.co <da...@well.co> #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
se...@google.com <se...@google.com> #5
Passing this onward to Luis for some clarification here. Scrolling through the mio page, for modal bottom sheet specifically, I am not sure if there is a clear asset demonstrating what this could look like, and in turn, additional functionality we could provide to users to help enable fluid closing functionality.
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
Author: Jose Figueroa <
Link:
[Material3][ModalBottomSheet] Update inset handling to move modalbottomsheet content out of status bars
Expand for full commit details
[Material3][ModalBottomSheet] Update inset handling to move modalbottomsheet content out of status bars
This makes content more visible and interactable, per material spec
RelNote: "ModalBottomSheet content now moves content away from status bar."
Bug: 336553431
Bug: 321877275
Bug: 336962418
Bug: 342093067
Test: Manual testing
Change-Id: I5114c66808d155f5db97908520bad2efd93be08e
Files:
- M
compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/ModalBottomSheet.kt
Hash: 8e198d739211999723660d6394ba6274730f564a
Date: Tue Oct 01 11:59:21 2024
Description
It states:
They can be dismissed by:
Using a close affordance within the bottom sheet’s top app bar, if available
Display a close affordance in a full-screen modal bottom sheet.
The above is the link of what to do in that situation but I think there is more clarification needed and maybe there is multiple ways Material recommends to do this?
Is this saying there should be a collapse icon in the app bar as I do not see it. Should we include an x icon in the content of the bottomsheet / replace the drag handle with it?
The full expanded modal bottomsheet on the material sample app maintains a drag handle and does not merge into the top bar (see screenshot)