Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ModelBottomSheet Overlap with NavigationBars Android Compose #1430

Open
4 tasks done
chauhanazad opened this issue Jul 13, 2024 · 1 comment
Open
4 tasks done
Assignees
Labels
bug Something isn't working triage me Issue that needs to be triaged

Comments

@chauhanazad
Copy link

chauhanazad commented Jul 13, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Is there a StackOverflow question about this issue?

  • I have searched StackOverflow

Is this an issue related to one of the samples?

  • Yes, this is a specific issue related to this samples repo.

Sample app

Other (bug not related to sample app)

What happened?

Below is the code, ModalBottomsheet overlap with Navigationbars. I tried adding padding but still same.

ModalBottomSheet(
        onDismissRequest = {
            onDismiss()
        },
        sheetState = bottomSheetState,
        modifier = Modifier.windowInsetsPadding(WindowInsets.navigationBars),
        windowInsets = WindowInsets.ime,
        content = {
            Column(
                modifier = Modifier
                    .fillMaxWidth()
                    .padding(start = 16.dp, end = 16.dp),
                horizontalAlignment = Alignment.CenterHorizontally,
            ) {
                TextField(
                    value = accountName,
                    onValueChange = { accountName = it },
                    placeholder = {
                        Text(
                            text = stringResource(id = R.string.account_name_hint),
                            fontFamily = FontFamily(Font(R.font.opensans_regular))
                        )
                    },
                    textStyle = TextStyle.Default.copy(
                        fontSize = 20.sp,
                        fontFamily = FontFamily(Font(R.font.opensans_medium))
                    ),
                    colors = TextFieldDefaults.colors(
                        unfocusedContainerColor = Color.White,
                        disabledTextColor = Color.Transparent,
                        focusedIndicatorColor = Color.Transparent,
                        unfocusedIndicatorColor = Color.Transparent,
                        disabledIndicatorColor = Color.Transparent
                    ),
                    modifier = Modifier
                        .shadow(shape = RoundedCornerShape(8.dp), elevation = 2.dp)
                        .fillMaxWidth(),
                    isError = accountNameError.value,
                    singleLine = true,

                    )
}
}

Relevant logcat output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@chauhanazad chauhanazad added bug Something isn't working triage me Issue that needs to be triaged labels Jul 13, 2024
@moksh-tehlan
Copy link

moksh-tehlan commented Aug 11, 2024

can u add a screenshot?? and also in which app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage me Issue that needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants