Status Update
Comments
ra...@gmail.com <ra...@gmail.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
de...@gmail.com <de...@gmail.com> #3
jo...@google.com <jo...@google.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
jo...@google.com <jo...@google.com>
de...@gmail.com <de...@gmail.com> #5
So the animation APIs are currently the blocking point?
Is the mentioned issue correct?
Ok, I thought you were much further ahead because the first release candidate was published. :D
sy...@gmail.com <sy...@gmail.com> #6
se...@google.com <se...@google.com>
se...@google.com <se...@google.com>
gl...@gmail.com <gl...@gmail.com> #7
se...@google.com <se...@google.com> #8
In progress : )
ma...@quantox.com <ma...@quantox.com> #9
So the question is, should we actually be starting new projects on Material3 or not? It's even "final" now. And is it really more future proof from the project maintenance perspective?
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit e6892a2153fca43e348b0de7c2614e7bf6cbc708
Author: José Figueroa <serniebanders@google.com>
Date: Tue Nov 01 10:38:11 2022
[Material3][SwipeToDismiss] Update Swipe To Dismiss to M3 library
Updates:
* Threshold calculation simplified and moved to DismissState.
* SwipeableState inheritance moved internally, with relevant parameters exposed to DismissState API.
* Splits more complex demo and simple sample code logic.
Test: Forked M2 Unit Tests
Bug: 242889540
RelNote: Implement SwipeToDismiss in Material 3 library.
Change-Id: I458a8e1359896712a2a8aede43e0283977be4601
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/public_plus_experimental_current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/integration-tests/material3-demos/src/main/java/androidx/compose/material3/demos/Material3Demos.kt
A compose/material3/material3/integration-tests/material3-demos/src/main/java/androidx/compose/material3/demos/SwipeToDismissDemo.kt
M compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/SwipeToDismissSamples.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/SwipeToDismissTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/SwipeToDismiss.kt
se...@google.com <se...@google.com> #11
@marko I can't speak to the PullToRefresh feature as I've not worked on it, but to generally answer your question: I would say that is ultimately your call to make. Personally I would recommend using Material3, as it has a longer window of active development (feature requests, bug fixes, other dev time resources) while the goal is to sunset M2 support over time. However M2 is of course more feature complete at this time.
PullToRefresh is not currently on the M3 radar however you are welcome to file a feature request.
de...@gmail.com <de...@gmail.com> #12
@se...@google.com maybe not so good to post the full mail here?
na...@google.com <na...@google.com> #13
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.1.0-alpha04
Description
Feature Request to add SwipeToDismiss to Compose for Material 3, as it is not recommended to use material components in a Material 3 project according to this ticket .