forked from androidx/androidx
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] androidx-main from androidx:androidx-main #736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+673
−818
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bug: 474095480 Test: Presubmit Relnote: Added the `ExperimentalXrDeviceLifecycleApi` annotation Change-Id: I7f54e2301fbe2c5792a64385d76f0af98a23c504
Implements the correct motion spec for the Tick icon in SwitchButton (Wear Compose Material3). The previous animation, using animateTick(), drew the tick in segments. The new design spec requires the complete tick icon to scale up from the center of the thumb and fade in.
Key changes:
1. AnimateTick.kt; New internal functions added:
* Density.createFullTickPath(): Creates and returns a Path object for the complete tick, that fits inside a 24.dp*24.dp container and using Density for pixel conversions.
* DrawScope.drawScalingTick(): This function applies a scale transformation to the provided Path. A Cubic Ease-Out easing curve is used on the scale factor for better visibility.
2. SwitchButton.kt Update:
* Added Modifier.drawWithCache to efficiently cache the fully-drawn tick Path object generated via createFullTickPath().
* The onDrawBehind{} lambda within drawWithCache now contains the original drawing logic.
* drawThumbAndTick() now accepts the cached Path, uses DrawScope.translate to center the drawing context on the thumb, and then calls drawScalingTick() to render the scaled tick.
3. Nomenclature Cleanup: Renamed constants in AnimateTick.kt (e.g., TICK_BASE_LENGTH_DP to TICK_BASE_COMPONENT_DP) to more accurately reflect that they represent vector components rather than Euclidean lengths, and added comments to clarify.
These changes ensure the SwitchButton tick animation aligns with the UX motion specification and improve performance by caching the fully-formed tick Path.
Bug: 378644361
Fixes: 378644361
Test: Manually verified the animation in the Wear Compose Demos app. The tick now scales and fades in smoothly from the center of the thumb as expected.
Change-Id: I7a7eb896ce9b1a693150b05ff84399eb62c75770
Bug: 473600344 Test: Tested in Aura emulator Change-Id: I91dcf3068cb48326efae46c62b17b0b6e57f22d6
Test: Added unit tests.
Relnote: "Typically dependencies can be defined using the `baselineProfile` Gradle configuration.
However that does not seem to work for the `androidMain.dependencies` block.
```kotlin
kotlin {
androidLibrary {
namespace = \"com.example.namespace\"
compileSdk = 36
}
sourceSets {
androidMain.dependencies {
// THIS DOES NOT WORK
// baselineProfile(\":yourProducerProject\")
}
}
}
```
Instead you should be defining your dependencies using the `baselineProfile` extension.
```
plugins {
id(\"org.jetbrains.kotlin.multiplatform\")
id(\"com.android.kotlin.multiplatform.library\")
id(\"androidx.baselineprofile.consumer\")
}
kotlin {
androidLibrary {
namespace = \"com.example.namespace\"
compileSdk = 36
}
sourceSets {
androidMain.dependencies {
// ...
}
}
}
// Define dependencies
// This works !
baselineProfile {
variants {
androidMain {
from(project(\":yourProducerProject\"))
}
}
}
```
"
Change-Id: Ie19c4535ebe25ead09e22d9a5e7654c2a5d0b627
Introduce a dedicated StrictMode for checking non-compliant behaviors. Bug: 356268566 Test: Unit tests Change-Id: I0bf87b75ad3967903c2b7f3d6072b6d202410c85
On non-compliant platforms, the sequence ID may be incorrect under extension sessions. Turn the sequenceId check into a warning. Bug: 356268566 Test: Unit tests Change-Id: I0d303fdf7f6448bb1f18c45da9a41c68e93ef79d
Test: ./gradlew biometric:biometric:test Change-Id: Ic9635774aab8c3878b92239a7bd49cfc19ccea05
Replaces the custom synchronization implementation with kotlinx-atomicfu in the native source set. Bug: N/A Test: existing passes Change-Id: I5c1f9a810fefa2829cc49b76918de565d712d0de
Bug: 400115331 Test: ./gradlew biometric:biometric:assemble Test: ./gradlew :biometric:integration-tests:testapp-compose:checkDebugAarMetadata Change-Id: I9da037a654393c4c7e9eb3cdbc808a4d51bd69d5
Bug: 400115331 Test: ./gradlew biometric:biometric:test Relnote: "CryptoObject support for KeyAgreement" Change-Id: I7302920f722bba7a360efb93fcdae74274d710ef
…odules." into androidx-main
Replaces the custom synchronization implementation with kotlinx-atomicfu in the native source set. Bug: N/A Test: existing passes Change-Id: Ia1d860d925298286d56707ae2e7442975b7ab064
Replaces the custom synchronization implementation with kotlinx-atomicfu in the native source set. Bug: N/A Test: existing passes Change-Id: I6d73f1468c4c37c6c4d74d238833d9f268769526
* changes: Turn sequenceId check into a warning Introduce StrictMode for checking non-compliant behaviors
* changes: Migrate SynchronizedObject to AtomicFU in SavedState Migrate SynchronizedObject to AtomicFU in ViewModel
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )