public static int getRelativeDirectionIcon(RelativeDirection relDir, Resources resources) {
   if (relDir.equals(RelativeDirection.CIRCLE_CLOCKWISE)) {
     return R.drawable.ic_rotary_clockwise;
   } else if (relDir.equals(RelativeDirection.CIRCLE_COUNTERCLOCKWISE)) {
     return R.drawable.ic_rotary_counterclockwise;
   } else if (relDir.equals(RelativeDirection.CONTINUE)) {
     return R.drawable.ic_continue;
   } else if (relDir.equals(RelativeDirection.DEPART)) {
     return R.drawable.ic_depart;
   } else if (relDir.equals(RelativeDirection.ELEVATOR)) {
     return R.drawable.ic_elevator;
   } else if (relDir.equals(RelativeDirection.HARD_LEFT)) {
     return R.drawable.ic_turn_sharp_left;
   } else if (relDir.equals(RelativeDirection.HARD_RIGHT)) {
     return R.drawable.ic_turn_sharp_right;
   } else if (relDir.equals(RelativeDirection.LEFT)) {
     return R.drawable.ic_turn_left;
   } else if (relDir.equals(RelativeDirection.RIGHT)) {
     return R.drawable.ic_turn_right;
   } else if (relDir.equals(RelativeDirection.SLIGHTLY_LEFT)) {
     return R.drawable.ic_turn_slight_left;
   } else if (relDir.equals(RelativeDirection.SLIGHTLY_RIGHT)) {
     return R.drawable.ic_turn_slight_right;
   } else if (relDir.equals(RelativeDirection.UTURN_LEFT)) {
     return R.drawable.ic_uturn_left;
   } else if (relDir.equals(RelativeDirection.UTURN_RIGHT)) {
     return R.drawable.ic_uturn_right;
   } else {
     Log.d(TAG, "No icon for direction: " + relDir);
     return -1;
   }
 }
 public static String getLocalizedRelativeDir(RelativeDirection relDir, Resources resources) {
   if (relDir != null) {
     if (relDir.equals(RelativeDirection.CIRCLE_CLOCKWISE)) {
       return resources.getString(R.string.step_by_step_non_transit_dir_relative_circle_clockwise);
     } else if (relDir.equals(RelativeDirection.CIRCLE_COUNTERCLOCKWISE)) {
       return resources.getString(
           R.string.step_by_step_non_transit_dir_relative_circle_counterclockwise);
     } else if (relDir.equals(RelativeDirection.CONTINUE)) {
       return resources.getString(R.string.step_by_step_non_transit_dir_relative_continue);
     } else if (relDir.equals(RelativeDirection.DEPART)) {
       return resources.getString(R.string.step_by_step_non_transit_dir_relative_depart);
     } else if (relDir.equals(RelativeDirection.ELEVATOR)) {
       return resources.getString(R.string.step_by_step_non_transit_dir_relative_elevator);
     } else if (relDir.equals(RelativeDirection.HARD_LEFT)) {
       return resources.getString(R.string.step_by_step_non_transit_dir_relative_hard_left);
     } else if (relDir.equals(RelativeDirection.HARD_RIGHT)) {
       return resources.getString(R.string.step_by_step_non_transit_dir_relative_hard_right);
     } else if (relDir.equals(RelativeDirection.LEFT)) {
       return resources.getString(R.string.step_by_step_non_transit_dir_relative_left);
     } else if (relDir.equals(RelativeDirection.RIGHT)) {
       return resources.getString(R.string.step_by_step_non_transit_dir_relative_right);
     } else if (relDir.equals(RelativeDirection.SLIGHTLY_LEFT)) {
       return resources.getString(R.string.step_by_step_non_transit_dir_relative_slightly_left);
     } else if (relDir.equals(RelativeDirection.SLIGHTLY_RIGHT)) {
       return resources.getString(R.string.step_by_step_non_transit_dir_relative_slightly_right);
     } else if (relDir.equals(RelativeDirection.UTURN_LEFT)) {
       return resources.getString(R.string.step_by_step_non_transit_dir_relative_uturn_left);
     } else if (relDir.equals(RelativeDirection.UTURN_RIGHT)) {
       return resources.getString(R.string.step_by_step_non_transit_dir_relative_uturn_right);
     }
   }
   return null;
 }