AdamMc331 / AndroidAppTemplate

This is a template repository with developer tooling already included so you can get up and running with confidence.
286 stars 18 forks source link

Supporting dynamic navigation module #155

Closed AdamMc331 closed 5 months ago

AdamMc331 commented 7 months ago

Current Status

I'm still debating internally about whether or not to include this in the template, and I'm open to community feedback. There are a couple changes I'm still looking to make:

  1. I may rename DynamicNavigation* to AdaptiveNavigation* as I think that's a little more descriptive and a term we're used to.
  2. I may include a sample module/activity/something in addition to the README that shows how to render this setup. Some actual code users can explore in their IDE.

Summary

Adds a new module with a dynamic navigation container, so the users of this template can use that as a root composable, passing in a NavigationType, and get for free an implementation of three different navigation solutions based on window width.

How It Was Tested

Compose previews based on navigation type.

Screenshot/Gif

Dynamic Nav Preview Screenshot 2024-04-10 at 9 16 22 PM
github-actions[bot] commented 7 months ago
1 Warning
:warning: Please consider breaking up this pull request.
2 Messages
:book: Thanks @AdamMc331!
:book:

The following dependencies have later milestone versions:

  • androidx.compose.compiler:compiler [1.5.12 -> 1.5.14]
    https://developer.android.com/jetpack/androidx/releases/compose-compiler#1.5.14
  • com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin [1.9.23-1.0.20 -> 1.9.24-1.0.20]
    https://goo.gle/ksp
  • com.google.devtools.ksp:symbol-processing [1.9.23-1.0.20 -> 1.9.24-1.0.20]
    https://goo.gle/ksp
  • com.google.devtools.ksp:symbol-processing-api [1.9.23-1.0.20 -> 1.9.24-1.0.20]
    https://goo.gle/ksp
  • com.google.devtools.ksp:symbol-processing-cmdline [1.9.23-1.0.20 -> 1.9.24-1.0.20]
    https://goo.gle/ksp
  • org.jetbrains.kotlin:kotlin-gradle-plugin [1.9.23 -> 1.9.24]
    https://kotlinlang.org/
  • org.jetbrains.kotlin:kotlin-stdlib [1.9.23 -> 1.9.24]
    https://kotlinlang.org/

Failed to determine the latest version for the following dependencies (use –info for details):

  • com.google.testing.platform:android-driver-instrumentation
  • com.google.testing.platform:android-test-plugin
  • com.google.testing.platform:core
  • com.google.testing.platform:launcher
  • io.gitlab.arturbosch.detekt:detekt-cli
    1.23.6

Gradle current updates:

  • Gradle: [8.7: UP-TO-DATE]

Generated by :no_entry_sign: Danger

AdamMc331 commented 5 months ago

I think I'll be closing this in favor of the new NavigationSuiteScaffold: https://developer.android.com/develop/ui/compose/layouts/adaptive/build-adaptive-navigation

AdamMc331 commented 5 months ago

Yep, played around with the new NavigationSuiteScaffold and that does almost exactly this (does not have the permanent nav drawer idea).

JK it even has that: https://developer.android.com/develop/ui/compose/layouts/adaptive/build-adaptive-navigation#customize_navigation_types