uneune / robertprojects

Automatically exported from code.google.com/p/robertprojects
0 stars 0 forks source link

Yellow person icon is shifted on low screen device #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. View your location when not moving - yellow person is displayed.

What is the expected output? What do you see instead?
Yellow person is shifted little bit to the left and up and it is not standing 
in the middle of a circle.

What version of the product are you using? On what operating system?
RMaps 0.8.7.3, Andoid 2.2.1, HTC Wildfire

Please provide any additional information below.
HTC Wildfire is low resolution device, so BitmapFactory.decodeResource scales 
the person.png image little bit down. When this image is drawn on the screen by 
the MyLocationOverlay.onDraw() method, it is shifted by constant value 
(PERSON_HOTSPOT). This value is now larger than half the size and the image is 
shifted too much.

Fix:
PERSON_HOTSPOT should not be final and it should be initialized in the 
getPersonIcon() method:
this.PERSON_HOTSPOT=new android.graphics.Point(this.PERSON_ICON2.getWidth()/2, 
this.PERSON_ICON2.getHeight()/2);

In the attachment I send you the corrected file, but I am not a java programmer 
so the code may be incorrect, please check it first.

Thank you.

Original issue reported on code.google.com by jan.simo...@gmail.com on 24 May 2011 at 9:12

Attachments:

GoogleCodeExporter commented 9 years ago
I forgot to mention, that the person.png has to be changed. The person's feet 
has to be in the center of the image :-)

Original comment by jan.simo...@gmail.com on 24 May 2011 at 9:37

Attachments:

GoogleCodeExporter commented 9 years ago
There is small error in the previously posted file. I attach corrected source 
file here. I have also compiled corrected version of RMaps with this file, .apk 
is included (Before installing this version, normal RMaps has to be 
uninstalled).

Original comment by jan.simo...@gmail.com on 30 May 2011 at 2:36

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by RobertK...@gmail.com on 28 Aug 2011 at 8:42