Merge pull request #7990 from osmandapp/fix_7737
fix #7737 (my location icon in navigation screen)
This commit is contained in:
commit
1ae516ab16
1 changed files with 5 additions and 3 deletions
|
@ -1704,10 +1704,12 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
|||
public void updateFromIcon(View parentView) {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
|
||||
int locationIconResByStatus = OsmAndLocationProvider.isLocationPermissionAvailable(mapActivity)
|
||||
? R.drawable.ic_action_location_color : R.drawable.ic_action_location_color_lost;
|
||||
|
||||
if (mapActivity != null) {
|
||||
OsmandApplication app = mapActivity.getMyApplication();
|
||||
Location loc = app.getLocationProvider().getLastKnownLocation();
|
||||
int locationIconResByStatus = OsmAndLocationProvider.isLocationPermissionAvailable(mapActivity) && loc != null
|
||||
? R.drawable.ic_action_location_color : R.drawable.ic_action_location_color_lost;
|
||||
|
||||
((ImageView) parentView.findViewById(R.id.fromIcon)).setImageDrawable(ContextCompat.getDrawable(mapActivity,
|
||||
mapActivity.getMyApplication().getTargetPointsHelper().getPointToStart() == null
|
||||
? locationIconResByStatus : R.drawable.list_startpoint));
|
||||
|
|
Loading…
Reference in a new issue