From 455518decc5632ff10cd5938f9e7ad17342b4fdf Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Mon, 8 Feb 2021 18:44:21 +0200 Subject: [PATCH] Add custom activity type --- .../wikivoyage/explore/travelcards/TravelGpxCard.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelGpxCard.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelGpxCard.java index 119df5a54a..795980df32 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelGpxCard.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelGpxCard.java @@ -48,14 +48,9 @@ public class TravelGpxCard extends BaseTravelCard { holder.userIcon.setImageDrawable(getActiveIcon(R.drawable.ic_action_user_account_16)); holder.user.setText(article.user); RouteActivityType activityType = RouteActivityType.getTypeFromName(article.activityType); - if (activityType != null) { - int iconId = getActivityTypeIcon(activityType); - if (iconId > 0) { - holder.activityTypeIcon.setImageDrawable(getActiveIcon(iconId)); - } - holder.activityType.setText(getActivityTypeTitle(activityType)); - holder.activityTypeLabel.setVisibility(View.VISIBLE); - } + holder.activityTypeIcon.setImageDrawable(getActiveIcon(getActivityTypeIcon(activityType))); + holder.activityType.setText(getActivityTypeTitle(activityType)); + holder.activityTypeLabel.setVisibility(View.VISIBLE); holder.distance.setText(OsmAndFormatter.getFormattedDistance(article.totalDistance, app)); holder.diffElevationUp.setText(OsmAndFormatter.getFormattedAlt(article.diffElevationUp, app)); holder.diffElevationDown.setText(OsmAndFormatter.getFormattedAlt(article.diffElevationDown, app));