-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Compose, Coil, AnimatedNavHost, and Datastore
- Loading branch information
Showing
14 changed files
with
195 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 11 additions & 6 deletions
17
app/src/main/kotlin/io/github/jbarr21/appdialer/ui/AppDialerApp.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
package io.github.jbarr21.appdialer.ui | ||
|
||
import androidx.compose.animation.ExperimentalAnimationApi | ||
import androidx.compose.runtime.Composable | ||
import androidx.hilt.navigation.compose.hiltViewModel | ||
import androidx.navigation.compose.NavHost | ||
import androidx.navigation.compose.composable | ||
import androidx.navigation.compose.rememberNavController | ||
import com.google.accompanist.navigation.animation.AnimatedNavHost | ||
import com.google.accompanist.navigation.animation.composable | ||
import com.google.accompanist.navigation.animation.rememberAnimatedNavController | ||
import io.github.jbarr21.appdialer.ui.info.InfoScreen | ||
import io.github.jbarr21.appdialer.ui.main.MainScreen | ||
import io.github.jbarr21.appdialer.ui.settings.SettingsScreen | ||
|
||
@OptIn(ExperimentalAnimationApi::class) | ||
@Composable | ||
fun AppDialerApp() { | ||
val navController = rememberNavController() | ||
NavHost(navController = navController, startDestination = Screen.Main.toString()) { | ||
val navController = rememberAnimatedNavController() | ||
AnimatedNavHost( | ||
navController = navController, | ||
startDestination = Screen.Main.toString(), | ||
) { | ||
composable(Screen.Main.toString()) { MainScreen(hiltViewModel(), navController) } | ||
composable(Screen.Settings.toString()) { SettingsScreen(hiltViewModel(), navController) } | ||
composable(Screen.Info.toString()) { InfoScreen(hiltViewModel(), navController) } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.