Skip to content

Instantly share code, notes, and snippets.

@dturner
Last active September 13, 2024 14:04
Show Gist options
  • Save dturner/01dc1341ffb417f07a8c1c913bf4d7ae to your computer and use it in GitHub Desktop.
Save dturner/01dc1341ffb417f07a8c1c913bf4d7ae to your computer and use it in GitHub Desktop.
AndroidX Navigation URI parameters
Path parameter Query parameter
Used for required arguments optional arguments
collections (arrays and lists)
Example fields val id: String
val code: Int?
val color: String? = null
val variants: List<String> = emptyList()
Generated URL format /{id}/{code} ?color={color}&variants={variant1}&variants={variant2}
Example URL product/ABC/123 product?color=red&variants=small&variants=medium
@aruh
Copy link

aruh commented Sep 13, 2024

Heyho :)

I noticed that in the Example Fields | Path Parameter cell, there's a <br> tag in the text, that I think should be a visible line break.

@dturner
Copy link
Author

dturner commented Sep 13, 2024

Good spot, thank you! Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment