Improved accessibility of the map widget showing time to go.
This commit is contained in:
parent
a00ba77ccf
commit
fc8f0dda29
3 changed files with 4 additions and 0 deletions
|
@ -1129,4 +1129,5 @@
|
|||
<string name="item_checked">отмечено</string>
|
||||
<string name="item_unchecked">не отмечено</string>
|
||||
<string name="map_view">Карта</string>
|
||||
<string name="access_arrival_time">Время прибытия</string>
|
||||
</resources>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||
-->
|
||||
<string name="access_arrival_time">Arrival time</string>
|
||||
<string name="item_checked">checked</string>
|
||||
<string name="item_unchecked">unchecked</string>
|
||||
<string name="map_view">Map</string>
|
||||
|
|
|
@ -230,6 +230,7 @@ public class RouteInfoControls {
|
|||
long toFindTime = time * 1000 + System.currentTimeMillis();
|
||||
if (Math.abs(toFindTime - cachedLeftTime) > 30000) {
|
||||
cachedLeftTime = toFindTime;
|
||||
setContentTitle(getContext().getString(R.string.access_arrival_time));
|
||||
if (DateFormat.is24HourFormat(ctx)) {
|
||||
setText(DateFormat.format("k:mm", toFindTime).toString(), null); //$NON-NLS-1$
|
||||
} else {
|
||||
|
@ -243,6 +244,7 @@ public class RouteInfoControls {
|
|||
cachedLeftTime = time;
|
||||
int hours = time / (60 * 60);
|
||||
int minutes = (time / 60) % 60;
|
||||
setContentTitle(getContext().getString(R.string.map_widget_time));
|
||||
setText(String.format("%d:%02d", hours, minutes), null); //$NON-NLS-1$
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue