Fixed
Status Update
Comments
be...@google.com <be...@google.com> #2
Thank you for reporting this issue. We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
ra...@google.com <ra...@google.com> #3
This is a platform issue that was fixed in Android O. You can work around it for now by creating your themes such that attributes only point to @string references rather than inline string data. For example,
<style name="AppCompatTheme" parent="android:...">
<item name="fontFamily">@string/sans_serif</item>
</style>
...
<string name="sans_serif" untranslateable="true">sans-serif</string>
...
We will also implement this workaround as an automatic fix in AAPT2 for a future release.
<style name="AppCompatTheme" parent="android:...">
<item name="fontFamily">@string/sans_serif</item>
</style>
...
<string name="sans_serif" untranslateable="true">sans-serif</string>
...
We will also implement this workaround as an automatic fix in AAPT2 for a future release.
mo...@google.com <mo...@google.com>
ap...@google.com <ap...@google.com> #4
Leaving this open and blocked on AAPT2 workaround.
pr...@google.com <pr...@google.com> #5
Using the latest build-tools version (29.0.0) and this is _still_ not fixed. The stacktraces from the runtime crash give no indication that this is an issue with the fontFamily attribute in styles and was therefore very difficult to debug and solve.
Description
Jetpack Compose component used: AndroidView, Focus
Android Studio Build: uild #AI-233.14808.21.2331.11574862
Kotlin version: Latest
Steps to Reproduce or Code Sample to Reproduce:
1. See cl/690811317 MainActivity.kt
2. Create several buttons under AndroidView. And several buttons outside of AndroidView in compose
3. Add an onKeyEvent on AndroidView that request focus for the buttons in compose.
3. Press the key that set in the onKeyEvent. The focus will move to the next AndroidView button instead of buttons incompose.
Stack trace (if applicable):