Hello, I have an issue with a dialog on Android 15...
# android
n
Hello, I have an issue with a dialog on Android 15. I have a Dialog with
usePlatformDefaultWidth = false
, I add a
LazyColumn
in this dialog ; No issue below Android 15 (< api 35), but on this version the Dialog is out of the screen at the bottom. I know that there is the edge-to-edge system, it's surely linked but I add system paddings on my container
Copy code
MaterialTheme(
        colorScheme = colorScheme,
        typography = MontSerrat
    ) {
        Box(
            Modifier
                .fillMaxSize()
                .background(MaterialTheme.colorScheme.primary)
                .statusBarsPadding()
                .background(MaterialTheme.colorScheme.background)
                .navigationBarsPadding()
        ) {
            content()
        }
    }
so I tried to set the height manually
Copy code
val configuration = LocalConfiguration.current
 val screenHeight = configuration.screenHeightDp

    Dialog(
        onDismissRequest = { /**Nothing**/ },
        properties = DialogProperties(
            dismissOnBackPress = false,
            dismissOnClickOutside = false,
            decorFitsSystemWindows = false,
            usePlatformDefaultWidth = false
        )
    ) {
        BoxWithConstraints(
            Modifier
                .fillMaxWidth()
                .height(screenHeight.dp)
                .background(TransparentBlack)
                .padding(20.dp)
        ) {
            LazyColumn(
                modifier = Modifier
                    .fillMaxWidth()
                    .height(maxHeight)
                    .align(Alignment.TopCenter)
                    .background(LightGrey, shape = RoundedCornerShape(20.dp))
                    .padding(20.dp)
            ) {
                [...]
            }
        }
    }
it doesn't work I found a "solution" but I don't like it at all : I added a big padding on the
LazyColumn
Copy code
LazyColumn(
        modifier = Modifier
             .fillMaxWidth()
             .height(maxHeight - if(isApi35) 60.dp else 0.dp )
              .align(Alignment.TopCenter)
              .background(LightGrey, shape = RoundedCornerShape(20.dp))
              .padding(20.dp)
 )
Is there a better way to handle this ?
🧵 3
👍 1