small usability fixes

git-svn-id: https://osmand.googlecode.com/svn/trunk@244 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-06-29 08:55:48 +00:00
parent 467e7dcfd9
commit 29be5c3b16
6 changed files with 26 additions and 20 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.osmand" android:versionCode="1" android:versionName="1.0">
package="com.osmand" android:versionName="0.2" android:versionCode="2">
<application android:icon="@drawable/icon" android:label="@string/app_name"
android:debuggable="true" android:name=".activities.OsmandApplication">
android:debuggable="true" android:name=".activities.OsmandApplication" android:description="@string/app_description">
<activity android:name=".activities.MainMenuActivity"
android:label="@string/app_name">
<intent-filter>
@ -28,16 +28,12 @@
<activity android:name=".activities.search.SearchStreetByNameActivity"></activity>
<activity android:name=".activities.search.SearchStreet2ByNameActivity"></activity>
<activity android:name=".activities.search.SearchBuildingByNameActivity"></activity>
<activity android:name=".activities.EditPOIFilterActivity"></activity>
<activity android:name=".activities.EditPOIFilterActivity"></activity>
</application>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>

View file

@ -12,15 +12,15 @@
<TableRow>
<Button android:text="&lt;Type&gt;" android:id="@+id/TypeButton" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
<AutoCompleteTextView android:text="" android:id="@+id/Type" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_height="wrap_content" android:layout_width ="fill_parent"/>
<!-- <EditText android:text="" android:id="@+id/Type" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_height="wrap_content" android:layout_width = "fill_parent" />-->
<!-- <EditText android:text="" android:id="@+id/Type" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_height="wrap_content" android:layout_width = "fill_parent" /> -->
</TableRow>
<TableRow>
<TextView android:text="@string/poi_dialog_opening_hours" android:id="@+id/TextView" android:layout_marginLeft="5dp" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
<EditText android:text="" android:hint="Mo-Su 08:00-20:00" android:id="@+id/OpeningHours" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_width ="fill_parent" android:layout_height="wrap_content"></EditText>
<EditText android:text="" android:hint="Mo-Su 08:00-20:00" android:id="@+id/OpeningHours" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_width ="100dp" android:layout_height="wrap_content"></EditText>
</TableRow>
<TableRow>
<TextView android:text="@string/poi_dialog_comment" android:id="@+id/TextView" android:layout_marginLeft="5dp" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
<EditText android:text="@string/poi_dialog_comment_default" android:id="@+id/Comment" android:layout_marginLeft="5dp" android:layout_width ="fill_parent" android:layout_marginRight="5dp" android:layout_height="wrap_content"></EditText>
<EditText android:text="@string/poi_dialog_comment_default" android:id="@+id/Comment" android:layout_marginLeft="5dp" android:layout_width ="100dp" android:layout_marginRight="5dp" android:layout_height="wrap_content"></EditText>
</TableRow>
</TableLayout>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Навигационное приложение OsmAnd</string>
<string name="update_poi_success">Данные POI были успешно обновлены ({0} объектов загружено)</string>
<string name="update_poi_error_local">Ошибка сохранения POI в локальный индекс</string>
<string name="update_poi_error_loading">Ошибка загрузки данных с сервера</string>
@ -148,8 +149,8 @@
<string name="settings_activity">Настройки</string>
<string name="show_gps_coordinates_text">Показать gps координаты на карте</string>
<string name="use_internet_to_download_tile">Использовать Интернет для загрузки недостающих частей карты</string>
<string name="hello">Hello World, StartActivity!</string>
<string name="app_name">OsmAnd</string>
<string name="app_description">Навигационное приложение</string>
<string name="exit_Button">Выход</string>
<string name="map_Button">Карта</string>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Navigation application OsmAnd</string>
<string name="update_poi_success">POI data was updated successfully ({0} were loaded)</string>
<string name="update_poi_error_local">Error updating local indexes</string>
<string name="update_poi_error_loading">Error while loading data from server</string>
@ -148,8 +149,8 @@ See osmand.googlecode.com.</string>
<string name="settings_activity">Settings</string>
<string name="show_gps_coordinates_text">Show gps coordinates on map</string>
<string name="use_internet_to_download_tile">Use internet to download missing tiles</string>
<string name="hello">Hello World, StartActivity!</string>
<string name="app_name">OsmAnd</string>
<string name="app_description">Navigation application</string>
<string name="exit_Button">Exit</string>
<string name="map_Button">Map</string>

View file

@ -562,10 +562,10 @@ public class EditingPOIActivity {
}
} catch (IOException e) {
log.error("Loading node failed" + n.getId(), e); //$NON-NLS-1$
log.error("Loading node failed " + n.getId(), e); //$NON-NLS-1$
Toast.makeText(ctx, ctx.getResources().getString(R.string.error_io_error), Toast.LENGTH_LONG).show();
} catch (SAXException e) {
log.error("Loading node failed" + n.getId(), e); //$NON-NLS-1$
log.error("Loading node failed " + n.getId(), e); //$NON-NLS-1$
Toast.makeText(ctx, ctx.getResources().getString(R.string.error_io_error), Toast.LENGTH_LONG).show();
}
return null;

View file

@ -349,15 +349,23 @@ public class MapActivity extends Activity implements LocationListener, IMapLocat
private void updateSpeedBearing(Location location) {
// For gps it's bad way. It's widely used for testing purposes
if(!providerSupportsSpeed && locationLayer.getLastKnownLocation() != null && location != null){
if (locationLayer.getLastKnownLocation().distanceTo(location) > 3) {
if (!providerSupportsSpeed && locationLayer.getLastKnownLocation() != null && location != null) {
if (locationLayer.getLastKnownLocation().distanceTo(location) > 3) {
float d = location.distanceTo(locationLayer.getLastKnownLocation());
if (d > 100) {
d = 100;
long time = location.getTime() - locationLayer.getLastKnownLocation().getTime();
float speed;
if (time == 0) {
speed = 0;
} else {
speed = ((float) d * 1000) / time ;
}
location.setSpeed(d);
if (speed > 100) {
speed = 100;
}
location.setSpeed(speed);
}
}
}
if(!providerSupportsBearing && locationLayer.getLastKnownLocation() != null && location != null){
if(locationLayer.getLastKnownLocation().distanceTo(location) > 10){
location.setBearing(locationLayer.getLastKnownLocation().bearingTo(location));