Add custom activity type

This commit is contained in:
Dima-1 2021-02-08 18:44:21 +02:00
parent 2efd0cad00
commit 455518decc

View file

@ -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.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));