Fixed #15: "Unfortunately, Maps Geofavorites keeps stopping" and "Maps Geofavorites keeps stopping"
Caused by null fields returned from web APIs
This commit is contained in:
parent
7efd2a2f8b
commit
a13e601eea
@ -111,8 +111,8 @@ public class GeofavoriteAdapter extends RecyclerView.Adapter<GeofavoriteAdapter.
|
|||||||
holder.tv_category.setText(geofavorite.categoryLetter());
|
holder.tv_category.setText(geofavorite.categoryLetter());
|
||||||
holder.setCategoryColor(
|
holder.setCategoryColor(
|
||||||
geofavorite.categoryColor() == 0 ? context.getColor(R.color.defaultBrand) : geofavorite.categoryColor());
|
geofavorite.categoryColor() == 0 ? context.getColor(R.color.defaultBrand) : geofavorite.categoryColor());
|
||||||
holder.tv_title.setText(Html.fromHtml(geofavorite.getName()));
|
holder.tv_title.setText(Html.fromHtml(geofavorite.getName() == null ? "" : geofavorite.getName()));
|
||||||
holder.tv_content.setText(geofavorite.getComment());
|
holder.tv_content.setText(geofavorite.getComment() == null ? "" : geofavorite.getComment());
|
||||||
holder.tv_date.setText(geofavorite.getLocalDateCreated().format(dateFormatter));
|
holder.tv_date.setText(geofavorite.getLocalDateCreated().format(dateFormatter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user