From 579723392fe687e76fb3a5d65cf6306c66f9abaa Mon Sep 17 00:00:00 2001 From: Rafael Costa Date: Sat, 15 Jul 2023 11:18:01 +0100 Subject: [PATCH] sample app change --- gradle/libs.versions.toml | 2 +- .../main/java/com/ramcosta/destinations/sample/SampleApp.kt | 3 ++- .../com/ramcosta/destinations/sample/account/AccountScreen.kt | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 80164e0a..cc7bd633 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,7 +6,7 @@ targetSdk = "34" kotlin = "1.8.22" dependencyCheckPluginVersion = "0.47.0" -gradlePluginVersion = "8.2.0-alpha11" +gradlePluginVersion = "8.2.0-alpha12" mavenPublishPluginVersion = "0.25.3" composeViewModel = "2.6.1" diff --git a/sample/src/main/java/com/ramcosta/destinations/sample/SampleApp.kt b/sample/src/main/java/com/ramcosta/destinations/sample/SampleApp.kt index 8c82d32d..bbfd174c 100644 --- a/sample/src/main/java/com/ramcosta/destinations/sample/SampleApp.kt +++ b/sample/src/main/java/com/ramcosta/destinations/sample/SampleApp.kt @@ -1,6 +1,7 @@ package com.ramcosta.destinations.sample import androidx.compose.animation.ExperimentalAnimationApi +import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState @@ -46,7 +47,7 @@ fun SampleApp() { engine = engine, navController = navController, navGraph = NavGraphs.root, - modifier = Modifier.padding(it), + modifier = Modifier.padding(it).fillMaxSize(), startRoute = startRoute ) diff --git a/sample/src/main/java/com/ramcosta/destinations/sample/account/AccountScreen.kt b/sample/src/main/java/com/ramcosta/destinations/sample/account/AccountScreen.kt index 614a7977..5c735aec 100644 --- a/sample/src/main/java/com/ramcosta/destinations/sample/account/AccountScreen.kt +++ b/sample/src/main/java/com/ramcosta/destinations/sample/account/AccountScreen.kt @@ -1,8 +1,10 @@ package com.ramcosta.destinations.sample.account +import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.material.Button import androidx.compose.material.Text import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier import com.ramcosta.composedestinations.annotation.Destination import com.ramcosta.destinations.sample.core.viewmodel.viewModel @@ -12,7 +14,7 @@ fun AccountScreen( vm: AccountViewModel = viewModel(), ) { - Button(onClick = { vm.onLogoutClick() }) { + Button(onClick = { vm.onLogoutClick() }, modifier = Modifier.wrapContentSize()) { Text("Logout") }