Status Update
Comments
gr...@google.com <gr...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add MutableStateSerializer
for serializing MutableState
Expand for full commit details
Add `MutableStateSerializer` for serializing `MutableState`
- Introduced an inline `MutableStateSerializer` function to infer and retrieve the appropriate `KSerializer` for `MutableState` of a serializable type.
- Added an overload of `MutableStateSerializer` that accepts an explicit `KSerializer` for the wrapped type, allowing for customizing the `KSerializer`.
- Implemented `MutableStateSerializerImpl`, a private class that handles the serialization and deserialization logic for `MutableState`, delegating inner value processing to the provided `KSerializer`.
- Only `KSerializer<MutableState<T>>` is exposed; the `MutableStateSerializerImpl` remains private.
RelNote: "Add `MutableStateSerializer` for serializing `androidx.compose.runtime.MutableState`."
Test: MutableStateSerializerTest
Bug: 378895074
Change-Id: Idfc489d9313461bddd0046052d0f6a41644e7712
Files:
- M
lifecycle/lifecycle-viewmodel-compose/api/current.txt
- M
lifecycle/lifecycle-viewmodel-compose/api/restricted_current.txt
- M
lifecycle/lifecycle-viewmodel-compose/build.gradle
- A
lifecycle/lifecycle-viewmodel-compose/src/androidInstrumentedTest/kotlin/androidx/lifecycle/viewmodel/compose/serialization/serializers/MutableStateSerializerTest.android.kt
- A
lifecycle/lifecycle-viewmodel-compose/src/commonMain/kotlin/androidx/lifecycle/viewmodel/compose/serialization/serializers/MutableStateSerializer.kt
Hash: d628386123647d7f90b6efb2ddde93621c7cc7db
Date: Fri Jan 17 11:18:40 2025
se...@google.com <se...@google.com>
se...@google.com <se...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Move KMP compatible test dependencies to commonTest
Expand for full commit details
Move KMP compatible test dependencies to `commonTest`
Test: N/A
Bug: 378895074
Change-Id: I77d03d1da41808e03d5e2978b768dc3ef6649211
Files:
- M
lifecycle/lifecycle-viewmodel-compose/build.gradle
Hash: e266fa197c54fe55955b2de9acc1c1d9894e6376
Date: Fri Jan 17 14:25:48 2025
se...@google.com <se...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Move MutableStateSerializer
to savedstate-compose
Expand for full commit details
Move `MutableStateSerializer` to `savedstate-compose`
- This change moves `MutableStateSerializer` from `lifecycle-viewmodel-compose` to `savedstate-compose`. This corrects its previous misplacement and aligns with the design outlined in go/savedstate-compose, which specifies that all `savedstate-compose` related APIs should reside within the `savedstate-compose` module.
RelNote: "Move `MutableStateSerializer` to `savedstate-compose`."
Test: MutableStateSerializerTest
Bug: 378895074
Change-Id: I4f690e41dc5619d185784409170943abeb0f0550
Files:
- M
lifecycle/lifecycle-viewmodel-compose/api/current.txt
- M
lifecycle/lifecycle-viewmodel-compose/api/restricted_current.txt
- M
savedstate/savedstate-compose/api/current.txt
- M
savedstate/savedstate-compose/api/restricted_current.txt
- M
savedstate/savedstate-compose/src/androidInstrumentedTest/kotlin/androidx/savedstate/compose/serialization/serializers/MutableStateSerializerTest.android.kt
- M
savedstate/savedstate-compose/src/commonMain/kotlin/androidx/savedstate/compose/serialization/serializers/MutableStateSerializer.kt
Hash: f845eabb6c5e3b138059839e59f383f70304d792
Date: Wed Jan 29 11:31:04 2025
se...@google.com <se...@google.com>
mo...@gmail.com <mo...@gmail.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.lifecycle:lifecycle-viewmodel-compose:2.9.0-alpha10
androidx.lifecycle:lifecycle-viewmodel-compose-android:2.9.0-alpha10
androidx.lifecycle:lifecycle-viewmodel-compose-desktop:2.9.0-alpha10
androidx.savedstate:savedstate-compose:1.3.0-alpha08
androidx.savedstate:savedstate-compose-android:1.3.0-alpha08
androidx.savedstate:savedstate-compose-jvmstubs:1.3.0-alpha08
androidx.savedstate:savedstate-compose-linuxx64stubs:1.3.0-alpha08
se...@google.com <se...@google.com> #7
That issue is a little bit different
We don't do any draw time istantiation of font axes.
You can get the behavior you expect by defining multiple instances of the font. One for each font weight that you want to support. You can put them in a FontFamily, and then matching is done by (FontWeight, Style)
se...@google.com <se...@google.com>
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
Author: Sean McQuillan <
Link:
Don't allow Paint to cache variation settings of resource fonts
Expand for full commit details
Don't allow Paint to cache variation settings of resource fonts
Prev: Loading two resource fonts with the same variation settings would cause the variation settings to not be applied to the second font.
New: Paint cache is invalidated during font load path.
Fixes: b/372044241
Test: manual of variable font demo
Relnote: "Resource fonts with the same variation settings will now avoid over-caching causing the incorrect variation settings to be applied."
Change-Id: If3dff4ea44e33b1ed80bc7fb5057923a088f1678
Files:
- M
compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/PlatformTypefaces.android.kt
Hash: 8ad5f10469c5a044be4fd8a90fc19c5614f61734
Date: Tue Oct 15 16:25:26 2024
pr...@google.com <pr...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui-text:1.8.0-alpha08
androidx.compose.ui:ui-text-android:1.8.0-alpha08
androidx.compose.ui:ui-text-jvmstubs:1.8.0-alpha08
androidx.compose.ui:ui-text-linuxx64stubs:1.8.0-alpha08
Description
- Jetpack Compose component used: FontVariation
- Android Studio Build: Build #AI-241.18034.62.2412.12266719, built on August 23, 2024
- Kotlin version: 1.9.0, 2.0.20
- Devices/Android versions reproduced on: Pixel 8 Pro API 35 emulator
- Keyboard (i.e. Gboard, Samsung, etc): Gboard
- Sample project to trigger the issue:
A screen recording was attached.
Description of the minimal example:
I'm using two variable fonts: Azeret Mono and Roboto Mono.
For each font I created a map containing 4 different font weights(100, 200, 300, 400). I'm persisting this weight info along with the font index in a DataStore.
Using a slider and a menu I'm changing the style of a Text.
Observed behavior:
- negative case:
When I open the app and change the font from Azeret(200) to Roboto(200) the displayed style is Roboto(400) instead. Similar behavior can be observed with other configurations too.
- positive case:
When I open the app and play around with the slider first and then change the font, everything looks fine.