Update colors
This commit is contained in:
parent
91b7739581
commit
40d44fcc6d
3 changed files with 8 additions and 4 deletions
|
@ -8,6 +8,7 @@ import android.content.res.Resources;
|
|||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Paint.Style;
|
||||
|
@ -37,7 +38,7 @@ public class FavoriteImageDrawable extends Drawable {
|
|||
mgr.getDefaultDisplay().getMetrics(dm);
|
||||
density = dm.density;
|
||||
drawable = getResources().getDrawable(R.drawable.ic_action_fav_dark);
|
||||
bmp = BitmapFactory.decodeResource(getResources(), R.drawable.ic_action_fav_dark);
|
||||
bmp = BitmapFactory.decodeResource(getResources(), R.drawable.ic_action_fav_light);
|
||||
bmpSize = bmp.getWidth();
|
||||
paintOuter = new Paint();
|
||||
paintOuter.setColor(0x88555555);
|
||||
|
@ -49,7 +50,7 @@ public class FavoriteImageDrawable extends Drawable {
|
|||
paintBmp.setDither(true);
|
||||
paintInnerCircle = new Paint();
|
||||
paintInnerCircle.setStyle(Style.FILL_AND_STROKE);
|
||||
paintInnerCircle.setColor(color == 0 ? getResources().getColor(R.color.color_distance) : color);
|
||||
paintInnerCircle.setColor(color == 0 || color == Color.BLACK ? getResources().getColor(R.color.color_distance) : color);
|
||||
paintInnerCircle.setAntiAlias(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,9 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer.I
|
|||
}
|
||||
|
||||
private boolean calculateBelongs(int ex, int ey, int objx, int objy, int radius) {
|
||||
return Math.abs(objx - ex) <= radius && (ey - objy) <= radius / 2 && (objy - ey) <= 3 * radius ;
|
||||
return (Math.abs(objx - ex) <= radius * 2 && Math.abs(objy - ey) <= radius * 2) ;
|
||||
// return Math.abs(objx - ex) <= radius && (ey - objy) <= radius / 2 && (objy - ey) <= 3 * radius ;
|
||||
//return Math.abs(objx - ex) <= radius && (ey - objy) <= radius / 2 && (objy - ey) <= 3 * radius ;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -165,7 +165,8 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
|||
|
||||
|
||||
private boolean calculateBelongs(int ex, int ey, int objx, int objy, int radius) {
|
||||
return Math.abs(objx - ex) <= radius && (ey - objy) <= radius / 2 && (objy - ey) <= 3 * radius ;
|
||||
return (Math.abs(objx - ex) <= radius * 2 && Math.abs(objy - ey) <= radius * 2) ;
|
||||
// return Math.abs(objx - ex) <= radius && (ey - objy) <= radius / 2 && (objy - ey) <= 3 * radius ;
|
||||
}
|
||||
|
||||
public void getWptFromPoint(RotatedTileBox tb, PointF point, List<? super WptPt> res) {
|
||||
|
|
Loading…
Reference in a new issue