https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

Armond Avanes

03/12/2024, 9:08 PM
Is there any plan to support edge-to-edge on iOS and Android platforms under Compose Multiplatform? Or if there is any existing implementation/library, I'd like to know about it.
c

Casey Brooks

03/12/2024, 9:11 PM
WindowInsets are already implemented in Multiplatform Compose. I believe that Compose is edge-to-edge by default unless you use the WindowInsets APIs, or maybe by customizing the usage of the WindowInsets
a

Armond Avanes

03/12/2024, 9:13 PM
On JetPack Compose side (Android), you have to call
enableEdgeToEdge()
in your activity.onCreate() prior to calling
setContent { }
to make it work.
So it's not enabled by default.
c

Casey Brooks

03/12/2024, 9:17 PM
But you also need to make changes to the Manifest for that activity. It can’t be configured directly in Compose, because those are attributes of the Window that holds the Compose UI, not necessarily of the UI drawing itself (which is what Compose does)
a

Armond Avanes

03/12/2024, 9:40 PM
NoActionBar
theme is already setup on Manifest when you create your project through kmp website. So no issues on that side. I just want to know if iOS can be somehow enabled as well or not.
a

Alexander Zhirkevich

03/12/2024, 10:06 PM
Copy code
var body: some View {
        ComposeView()
            .ignoresSafeArea()
    }
1
👍 1
a

Armond Avanes

03/13/2024, 12:35 AM
@Alexander Zhirkevich Thank you. I had comment out
.keyboard
inside
.ignoresSafeArea(.keyboard)
and it worked.
32 Views