Skip to content

Using edgeToEdge breaks windowSoftInputMode #1025

@Jean-Daniel

Description

@Jean-Daniel

When using edgeToEdge, the view size is no longer adjusting when the keyboard is visible, resulting in buttons hidden behind the keyboard.

Without edgeToEdge call in the main Activity:

Image

With EdgeToEdge call in the main Activity.

Image

Activity

thewyp

thewyp commented on Jan 28, 2025

@thewyp
Jean-Daniel

Jean-Daniel commented on Jan 28, 2025

@Jean-Daniel
Author

Actually, it looks like it is possible to fix that issue by adjusting the main composition padding:

@AndroidEntryPoint
class TodoActivity : ComponentActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContent {
            TodoTheme {
                TodoNavGraph(Modifier.safeDrawingPadding())
            }
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @Jean-Daniel@thewyp

      Issue actions

        Using edgeToEdge breaks windowSoftInputMode · Issue #1025 · android/architecture-samples