diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java index 1d2da54faa..67725813e4 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java @@ -178,7 +178,8 @@ public class ContextMenuAdapter { } }); } - if (convertView == null || (layoutId != convertView.getTag())) { + if (convertView == null || !(convertView.getTag() instanceof Integer) + || (layoutId != (Integer)convertView.getTag())) { convertView = LayoutInflater.from(getContext()).inflate(layoutId, parent, false); convertView.setTag(layoutId); } diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java index 25bdf7c39c..ae1eeb2319 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java @@ -630,7 +630,7 @@ public class RouteInfoWidgetsFactory { boolean imminent = false; private Context ctx; private ArrayList paths = new ArrayList(); - private Map bitmapCache = new ArrayMap(); + private Map bitmapCache = new HashMap(); private Paint paintBlack; private Path laneStraight; private final Bitmap laneStraightBitmap;