Add custom activity type
This commit is contained in:
parent
2efd0cad00
commit
455518decc
1 changed files with 3 additions and 8 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue