Skip to content

Commit

Permalink
Merge pull request #1148 from leinardi/issue-972
Browse files Browse the repository at this point in the history
[Navigation] Fix overlapping elements in Sample Bottom Sheets layout
  • Loading branch information
bentrengrove committed Jul 10, 2022
2 parents dfbbe33 + f31aebd commit dc1042e
Showing 1 changed file with 9 additions and 7 deletions.
Expand Up @@ -21,6 +21,7 @@ import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.Button
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
Expand All @@ -29,7 +30,6 @@ import androidx.compose.ui.Modifier
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import androidx.navigation.plusAssign
import com.google.accompanist.navigation.material.ExperimentalMaterialNavigationApi
import com.google.accompanist.navigation.material.ModalBottomSheetLayout
import com.google.accompanist.navigation.material.bottomSheet
Expand Down Expand Up @@ -101,11 +101,13 @@ private fun HomeScreen(showSheet: () -> Unit, showFeed: () -> Unit) {

@Composable
private fun BottomSheet(showFeed: () -> Unit, showAnotherSheet: () -> Unit, arg: String) {
Text("Sheet with arg: $arg")
Button(onClick = showFeed) {
Text("Click me to navigate!")
}
Button(onClick = showAnotherSheet) {
Text("Click me to show another sheet!")
Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) {
Text("Sheet with arg: $arg")
Button(onClick = showFeed) {
Text("Click me to navigate!")
}
Button(onClick = showAnotherSheet) {
Text("Click me to show another sheet!")
}
}
}

0 comments on commit dc1042e

Please sign in to comment.