Status Update
Comments
al...@google.com <al...@google.com>
gs...@gmail.com <gs...@gmail.com> #2
The issue is reproducible with core-ktx 1.2.0 and 1.3.0-rc01.
gs...@gmail.com <gs...@gmail.com> #3
The Typeface.weight is not a weight of the underlying font file. It is a display style. On older APIs, the display style is adjusted if the Typeface is created from single font. However, after moving to CustomFallbackBuilder, that adjustment is removed since it can crate Typeface from multiple style font files.
Looks like it is good to set display style by ResourcesCompat.getFont for backward compatibility.
[Deleted User] <[Deleted User]> #4
Hi Nona,
Can you please schedule a release after you merge the fix?
ca...@google.com <ca...@google.com> #5
Branch: androidx-master-dev
commit 3d6aa2e9b3243dcc4de1f54bd8d40339bd69cb05
Author: Seigo Nonaka <nona@google.com>
Date: Wed May 27 17:38:05 2020
Adjust the Typeface display style with the style of given font
This behavir is implicitly done by Typeface.Builder and
Typeface.createXXX function but not to be done by
Typeface.CustomFallbackBuilder since it is designed to be working
with multiple font files which has different style.
Looks like the style argument is ignored on older API implementation.
Bug: 156853883
Bug: 152023266
Test: ResourcesCompatTest#testGetFont_adjustDisplayStyle passes on 29
Test: ./gradlew core:core:connectedAndroidTest on API 29, 28, 23
Change-Id: I3a377c339a7aed50973cf11df86ddf0069f4ec25
A core/core/src/androidTest/assets/fonts/thin_italic.ttf
A core/core/src/androidTest/assets/fonts/thin_italic.ttx
M core/core/src/androidTest/java/androidx/core/content/res/ResourcesCompatTest.java
A core/core/src/androidTest/res/font/thin_italic.ttf
M core/core/src/main/java/androidx/core/graphics/TypefaceCompatApi29Impl.java
[Deleted User] <[Deleted User]> #7
Any way I can tell what version this will land in?
ca...@google.com <ca...@google.com>
[Deleted User] <[Deleted User]> #9
Great—works as expected, thanks!
ca...@google.com <ca...@google.com> #10
This should be in 1.7.0-beta02.
ap...@google.com <ap...@google.com> #11
Branch: androidx-main
commit 81f994d8759b8a374d8fb2db1032306c614749dc
Author: Alex Vanyo <vanyo@google.com>
Date: Thu Jan 27 01:28:23 2022
Set system bar appearance flags on API 30 anyway
android:windowLightStatusBar=true and the only interaction was calling
WindowInsetsControllerCompat.isAppearanceLightStatusBars=false
Additionally, the navigation bars scrim wasn't updating properly on API
30, even though the icons were changing.
As an update for both of these, on API 30 we set the corresponding
systemUiVisibility flags anyway, in addition to calling through to the
platform WindowInsetsController.
Fixes: 215832843,180881870
Test: manual + flag test updates
Change-Id: I654496f7701f342eec8fd0e18e4bd353dd4fb2bc
M core/core/src/androidTest/java/androidx/core/view/WindowInsetsControllerCompatActivityTest.kt
M core/core/src/main/java/androidx/core/view/WindowInsetsControllerCompat.java
sa...@gmail.com <sa...@gmail.com> #12
va...@google.com <va...@google.com> #13
The fix in #11 was first released in 1.8.0-alpha04
, and will be in future releases as well.
sa...@gmail.com <sa...@gmail.com> #14
```
Caused by java.lang.NullPointerException: Attempt to read from field 'int android.view.WindowManager$LayoutParams.flags' on a null object reference
at androidx.core.view.WindowInsetsControllerCompat$Impl20.unsetWindowFlag(WindowInsetsControllerCompat.java:511)
at androidx.core.view.WindowInsetsControllerCompat$Impl26.setAppearanceLightNavigationBars(WindowInsetsControllerCompat.java:597)
at androidx.core.view.WindowInsetsControllerCompat.setAppearanceLightNavigationBars(WindowInsetsControllerCompat.java:226)
```
On androids 10,9,8
Might it by any chance be already fixed in `1.8.0-alpha06`?
va...@google.com <va...@google.com> #15
Correct, based on the stacktrace that crash should no longer occur on 1.8.0-alpha06
. Have you had a chance to try out 1.8.0-alpha06
and see if it still occurs?
sa...@gmail.com <sa...@gmail.com> #16
va...@google.com <va...@google.com> #17
Glad to hear it!
Description
Component used: androidx.appcompat:appcompat
Version used: 1.3.0-beta01
Devices/Android versions reproduced on: Pixel 5 API 30, Emulator Pixel 4 API 30
If this is a bug in the library, we would appreciate if you could attach:
windowLightStatusBar=false
without issues, and a demo withwindowLightStatusBar=true
showing the issue.The code in the sample project: