-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android route overview #345
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
7e77c8c
Initial checkpoint commit on Android route overview
ianthetechie ce94b79
Apply automatic changes
ianthetechie 794d2de
Minor clean-up; version updates
ianthetechie 5063fc7
Merge branch 'main' into route-overview-android
ianthetechie 060e839
Merge branch 'main' into route-overview-android
ianthetechie 6ab8f7e
Cleanup: by delegation
ianthetechie 584bb74
State -> raw value
ianthetechie 8318660
Move isNavigating into state so we don't have to pass a full viewmode…
ianthetechie bc096e3
Make onMapReadyCallback optional rather than a capturing default closure
ianthetechie 3e99c47
Auto-adjust most insets
ianthetechie dd73e99
Support horizontal padding
ianthetechie 8fc0ce8
Snapshots; hide mute button and move recenter to bottom leading corner
ianthetechie cf15dd8
Refactor; the layering makes sense now!
ianthetechie 742a5ca
Undo experimental change
ianthetechie cee5ffd
Minor tweaks; update macOS CI to Sonoma
ianthetechie aee4461
Switch to iOS 18 simulator for snapshots; update nanopixel-perfect sn…
ianthetechie 6819739
Ditch the view model swapping!
ianthetechie c12f3c8
Apply automatic changes
ianthetechie 6545310
Remove old comments
ianthetechie 06843fe
Fix imports
ianthetechie 1d8d8db
Allow stopping demo VM location updates
ianthetechie df63897
Move view model to AppModule to better reflect a typical DI use case
ianthetechie 5c03f41
Apply automatic changes
ianthetechie cc83bbd
Hide zoom controls as well when showing the recenter button
ianthetechie 28dd2cc
Update snapshots
ianthetechie 9cfff25
Freshen docs
ianthetechie 98effcf
Release prep: bump version
ianthetechie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
jobs: | ||
build: | ||
|
||
runs-on: macos-13 | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: read | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
|
||
jobs: | ||
ios-release: | ||
runs-on: macos-14 | ||
runs-on: macos-15 | ||
|
||
permissions: | ||
contents: write | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ env: | |
|
||
jobs: | ||
build: | ||
runs-on: macos-13 | ||
runs-on: macos-15 | ||
|
||
steps: | ||
- name: Checkout code | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,5 @@ ext { | |
|
||
allprojects { | ||
group = "com.stadiamaps.ferrostar" | ||
version = "0.20.1" | ||
version = "0.21.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...eui/src/main/java/com/stadiamaps/ferrostar/composeui/config/VisualNavigationViewConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.stadiamaps.ferrostar.composeui.config | ||
|
||
import androidx.compose.ui.unit.DpSize | ||
import androidx.compose.ui.unit.dp | ||
|
||
sealed class CameraControlState { | ||
data object Hidden : CameraControlState() | ||
|
||
data class ShowRecenter(val updateCamera: () -> Unit) : CameraControlState() | ||
|
||
data class ShowRouteOverview(val updateCamera: () -> Unit) : CameraControlState() | ||
} | ||
|
||
data class VisualNavigationViewConfig( | ||
var showMute: Boolean = false, | ||
var showZoom: Boolean = false, | ||
var buttonSize: DpSize = DpSize(56.dp, 56.dp) | ||
) { | ||
companion object { | ||
fun Default() = VisualNavigationViewConfig(showMute = true, showZoom = true) | ||
} | ||
} | ||
|
||
/** Enables the mute button in the navigation view. */ | ||
fun VisualNavigationViewConfig.useMuteButton(): VisualNavigationViewConfig { | ||
showMute = true | ||
return this | ||
} | ||
|
||
/** Enables the zoom button in the navigation view. */ | ||
fun VisualNavigationViewConfig.useZoomButton(): VisualNavigationViewConfig { | ||
showZoom = true | ||
return this | ||
} | ||
|
||
/** Changes the size of navigation buttons. */ | ||
fun VisualNavigationViewConfig.buttonSize(size: DpSize): VisualNavigationViewConfig { | ||
buttonSize = size | ||
return this | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was previously an informal constant that was copied everywhere. This at least gives it a place to live, and opens the path for button scaling enhancements if needed.