mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Set default text when no description found
This commit is contained in:
parent
06b93dd7cf
commit
dfe3ff5dfe
1 changed files with 5 additions and 2 deletions
|
|
@ -25,9 +25,12 @@ public class NearbyViewHolder implements ViewHolder<Place> {
|
||||||
public void bindModel(Context context, Place place) {
|
public void bindModel(Context context, Place place) {
|
||||||
// Populate the data into the template view using the data object
|
// Populate the data into the template view using the data object
|
||||||
tvName.setText(place.name);
|
tvName.setText(place.name);
|
||||||
tvDesc.setText(place.description);
|
String description = place.description;
|
||||||
|
if ( description == null || description.isEmpty() || description.equals("?")) {
|
||||||
|
description = "No Description Found";
|
||||||
|
}
|
||||||
|
tvDesc.setText(description);
|
||||||
distance.setText(place.distance);
|
distance.setText(place.distance);
|
||||||
|
|
||||||
icon.setImageResource(ResourceUtils.getDescriptionIcon(place.description));
|
icon.setImageResource(ResourceUtils.getDescriptionIcon(place.description));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue