mapbox / mapbox/mapbox-navigation-android
RouteLineResources routeDefaultColor not working
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
Android version: 33
Navigation SDK version: 2.14.2
Steps to trigger behaviour
Change colours in the routeLineResources:
private val routeLineResources: RouteLineResources by lazy {
val grayColorWithAlpha = Color.argb(178, 128, 128, 128)
RouteLineResources.Builder()
.routeLineColorResources(
RouteLineColorResources.Builder()
.routeLowCongestionColor(Color.YELLOW)
.routeCasingColor(Color.RED)
.routeDefaultColor(Color.CYAN)
.routeLowCongestionColor(Color.GREEN)
.routeClosureColor(Color.BLUE)
.routeLineTraveledColor(grayColorWithAlpha)
.routeLineTraveledCasingColor(Color.TRANSPARENT)
.build()
)
.build()
}
Expected behavior
The routeDefaultColor color should change according to the specified color values in the RouteLineResources.
Actual behavior
The line color set by routeDefaultColor remains unchanged. All other colours change. See screenshot below.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing RouteLineResources and RouteLineColorResources.Builder, focusing on how routeDefaultColor is consumed. Reproduce the issue with Android 33 and Navigation SDK 2.14.2; done when the default route line uses the specified color while the other configured colors continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100