Remove unnecessary code

This commit is contained in:
misaochan 2016-09-01 17:48:58 +12:00
parent 5b68c1ac1b
commit 73acad88d7
3 changed files with 1 additions and 38 deletions

View file

@ -209,25 +209,6 @@ public class NearbyListFragment extends ListFragment {
public long getItemId(int position) {
return position;
}
/*
@Override
public int getItemCount() {
return placesList == null ? 0 : placesList.size();
}
@Override
public void onItemClick(View view, int position) {
if (!mItemClicked) {
mItemClicked = true;
View heroView = view.findViewById(android.R.id.icon);
DetailActivity.launch(
getActivity(), mAdapter.mAttractionList.get(position).name, heroView);
}
}*/
}
private String formatDistanceBetween(LatLng point1, LatLng point2) {

View file

@ -60,26 +60,10 @@ 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";
break;
case "edu":
image = "https://upload.wikimedia.org/wikipedia/commons/d/d4/Vrt%2C_pogled_na_glavni_ulaz.JPG";
break;
case "landmark":
image = "https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/20150902GrenspaalElst_03.JPG/767px-20150902GrenspaalElst_03.JPG";
break;
default:
image = "https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Point_d_interrogation.jpg/120px-Point_d_interrogation.jpg";
}
places.add(new Place(
name,
type, // list
type, // details
Uri.parse(image),
null,
new LatLng(latitude, longitude)
));

View file

@ -8,7 +8,6 @@ public class Place {
public String name;
public String description;
public String longDescription;
public Uri imageUrl;
public Uri secondaryImageUrl;
public LatLng location;
@ -18,12 +17,11 @@ public class Place {
public Place() {}
public Place(String name, String description, String longDescription, Uri imageUrl,
public Place(String name, String description, String longDescription,
Uri secondaryImageUrl, LatLng location) {
this.name = name;
this.description = description;
this.longDescription = longDescription;
this.imageUrl = imageUrl;
this.secondaryImageUrl = secondaryImageUrl;
this.location = location;
}