Status Update
Comments
an...@nrk.no <an...@nrk.no> #2
Same happens for other alignments as well, for instance bottom- or end-alignment. This is a blocker for us and we cannot update to Compose 1.4.
dj...@gmail.com <dj...@gmail.com> #3
experiencing same issue on any alignment, happened after upgraded to compose 1.4
ch...@google.com <ch...@google.com>
de...@gmail.com <de...@gmail.com> #4
Dealing with the same issues. A workaround for this is to wrap the AndroidView inside of a compose view ie:
Box() {
// Some UI code
Box(modifier = Modifier.Align(Alignment.BottomCenter)) {
AndroidView()
}
Box() {
// Some UI code
Box(modifier = Modifier.Align(Alignment.BottomCenter)) {
AndroidView()
}
Description
Jetpack Compose component(s) used: AndroidView
Android Studio Build:
Android Studio Flamingo | 2022.2.1 Beta 5
Build #AI-222.4459.24.2221.9682058, built on March 3, 2023
Runtime version: 17.0.6+0-b2043.56-9586694 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 12
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.instant.shutdown=false
gradle.version.catalogs.dynamic.support=true
ide.images.show.chessboard=true
Non-Bundled Plugins:
com.intellij.plugins.xwinkeymap (211.4961.30)
Kotlin version:
1.8.10
Steps to Reproduce or Code Sample to Reproduce:
1.With implementation(platform("androidx.compose:compose-bom:2023.03.00"))
2.Add an AndroidView composable inside Box composable
3.On the AndroidView composable set modifier = Modifier.align(Alignment.Center)
4.The AndroidView composable does not center
5.Revert to implementation(platform("androidx.compose:compose-bom:2023.01.00"))
6.The AndroidView composable correctly centers
Stack trace (if applicable):
```
<add stack trace here>
```