architecture-samples icon indicating copy to clipboard operation
architecture-samples copied to clipboard

Using edgeToEdge breaks windowSoftInputMode

Open Jean-Daniel opened this issue 11 months ago • 2 comments

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

Jean-Daniel avatar Jan 28 '25 16:01 Jean-Daniel

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

thewyp avatar Jan 28 '25 16:01 thewyp

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())
            }
        }
    }
}


Jean-Daniel avatar Jan 28 '25 16:01 Jean-Daniel