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 9 small location icon #1209

Open
JonasDaWi opened this Issue Nov 27, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@JonasDaWi

JonasDaWi commented Nov 27, 2018

Issue Type

[ ] Question
[x] Bug
[ ] Improvement
[ ] Build system related
[ ] Performance
[ ] Documentation

Description and/or steps/code to reproduce the problem

On Android 9, the default location/bearing icon is much smaller than on older Android versions

Environment

Android 9, Pixel & S9+

If it's a bug, version(s) of android this affects:

Android 9

Version of osmdroid the issue relates to:

6.0.3

@monsieurtanuki

This comment has been minimized.

Collaborator

monsieurtanuki commented Nov 28, 2018

I guess it's related to your screen dpi.
I'm not sure which icon you're referring to; do you know the name of the file, or can you post a screenshot?

@JonasDaWi

This comment has been minimized.

JonasDaWi commented Nov 28, 2018

On the same device the icon is much smaller on Android 9 than in Android 8. You can see this in the osmdroid mapviewer sample app (More Samples/Location/Directed Location).

monsieurtanuki added a commit that referenced this issue Nov 28, 2018

bug/#1209 - using a resource for direction icon on each dpi folder
Removed resource:
* `drawable.direction_arrow.png` (only 1 version)

New resource:
* `drawable.round_navigation_white_48.png` (5 versions from `mdpi` to `xxxhdpi`)

Impacted classes:
* `CustomPaintingSurface`, `DirectedLocationOverlay`, `MyLocationNewOverlay`: used drawable `round_navigation_white_48` instead of `direction_arrow`
@monsieurtanuki

This comment has been minimized.

Collaborator

monsieurtanuki commented Nov 28, 2018

I still believe it has to do with dpi, as the direction_arrow icon only had one version: 40x40 pixels.
Just PR'ed (#1212): use of another icon, with a version for each dpi folder.
@JonasDaWi Please tell me if it works.

spyhunter99 added a commit that referenced this issue Dec 6, 2018

bug/#1209 - using a resource for direction icon on each dpi folder (#…
…1212)

Removed resource:
* `drawable.direction_arrow.png` (only 1 version)

New resource:
* `drawable.round_navigation_white_48.png` (5 versions from `mdpi` to `xxxhdpi`)

Impacted classes:
* `CustomPaintingSurface`, `DirectedLocationOverlay`, `MyLocationNewOverlay`: used drawable `round_navigation_white_48` instead of `direction_arrow`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment