MVVMFirstView

class MVVMFirstView(context: Context, viewModel: FirstViewModel, shuttle: Shuttle)

The Composable view for the first screen in the MVVM with Compose demo. Observes com.grarcht.shuttle.demo.core.viewmodel.FirstViewModel to enable navigation buttons when the image cargo is loaded, and initiates navigation to MVVMSecondViewActivity either via com.grarcht.shuttle.framework.Shuttle or directly through an android.content.Intent to demonstrate the crash scenario.

Parameters

context

the context used to access resources and start activities.

viewModel

the view model that loads the image and exposes the UI state.

shuttle

the Shuttle instance used for safe cargo transport.

Constructors

Link copied to clipboard
constructor(context: Context, viewModel: FirstViewModel, shuttle: Shuttle)

Functions

Link copied to clipboard

Cleans up all cargo delivered by Shuttle from the warehouse. Call this when the view is no longer needed, such as in android.app.Activity.onDestroy.

Link copied to clipboard

Renders the first screen layout with navigation cards and a preview animation overlay.