Fix getColor api 16

This commit is contained in:
Dima-1 2020-01-22 17:53:15 +02:00
parent 2b1bfa9ce3
commit e6e841f619

View file

@ -3,6 +3,7 @@ package net.osmand.plus;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import net.osmand.GPXUtilities;
@ -298,7 +299,7 @@ public class FavouritesDbHelper {
if (!p.getName().equals("")) {
p.setVisible(group.visible);
if (FavouritePoint.SpecialPointType.PARKING.equals(p.getSpecialPointType())) {
p.setColor(context.getColor(R.color.map_widget_blue));
p.setColor(ContextCompat.getColor(context, R.color.map_widget_blue));
} else {
p.setColor(group.color);
}
@ -436,7 +437,7 @@ public class FavouritesDbHelper {
FavoriteGroup pg = getOrCreateGroup(p, 0);
p.setVisible(pg.visible);
if (FavouritePoint.SpecialPointType.PARKING.equals(p.getSpecialPointType())) {
p.setColor(context.getColor(R.color.map_widget_blue));
p.setColor(ContextCompat.getColor(context, R.color.map_widget_blue));
} else {
p.setColor(pg.color);
}