Merge pull request #9594 from androiddevkotlin/master

"Mapillary" to "street-level imagery"
This commit is contained in:
Vitaliy 2020-08-10 17:27:09 +03:00 committed by GitHub
commit b9a50f9099
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 8 deletions

View file

@ -11,6 +11,7 @@
Thx - Hardy
-->
<string name="street_level_imagery">Street-level imagery</string>
<string name="rourte_between_points_add_track_desc">Select a track file for which a new segment will be added.</string>
<string name="navigation_profile">Navigation profile</string>
<string name="threshold_distance">Threshold distance</string>

View file

@ -181,7 +181,8 @@ public class MapillaryPlugin extends OsmandPlugin {
}
adapter.addItem(new ContextMenuItem.ItemBuilder()
.setId(MAPILLARY)
.setTitleId(R.string.mapillary, mapActivity)
.setTitleId(R.string.street_level_imagery, mapActivity)
.setDescription("Mapillary")
.setSelected(settings.SHOW_MAPILLARY.get())
.setColor(settings.SHOW_MAPILLARY.get() ? R.color.osmand_orange : ContextMenuItem.INVALID_ID)
.setIcon(R.drawable.ic_action_mapillary)

View file

@ -526,13 +526,9 @@ public class ParkingPositionPlugin extends OsmandPlugin {
}
String getFormattedTime(long timeInMillis) {
Time time = new Time();
time.set(timeInMillis);
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm dd.MM.yyyy", Locale.getDefault());
if (!DateFormat.is24HourFormat(app)) {
sdf = new SimpleDateFormat("hh:mm a dd.MM.yyyy", Locale.getDefault());
}
return sdf.format(new Date(time.toMillis(false)));
java.text.DateFormat dateFormat = DateFormat.getMediumDateFormat(app);
java.text.DateFormat timeFormat = DateFormat.getTimeFormat(app);
return timeFormat.format(timeInMillis) + " " + dateFormat.format(timeInMillis);
}
String getFormattedTimeInterval(long timeInMillis, Activity ctx) {