Edge-to-edge display for #Android15 Source link
Here’s how the UI of an app using edge-to-edge can go wrong because of a cutout: Among other issues, this app’s cutout overlaps the list content. This is why it is important to test how your UI reacts to different types of cutouts through your Compose Preview. In the Preview picker, under the Hardware section, […]
We can use the window inset listener so that all list items, including the last list item, are padded above the navigation bar. Figure 12. App has handled insets, but feels less immersive because content does not scroll behind system bars. // Figure 12ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.recycler_view)) { v, insets ->val innerPadding = insets.getInsets(// Notice we’re using systemBars, […]