fix list icon assignment for traffic warnings

This commit is contained in:
sonora 2014-12-20 16:27:56 +01:00
parent 71940b5743
commit 4060c772f7
9 changed files with 32 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -675,9 +675,22 @@ public class WaypointHelper {
//return FavoriteImageDrawable.getOrCreate(uiCtx, point.getColor()); //return FavoriteImageDrawable.getOrCreate(uiCtx, point.getColor());
return 0; return 0;
} else if(type == ALARMS) { } else if(type == ALARMS) {
//TODO: Looks like this does not work yet, not sure why: //assign alarm list icons manually for now
if(RenderingIcons.containsBigIcon("list_" + ((AlarmInfo) point).getType().toString().toLowerCase())) { //attention, some list icons are only temporary test icons, not pixel perfect yet.
return RenderingIcons.getBigIconResourceId("list_" + ((AlarmInfo) point).getType().toString().toLowerCase()); if(((AlarmInfo) point).getType().toString()="SPEED_CAMERA") {
return uiCtx.getResources().getDrawable(R.drawable.mx_highway_speed_camera);
} else if(((AlarmInfo) point).getType().toString()="BORDER_CONTROL") {
return uiCtx.getResources().getDrawable(R.drawable.mx_barrier_border_control);
} else if(((AlarmInfo) point).getType().toString()="RAILWAY") {
return uiCtx.getResources().getDrawable(R.drawable.list_warnings_railways);
} else if(((AlarmInfo) point).getType().toString()="TRAFFIC_CALMING") {
return uiCtx.getResources().getDrawable(R.drawable.list_traffic_calming);
} else if(((AlarmInfo) point).getType().toString()="TOLL_BOOTH") {
return uiCtx.getResources().getDrawable(R.drawable.mx_barrier_toll_booth);
} else if(((AlarmInfo) point).getType().toString()="STOP") {
return uiCtx.getResources().getDrawable(R.drawable.list_stop);
} else if(((AlarmInfo) point).getType().toString()="PEDESTRIAN") {
return uiCtx.getResources().getDrawable(R.drawable.list_warnings_pedestrian);
} else { } else {
return 0; return 0;
} }
@ -706,9 +719,22 @@ public class WaypointHelper {
} else if(type == FAVORITES || type == WAYPOINTS) { } else if(type == FAVORITES || type == WAYPOINTS) {
return FavoriteImageDrawable.getOrCreate(uiCtx, point.getColor()); return FavoriteImageDrawable.getOrCreate(uiCtx, point.getColor());
} else if(type == ALARMS) { } else if(type == ALARMS) {
//TODO: Looks like this does not work yet, not sure why: //assign alarm list icons manually for now
if(RenderingIcons.containsBigIcon("list_" + ((AlarmInfo) point).getType().toString().toLowerCase())) { //attention, some list icons are only temporary test icons, not pixel perfect yet.
return uiCtx.getResources().getDrawable(RenderingIcons.getBigIconResourceId("list_" + ((AlarmInfo) point).getType().toString().toLowerCase())); if(((AlarmInfo) point).getType().toString()="SPEED_CAMERA") {
return uiCtx.getResources().getDrawable(R.drawable.mx_highway_speed_camera);
} else if(((AlarmInfo) point).getType().toString()="BORDER_CONTROL") {
return uiCtx.getResources().getDrawable(R.drawable.mx_barrier_border_control);
} else if(((AlarmInfo) point).getType().toString()="RAILWAY") {
return uiCtx.getResources().getDrawable(R.drawable.list_warnings_railways);
} else if(((AlarmInfo) point).getType().toString()="TRAFFIC_CALMING") {
return uiCtx.getResources().getDrawable(R.drawable.list_traffic_calming);
} else if(((AlarmInfo) point).getType().toString()="TOLL_BOOTH") {
return uiCtx.getResources().getDrawable(R.drawable.mx_barrier_toll_booth);
} else if(((AlarmInfo) point).getType().toString()="STOP") {
return uiCtx.getResources().getDrawable(R.drawable.list_stop);
} else if(((AlarmInfo) point).getType().toString()="PEDESTRIAN") {
return uiCtx.getResources().getDrawable(R.drawable.list_warnings_pedestrian);
} else { } else {
return null; return null;
} }