Status Update
Comments
ma...@google.com <ma...@google.com>
ma...@gmail.com <ma...@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
jo...@google.com <jo...@google.com> #3
se...@google.com <se...@google.com>
ma...@gmail.com <ma...@gmail.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
se...@google.com <se...@google.com>
se...@google.com <se...@google.com> #5
This seems to be a bug with the underlying popup functionality. Filed a bug to raise this which can be tracked here:
se...@google.com <se...@google.com>
de...@gmail.com <de...@gmail.com> #6
Any ETA? And what is ticket
se...@google.com <se...@google.com> #7
I have updated the ticket linked to be public. It is a tracker for migrating the internal popup functionality to a custom window view for easier access to window flags.
se...@google.com <se...@google.com> #8
Interestingly, upon investigation this is only an issue on APIs above 29. Regardless of using popup or a generic android view. It seems to be documented here:
continuing to investigate but the solution unfortunately does not seem so straight forward.
sk...@gmail.com <sk...@gmail.com> #9
I thought that
se...@google.com <se...@google.com> #10
I think it's possibly related in that the same use case: Using compose text fields on new windows appears to have the same effect whether it be a PopupWindow, an AbstractComposeView or in their case DialogFragment. So it makes me suspicious that this may be an issue with TextField instead of the windowing logic. The change you linked moves the BottomSheet to a custom view instead of the UI popup but does not alone fix this bug.
se...@google.com <se...@google.com> #11
This issue which extends to any custom windows seems to have been resolved with:
Waiting on that change to land to proceed on this issue.
ja...@gmail.com <ja...@gmail.com> #12
de...@gmail.com <de...@gmail.com> #13
For me the modal bottom sheet works now. The only bug is, that the cursor drag indicator is shown above the cursor instead of below.
ap...@google.com <ap...@google.com> #14
Branch: androidx-main
commit 7545cec3617ab5d1ea83d66822bc094e7f03c562
Author: José Figueroa Santos <serniebanders@google.com>
Date: Wed Apr 19 16:04:18 2023
[Material3][gradle] Update compose dependencies to 1.4.2
Upgrade needed to intake the following bug fix:
Bug: 268380384
Bug: 272483584
RelNote: ModalBottomSheet now can display IME keyboard
Test: Manual
Change-Id: Idc5082008acb547cac2100a69cab4be7db85f50f
M compose/material3/material3/build.gradle
M compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/BottomSheetSamples.kt
se...@google.com <se...@google.com>
am...@gmail.com <am...@gmail.com> #15
ju...@google.com <ju...@google.com> #16
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3-android:1.2.0-alpha02
Description
Jetpack Compose version: M3 1.1-alpha6
Jetpack Compose component used: ModalBottomSheet
Android Studio Build: IC-231.6471.13
Kotlin version: 1.8.10
Steps to Reproduce or Code Sample to Reproduce:
Focus the text field.
The keyboards gets opened behind.