Get rid of annoying transitions

This commit is contained in:
Joren 2024-04-29 12:25:01 +02:00
parent 67a89c449c
commit 5ff9afaa87
Signed by untrusted user who does not match committer: Joren
GPG Key ID: 280E33DFBC0F1B55

View File

@ -1,5 +1,7 @@
package com.ti.mobpo.ui package com.ti.mobpo.ui
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
@ -101,14 +103,25 @@ fun Navigation() {
.padding(innerPadding), .padding(innerPadding),
color = MaterialTheme.colorScheme.background, color = MaterialTheme.colorScheme.background,
content = { content = {
NavHost(navController = navController, startDestination = Screen.PokeSearch.route) { NavHost(
composable(route = Screen.PokeSearch.route) { navController = navController,
startDestination = Screen.PokeSearch.route,
enterTransition = {
EnterTransition.None
},
exitTransition = {
ExitTransition.None
}) {
composable(
route = Screen.PokeSearch.route) {
PokeSearch() PokeSearch()
} }
composable(route = Screen.Favourites.route) { composable(
route = Screen.Favourites.route) {
Favourites() Favourites()
} }
composable(route = Screen.Profile.route) { composable(
route = Screen.Profile.route) {
Profile() Profile()
} }
} }