fix #7737 (my location icon in navigation screen)
This commit is contained in:
parent
3519ff0a57
commit
c4eceebe1e
1 changed files with 5 additions and 3 deletions
|
@ -1703,10 +1703,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