Handled back gesture

This commit is contained in:
himalia416
2025-08-11 15:42:30 +02:00
committed by Himali Aryal
parent a65f2a1aca
commit b6ec8c7e64

View File

@@ -1,5 +1,6 @@
package no.nordicsemi.android.toolbox.profile
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.WindowInsets
@@ -62,6 +63,10 @@ internal fun ProfileScreen() {
val onClickEvent: (ConnectionEvent) -> Unit = { event ->
profileViewModel.onConnectionEvent(event)
}
// Handle back press to navigate up.
BackHandler {
onClickEvent(ConnectionEvent.NavigateUp)
}
Scaffold(
contentWindowInsets = WindowInsets.displayCutout