REDI-93: host the Views list in the Compose NavHost (Compose<->View interop)
:app now owns the cross-toolkit interop. MainActivity becomes a FragmentActivity and hosts CharacterListFragment inside the Compose NavHost via AndroidFragment at a new @Serializable CharactersViewsRoute (defined in :app, since :app owns interop — the Views module stays nav-agnostic). The overflow menu's 'Open as Views' / 'About' entries and the Views item-click -> detail navigation are all injected as callbacks, keeping the renderers decoupled. Assemble aboutPresentationModule in Koin; add androidx.fragment:fragment-compose. The Material3 Activity theme styles both toolkits.
This commit is contained in:
@@ -2,6 +2,8 @@ plugins {
|
||||
alias(libs.plugins.architecture.android.application)
|
||||
alias(libs.plugins.architecture.compose)
|
||||
alias(libs.plugins.architecture.koin)
|
||||
// For the @Serializable CharactersViewsRoute (Compose↔View interop destination).
|
||||
alias(libs.plugins.architecture.kotlinx.serialization)
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -16,16 +18,23 @@ dependencies {
|
||||
implementation(project(":core:data"))
|
||||
implementation(project(":core:design-system"))
|
||||
|
||||
// Characters feature: data + presentation (Koin modules) + Compose renderer (nav graph).
|
||||
// Characters feature: data + presentation (Koin modules) + both renderers (Compose nav graph,
|
||||
// Views Fragment hosted via interop).
|
||||
implementation(project(":feature:characters:data"))
|
||||
implementation(project(":feature:characters:presentation"))
|
||||
implementation(project(":feature:characters:presentation-compose"))
|
||||
implementation(project(":feature:characters:presentation-views"))
|
||||
|
||||
// About feature (MVVM contrast).
|
||||
implementation(project(":feature:about:presentation"))
|
||||
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.activity.compose)
|
||||
implementation(libs.androidx.lifecycle.runtime.ktx)
|
||||
implementation(libs.bundles.lifecycle.compose)
|
||||
implementation(libs.androidx.navigation.compose)
|
||||
// Compose↔View interop: hosts a Fragment inside the Compose NavHost.
|
||||
implementation(libs.androidx.fragment.compose)
|
||||
// Material Components — required for the Material3 XML Activity theme.
|
||||
implementation(libs.material)
|
||||
// Logging — the DebugTree is planted here; other modules log via Timber's static API.
|
||||
|
||||
Reference in New Issue
Block a user