Insert TODO's commtents for the "direction arrows are wrong for rotated display" bug
This commit is contained in:
parent
659e17cbfa
commit
506e4d18bf
3 changed files with 13 additions and 0 deletions
|
@ -777,7 +777,12 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
|||
DirectionDrawable draw = new DirectionDrawable(SearchPOIActivity.this, width, height, false);
|
||||
Float h = heading;
|
||||
float a = h != null ? h : 0;
|
||||
|
||||
//TODO: Hardy: The arrow direction below is correct only for the default display's standard orientation
|
||||
// i.e. still needs to be corrected for .ROTATION_90/180/170
|
||||
// Keep in mind: getRotation was introduced from Android 2.2
|
||||
draw.setAngle(mes[1] - a + 180);
|
||||
|
||||
draw.setOpenedColor(opened);
|
||||
direction.setImageDrawable(draw);
|
||||
} else {
|
||||
|
|
|
@ -175,7 +175,12 @@ public class DashFavoritesFragment extends DashBaseFragment {
|
|||
DirectionDrawable draw = new DirectionDrawable(getActivity(), 10, 10, true);
|
||||
Float h = heading;
|
||||
float a = h != null ? h : 0;
|
||||
|
||||
//TODO: Hardy: The arrow direction below is correct only for the default display's standard orientation
|
||||
// i.e. still needs to be corrected for .ROTATION_90/180/170
|
||||
// Keep in mind: getRotation was introduced from Android 2.2
|
||||
draw.setAngle(mes[1] - a + 180);
|
||||
|
||||
direction.setImageDrawable(draw);
|
||||
}
|
||||
|
||||
|
|
|
@ -1257,6 +1257,9 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
|||
float[] mes = new float[2];
|
||||
net.osmand.Location.distanceBetween(location.getLatitude(), location.getLongitude(),
|
||||
mapLocation.getLatitude(), mapLocation.getLongitude(), mes);
|
||||
//TODO: Hardy: Check: The arrow direction below may only be correct for the default display's standard orientation
|
||||
// i.e. still needs to be corrected for .ROTATION_90/180/170
|
||||
// Keep in mind: getRotation was introduced from Android 2.2
|
||||
draw.setAngle(mes[1] - lastCompass + 180);
|
||||
long now = System.currentTimeMillis();
|
||||
final boolean recent = Math.abs( now - location.getTime() ) < RECENT_THRESHOLD;
|
||||
|
|
Loading…
Reference in a new issue