70 |
if (station.getStatus().length() > 0 || station.getNote().length() > 0) { |
if (station.getStatus().length() > 0 || station.getNote().length() > 0) { |
71 |
ImageView image = (ImageView) root.findViewById(R.id.InfoIcon); |
ImageView image = (ImageView) root.findViewById(R.id.InfoIcon); |
72 |
|
|
73 |
|
String status = station.getStatus().toLowerCase(); |
74 |
|
String note = station.getNote().toLowerCase(); |
75 |
|
|
76 |
int iconID; |
int iconID; |
77 |
if (station.getStatus().toLowerCase().indexOf("aflyst") > -1 || |
if (status.indexOf("aflyst") > -1 || note.indexOf("aflyst") > -1 ) { |
|
station.getNote().toLowerCase().indexOf("aflyst") > -1 ) { |
|
78 |
iconID = R.drawable.warn20; |
iconID = R.drawable.warn20; |
79 |
|
} else if (note.indexOf("kører kun til") > -1 || note.indexOf("afgår fra") > -1) { //If these strings are present, the train only covers part of the line |
80 |
|
iconID = R.drawable.warnyellow20; |
81 |
} else { |
} else { |
82 |
iconID = R.drawable.info20; |
iconID = R.drawable.info20; |
83 |
} |
} |