-
Notifications
You must be signed in to change notification settings - Fork 21
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
Open
ianthetechie
wants to merge
16
commits into
main
Choose a base branch
from
route-overview-android
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 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 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
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.