Closed Zeng1998 closed 1 month ago
I see obvious flashing when open the dialog. The image is initially stretched to "fillmaxsize" and then instantly shrink to the appropriate size.
When I use asyncimage instead of image, the flashing disappears, but the zoom in/out operation is not possible.
BasicAlertDialog( modifier = Modifier.fillMaxSize(), properties = DialogProperties(usePlatformDefaultWidth = false), onDismissRequest = { isGalleryMode = false } ) { Box(modifier = Modifier.fillMaxSize()) { ZoomableView( modifier = Modifier .padding(16.dp) .fillMaxSize(), state = state, ) { AsyncImage( modifier = Modifier .fillMaxSize() .rotate(rotation), model = imageItems[currentImageIndex], contentDescription = null, ) // Image( // modifier = Modifier // .fillMaxSize() // .rotate(rotation), // painter = painter, // contentDescription = null // ) } } }
https://github.com/user-attachments/assets/34e757cf-6cbc-4a0d-afed-66fffd2e51ef
I realize that it seems to be caused by the Image's contentScale (ContentScale.Fit) .
Have you resolved this issue yet?
I see obvious flashing when open the dialog. The image is initially stretched to "fillmaxsize" and then instantly shrink to the appropriate size.
When I use asyncimage instead of image, the flashing disappears, but the zoom in/out operation is not possible.
https://github.com/user-attachments/assets/34e757cf-6cbc-4a0d-afed-66fffd2e51ef