Package-level declarations

Types

Link copied to clipboard

The host fragment for the first screen in the MVVM with Compose and Navigation demo. Loads the image cargo and navigates to SecondActivity via the Navigation component, using com.grarcht.shuttle.framework.addons.navigation.navigateWithShuttle for safe transport or a standard navigation action to demonstrate the crash scenario.

Link copied to clipboard

The entry point activity for the MVVM with Compose and Navigation demo. Hosts the Navigation component graph with FirstFragment as the start destination, and cleans up all Shuttle cargo using a standalone coroutine scope on destroy so the cleanup is not cancelled by the activity lifecycle scope.

Link copied to clipboard

The destination activity for the second screen in the MVVM with Compose and Navigation demo. Hosts a secondary Navigation component graph with SecondFragment as the start destination, passing the incoming android.content.Intent extras as navigation arguments.

Link copied to clipboard

The host fragment for the second screen in the MVVM with Compose and Navigation demo. Extracts the cargo ID from the saved instance state or navigation arguments and passes it to the SecondScreen composable for cargo pickup. Instance state is preserved through Shuttle on configuration change.

Functions

Link copied to clipboard
fun FirstScreen(viewModel: FirstViewModel, onNavigateWithShuttle: () -> Unit, onNavigateNormally: () -> Unit)

Renders the first screen layout for the MVVM with Compose and Navigation demo. Navigation buttons are enabled when the image is loaded, and each button delegates to the provided navigation callbacks so the host fragment retains control of the Navigation component.

Link copied to clipboard
fun SecondScreen(viewModel: SecondViewModel, shuttle: Shuttle, cargoId: String)

Renders the second screen for the MVVM with Compose and Navigation demo. Triggers cargo pickup via SecondViewModel when cargoId is non-empty, and displays the retrieved image or an error state accordingly.