fixing the xml color usage
This commit is contained in:
parent
61f368d817
commit
f85c357704
2 changed files with 4 additions and 7 deletions
|
@ -113,7 +113,7 @@ public class ShowRouteInfoActivity extends OsmandListActivity {
|
|||
ImageView icon = (ImageView) row.findViewById(R.id.direction);
|
||||
|
||||
if(!(icon.getDrawable() instanceof TurnPathHelper.RouteDrawable)){
|
||||
icon.setImageDrawable(new TurnPathHelper.RouteDrawable());
|
||||
icon.setImageDrawable(new TurnPathHelper.RouteDrawable(getResources()));
|
||||
}
|
||||
((TurnPathHelper.RouteDrawable) icon.getDrawable()).setRouteType(model.turnType);
|
||||
distanceLabel.setText(OsmAndFormatter.getFormattedDistance(model.distance, ShowRouteInfoActivity.this));
|
||||
|
|
|
@ -2,8 +2,8 @@ package net.osmand.plus.views;
|
|||
|
||||
import net.osmand.plus.routing.RoutingHelper.TurnType;
|
||||
import net.osmand.plus.R;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Paint;
|
||||
|
@ -190,15 +190,12 @@ public class TurnPathHelper {
|
|||
Path p = new Path();
|
||||
Path dp = new Path();
|
||||
|
||||
public RouteDrawable(){
|
||||
public RouteDrawable(Resources resources){
|
||||
paintRouteDirection = new Paint();
|
||||
paintRouteDirection.setStyle(Style.FILL_AND_STROKE);
|
||||
// colors.xml-Issue
|
||||
//paintRouteDirection.setColor(getResources().getColor(R.color.nav_arrow));
|
||||
paintRouteDirection.setColor(Color.rgb(250, 222, 35));
|
||||
paintRouteDirection.setColor(resources.getColor(R.color.nav_arrow));
|
||||
paintRouteDirection.setAntiAlias(true);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onBoundsChange(Rect bounds) {
|
||||
|
|
Loading…
Reference in a new issue