mapbox / mapbox/mapbox-maps-android
ScaleBar is not correctly aligned when using an End alignment
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 578
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Android OS version: 15 (AP31.240617.015)
- Devices affected: Pixel 7a
- Maps SDK Version: 11.7.0
## Observed behavior and steps to reproduce
When using the ScaleBar (with Compose) with an End alignment (e.g. TopEnd), the ScaleBar is not correctly aligned at the end, because it seems to reserve space to grow at the end.
Using the following configuration:
```
scaleBar = {
ScaleBar(
modifier = Modifier.background(Color.Magenta),
alignment = Alignment.TopEnd,
)
}
```
## Expected behavior
Instead in that case, the ScaleBar should be end aligned and it should grow towards the start as needed.
## Additional links and references

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 reproducing the Compose ScaleBar configuration with Alignment.TopEnd on the affected Android setup, then trace the ScaleBar alignment and sizing behavior. Done means the ScaleBar is aligned to the end edge and grows toward the start without reserving space beyond that edge.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100