fix small issues

git-svn-id: https://osmand.googlecode.com/svn/trunk@376 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-07-21 06:41:11 +00:00
parent e1607267f4
commit 3774f9b3cb
7 changed files with 37 additions and 26 deletions

View file

@ -8,20 +8,25 @@ package com.osmand;
*/
public class ToDoConstants {
// TODO ANDROID
// for 0.3
// TODO ANDROID 0.3
// Improvements
// 1. Show layers (?) -
// 0) map 1) transport 2) Poi (choose filter) 3) Favorites 4) Route (gmaps) 5) Transport route ? 6) Traffic ? 7) NameFinder
// 1.4 show detailed route on the map with turns and show route information directly (like in gmaps)
// Improvement : Show layers (?)
// Improvement : Show stops in the transport route on the map
// Improvement : show favorites on the map?
// 2. Using NameFinder to search online
// 3. Show route info after route calc
// 4. show vehicle for calculating route
// Improvement : progress while loading tiles
// Improvement : download with wget or multi downloader
// Improvement : use NameFinder for search POI/address near location
// BUGS
// ISSUE 21.
// ISSUE 23.
// Imrpovement : show vehicle for calculating route
// Improvement : show detailed route on the map with turns and show route information directly (like in gmaps)
// Improvement : show route info after route is calculated (-)
// TODO
// Improvements
// 5. Download with wget
// 6. progress while map is loading
// Not clear if it is really needed
// 69. Add phone information to POI
@ -29,7 +34,7 @@ public class ToDoConstants {
// Unscheduled (complex)
// 66. Transport routing (show next stop, total distance, show stop get out) (?).
// 66. Transport routing (show next stop, total distance, show stop get out, voice) (?).
// 64. Traffic information (?) - rmaps (http://jgo.maps.yandex.net/tiles?l=trf)?
// 65. Intermediate points - for better control routing, to avoid traffic jams ...(?)
// 40. Support simple vector road rendering (require new index file) (?)

View file

@ -106,7 +106,7 @@
<string name="max_level_download_tile">Уровень детализации</string>
<string name="max_level_download_tile_descr">Выберите максимальный уровень для загрузки из интернета</string>
<string name="route_about">О маршруте</string>
<string name="route_general_information">Общая протяженность = {0}, время в пути = \'\'{1}\'\'.</string>
<string name="route_general_information">Общая протяженность = {0}, время в пути = {1} ч. {2} мин.</string>
<string name="router_service_descr">Выберите сервис для прокладки маршрута</string>
<string name="router_service">Прокладка маршрута</string>
<string name="download_sd_dir_not_accessible">Директория на SD карточка не доступна для сохранения</string>

View file

@ -106,7 +106,7 @@
<string name="max_level_download_tile">Max zoom level</string>
<string name="max_level_download_tile_descr">Choose max zoom level to download using internet</string>
<string name="route_about">About route</string>
<string name="route_general_information">Overall distance = {0}, travelling time = \'\'{1}\'\'.</string>
<string name="route_general_information">Overall distance = {0}, travelling time = {1} h {2} m.</string>
<string name="router_service_descr">Choose routing service</string>
<string name="router_service">Routing</string>
<string name="download_sd_dir_not_accessible">Directory on SD card to save index is not accessible</string>

View file

@ -507,7 +507,7 @@ public class ResourceManager {
if(source == null || source.getBitDensity() == 0){
maxImgCacheSize = 48;
} else {
maxImgCacheSize = 1024 / source.getBitDensity();
maxImgCacheSize = 512 / source.getBitDensity();
}
}

View file

@ -132,12 +132,12 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
private Notification getNotification(){
Intent notificationIndent = new Intent(this, MapActivity.class);
notificationIndent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
notificationIndent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
Notification notification = new Notification(R.drawable.icon, "", //$NON-NLS-1$
System.currentTimeMillis());
notification.setLatestEventInfo(this, Version.APP_NAME,
getString(R.string.go_back_to_osmand), PendingIntent.getActivity(
this.getBaseContext(), 0, notificationIndent,
this, 0, notificationIndent,
PendingIntent.FLAG_UPDATE_CURRENT));
return notification;
}

View file

@ -6,6 +6,7 @@ import java.util.List;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.location.Location;
import android.util.FloatMath;
import android.widget.Toast;
@ -317,6 +318,10 @@ public class RoutingHelper {
currentRoute = 0;
if(isFollowingMode){
voiceRouter.newRouteIsCalculated();
} else {
Intent intent = new Intent(context, ShowRouteInfoActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
context.startActivity(intent);
}
}

View file

@ -4,7 +4,6 @@
package com.osmand.activities;
import java.text.MessageFormat;
import java.util.Calendar;
import java.util.List;
import android.app.ListActivity;
@ -19,7 +18,6 @@ import android.graphics.Paint.Style;
import android.graphics.drawable.Drawable;
import android.location.Location;
import android.os.Bundle;
import android.text.format.DateFormat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -59,11 +57,11 @@ public class ShowRouteInfoActivity extends ListActivity {
@Override
protected void onResume() {
super.onResume();
Calendar c = Calendar.getInstance();
int time = helper.getLeftTime() * 1000 - c.getTimeZone().getOffset(0);
int dist = helper.getLeftDistance();
int hours = helper.getLeftTime() / (60 * 60);
int minutes = (helper.getLeftTime() / 60) % 60;
header.setText(MessageFormat.format(getString(R.string.route_general_information), MapUtils.getFormattedDistance(dist),
DateFormat.format("kk:mm", time))); //$NON-NLS-1$
hours, minutes));
setListAdapter(new RouteInfoAdapter(RoutingHelper.getInstance(this).getRouteDirections()));
}
@ -142,10 +140,13 @@ public class ShowRouteInfoActivity extends ListActivity {
((RouteDrawable) icon.getDrawable()).setRouteType(model.turnType);
distanceLabel.setText(MapUtils.getFormattedDistance(model.distance));
label.setText(model.descriptionRoute);
if(model.expectedTime < 3600){
timeLabel.setText(DateFormat.format("mm:ss", model.expectedTime * 1000)); //$NON-NLS-1$
int seconds = model.expectedTime % 60;
int min = (model.expectedTime / 60) % 60;
int hours = (model.expectedTime / 3600);
if (hours == 0) {
timeLabel.setText(String.format("%02d:%02d", min, seconds)); //$NON-NLS-1$
} else {
timeLabel.setText(DateFormat.format("kk:mm:ss", model.expectedTime * 1000)); //$NON-NLS-1$
timeLabel.setText(String.format("%d:%02d:%02d", hours, min, seconds)); //$NON-NLS-1$
}
return row;
}