Add image conditional for landmark and city

This commit is contained in:
misaochan 2016-08-29 20:04:33 +12:00
parent e75c7fc5e8
commit 186d6ed87d
4 changed files with 11 additions and 1 deletions

View file

@ -148,7 +148,16 @@ public class NearbyListFragment extends ListFragment {
//TODO: Check for description type and set Drawable image here
//Types of desc: landmark, city, event, mountain, isle
icon.setImageResource(R.drawable.icon_landmark);
switch(place.description) {
case "landmark":
icon.setImageResource(R.drawable.icon_landmark);
break;
case "city":
icon.setImageResource(R.drawable.icon_city);
break;
default:
icon.setImageResource(R.drawable.empty_photo);
}
// Return the completed view to render on screen
return convertView;

View file

@ -64,6 +64,7 @@ public class NearbyPlaces {
String type = fields[3];
String image;
//TODO: remove this
switch(type) {
case "event":
image = "https://upload.wikimedia.org/wikipedia/commons/c/ca/Anarchist_attack_on_the_King_of_Spain_Alfonso_XIII_%281906%29.jpg";

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After