Localized menu items and dialogs from Favorites, Search and partially Map.
git-svn-id: https://osmand.googlecode.com/svn/trunk@173 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
baeb5f580f
commit
67e399351d
14 changed files with 194 additions and 69 deletions
|
@ -4,28 +4,28 @@
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent" android:orientation="vertical">
|
android:layout_height="fill_parent" android:orientation="vertical">
|
||||||
|
|
||||||
<TextView android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:text="Input latitude & longitude in the selected format (D - degrees, M - minutes, S - seconds)" android:layout_marginTop="10dp" android:layout_marginBottom="10dp"></TextView>
|
<TextView android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:text="@string/navigate_point_top_text"></TextView>
|
||||||
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
|
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
|
||||||
<TextView android:id="@+id/TextView" android:layout_width="130dp" android:layout_height="wrap_content" android:text="Latitude" android:layout_marginLeft="5dp"></TextView>
|
<TextView android:id="@+id/TextView" android:layout_width="130dp" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_latitude"></TextView>
|
||||||
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LatitudeEdit" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
|
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LatitudeEdit" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
|
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
|
||||||
<TextView android:text="Longitude" android:id="@+id/TextView" android:layout_width="130dp" android:layout_height="wrap_content" android:layout_marginLeft="5dp"></TextView>
|
<TextView android:id="@+id/TextView" android:layout_width="130dp" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_longitude"></TextView>
|
||||||
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LongitudeEdit" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
|
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LongitudeEdit" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RadioGroup android:id="@+id/RadioGroup" android:layout_marginLeft="5dp" android:layout_marginTop="5dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" >
|
<RadioGroup android:id="@+id/RadioGroup" android:layout_marginLeft="5dp" android:layout_marginTop="5dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" >
|
||||||
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="DDD.DDD" android:id="@+id/Format1" ></RadioButton>
|
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format1" android:text="@string/navigate_point_format_D"></RadioButton>
|
||||||
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format2" android:text="DDD:MM.MMM" ></RadioButton>
|
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format2" android:text="@string/navigate_point_format_DM"></RadioButton>
|
||||||
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format3" android:text="DDD:MM:SS.SSS"></RadioButton>
|
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format3" android:text="@string/navigate_point_format_DMS"></RadioButton>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|
||||||
<TextView android:id="@+id/ValidateTextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="center" android:textColor="@color/color_red"></TextView>
|
<TextView android:id="@+id/ValidateTextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="center" android:textColor="@color/color_red"></TextView>
|
||||||
|
|
||||||
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"
|
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"
|
||||||
android:gravity="bottom|center">
|
android:gravity="bottom|center">
|
||||||
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:text="Show on map" android:id="@+id/ShowOnMap"></Button>
|
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:id="@+id/ShowOnMap" android:text="@string/search_shown_on_map"></Button>
|
||||||
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:text="Cancel" android:id="@+id/Cancel"></Button>
|
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:id="@+id/Cancel" android:text="@string/navigate_point_cancel"></Button>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -4,22 +4,22 @@
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent" android:orientation="vertical">
|
android:layout_height="fill_parent" android:orientation="vertical">
|
||||||
|
|
||||||
<TextView android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:text="Input latitude & longitude in the selected format (D - degrees, M - minutes, S - seconds)" android:layout_marginTop="10dp" android:layout_marginBottom="10dp"></TextView>
|
<TextView android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:text="@string/navigate_point_top_text"></TextView>
|
||||||
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
|
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
|
||||||
<TextView android:id="@+id/TextView" android:layout_width="130dp" android:layout_height="wrap_content" android:text="Latitude" android:layout_marginLeft="5dp"></TextView>
|
<TextView android:id="@+id/TextView" android:layout_width="130dp" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_latitude"></TextView>
|
||||||
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LatitudeEdit" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
|
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LatitudeEdit" android:layout_marginRight="5dp" android:inputType="number|time"></EditText>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
|
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
|
||||||
<TextView android:text="Longitude" android:id="@+id/TextView" android:layout_width="130dp" android:layout_height="wrap_content" android:layout_marginLeft="5dp"></TextView>
|
<TextView android:id="@+id/TextView" android:layout_width="130dp" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="@string/navigate_point_longitude"></TextView>
|
||||||
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LongitudeEdit" android:layout_marginRight="5dp" android:inputType="number|time">
|
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/LongitudeEdit" android:layout_marginRight="5dp" android:inputType="number|time">
|
||||||
</EditText>
|
</EditText>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RadioGroup android:id="@+id/RadioGroup" android:layout_marginLeft="70dp" android:layout_marginTop="5dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
|
<RadioGroup android:id="@+id/RadioGroup" android:layout_marginLeft="70dp" android:layout_marginTop="5dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
|
||||||
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="DDD.DDDDD" android:id="@+id/Format1" ></RadioButton>
|
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format1" android:text="@string/navigate_point_format_D"></RadioButton>
|
||||||
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format2" android:text="DDD:MM.MMMMM" ></RadioButton>
|
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format2" android:text="@string/navigate_point_format_DM"></RadioButton>
|
||||||
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format3" android:text="DDD:MM:SS.SSSSS"></RadioButton>
|
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Format3" android:text="@string/navigate_point_format_DMS"></RadioButton>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"
|
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"
|
||||||
android:gravity="bottom|center">
|
android:gravity="bottom|center">
|
||||||
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:text="Show on map" android:id="@+id/ShowOnMap"></Button>
|
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:id="@+id/ShowOnMap" android:text="@string/search_shown_on_map"></Button>
|
||||||
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:text="Cancel" android:id="@+id/Cancel"></Button>
|
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:id="@+id/Cancel" android:text="@string/navigate_point_cancel"></Button>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
android:layout_height="fill_parent" android:orientation="vertical">
|
android:layout_height="fill_parent" android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<TextView android:text="Select city or street or building" android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal"
|
<TextView android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal"
|
||||||
android:layout_marginTop = "5dp">
|
android:layout_marginTop = "5dp" android:text="@string/search_address_top_text">
|
||||||
</TextView>
|
</TextView>
|
||||||
<ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content">
|
<ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content">
|
||||||
<TableLayout android:id="@+id/TableLayout" android:stretchColumns="1" android:layout_width="fill_parent" android:layout_height="wrap_content">
|
<TableLayout android:id="@+id/TableLayout" android:stretchColumns="1" android:layout_width="fill_parent" android:layout_height="wrap_content">
|
||||||
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp">
|
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp">
|
||||||
<TextView android:text="Region" android:id="@+id/TextView">
|
<TextView android:id="@+id/TextView" android:text="@string/search_address_region">
|
||||||
</TextView>
|
</TextView>
|
||||||
<Button android:id="@+id/CountryButton" android:text="@string/ChooseCountry">
|
<Button android:id="@+id/CountryButton" android:text="@string/ChooseCountry">
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
</ImageButton>
|
</ImageButton>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp" >
|
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp" >
|
||||||
<TextView android:text="City" android:id="@+id/TextView">
|
<TextView android:id="@+id/TextView" android:text="@string/search_address_city">
|
||||||
</TextView>
|
</TextView>
|
||||||
<Button android:id="@+id/CityButton" android:text="@string/choose_city">
|
<Button android:id="@+id/CityButton" android:text="@string/choose_city">
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
</ImageButton>
|
</ImageButton>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp">
|
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp">
|
||||||
<TextView android:text="Street" android:id="@+id/TextView">
|
<TextView android:id="@+id/TextView" android:text="@string/search_address_street">
|
||||||
</TextView>
|
</TextView>
|
||||||
<Button android:id="@+id/StreetButton" android:text="@string/choose_street">
|
<Button android:id="@+id/StreetButton" android:text="@string/choose_street">
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
</ImageButton>
|
</ImageButton>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp">
|
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp">
|
||||||
<TextView android:text="Bulding" android:id="@+id/BuildingText">
|
<TextView android:id="@+id/BuildingText" android:text="@string/search_address_building">
|
||||||
</TextView>
|
</TextView>
|
||||||
<Button android:id="@+id/BuildingButton" android:text="@string/choose_building">
|
<Button android:id="@+id/BuildingButton" android:text="@string/choose_building">
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -44,17 +44,17 @@
|
||||||
</TableRow>
|
</TableRow>
|
||||||
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp" >
|
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp" >
|
||||||
<RadioGroup android:orientation="horizontal" android:layout_span="3" android:id="@+id/RadioGroup" >
|
<RadioGroup android:orientation="horizontal" android:layout_span="3" android:id="@+id/RadioGroup" >
|
||||||
<RadioButton android:text="Building" android:id="@+id/RadioBuilding" android:layout_width="wrap_content" android:layout_height="wrap_content"></RadioButton>
|
<RadioButton android:id="@+id/RadioBuilding" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/search_address_building_option"></RadioButton>
|
||||||
<RadioButton android:text="Intersected street" android:id="@+id/RadioIntersStreet" android:layout_width="wrap_content" android:layout_marginLeft = "5dp" android:layout_height="wrap_content"></RadioButton>
|
<RadioButton android:id="@+id/RadioIntersStreet" android:layout_width="wrap_content" android:layout_marginLeft = "5dp" android:layout_height="wrap_content" android:text="@string/search_address_street_option"></RadioButton>
|
||||||
|
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp" >
|
<TableRow android:id="@+id/TableRow" android:layout_marginLeft = "5dp" >
|
||||||
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="wrap_content" android:layout_height="wrap_content"
|
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||||
android:layout_span="3" android:gravity="right|bottom" android:layout_marginRight = "5dp" android:layout_marginTop = "10dp">
|
android:layout_span="3" android:gravity="right|bottom" android:layout_marginRight = "5dp" android:layout_marginTop = "10dp">
|
||||||
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/NavigateTo" android:text="@string/navigate_to">
|
<Button android:layout_height="wrap_content" android:id="@+id/NavigateTo" android:text="@string/navigate_to" android:layout_width="100dip">
|
||||||
</Button>
|
</Button>
|
||||||
<Button android:text="Show on map" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/ShowOnMap">
|
<Button android:layout_height="wrap_content" android:id="@+id/ShowOnMap" android:text="@string/search_shown_on_map" android:layout_width="100dip">
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<string name="user_password_descr">Указать пароль для работы с OSM</string>
|
||||||
|
<string name="user_password">Пароль</string>
|
||||||
<string name="osm_settings_descr">Упраление слоем open street bugs, установка osm логина </string>
|
<string name="osm_settings_descr">Упраление слоем open street bugs, установка osm логина </string>
|
||||||
<string name="monitor_preferences_descr">Включение мониторинга, установка интервала сохранения</string>
|
<string name="monitor_preferences_descr">Включение мониторинга, установка интервала сохранения</string>
|
||||||
<string name="search_settings_descr">Настройка параметров поиска</string>
|
<string name="search_settings_descr">Настройка параметров поиска</string>
|
||||||
<string name="map_preferences_descr">Настройка источника, параметров карты, доступа в Интернет</string>
|
<string name="map_preferences_descr">Настройка источника, параметров карты, доступа в Интернет</string>
|
||||||
<string name="search_settings">Поиск</string>
|
<string name="search_settings">Поиск</string>
|
||||||
<string name="osm_settings">Osm</string>
|
<string name="osm_settings">Osm</string>
|
||||||
<string name="auto_zoom_map_descr">Автоматически измемять масштаб карты при изменении скорости</string>
|
<string name="auto_zoom_map_descr">Автоматически изменять масштаб карты при изменении скорости</string>
|
||||||
<string name="auto_zoom_map">Масштаб</string>
|
<string name="auto_zoom_map">Масштаб</string>
|
||||||
<string name="additional_settings">Дополнительные настройки</string>
|
<string name="additional_settings">Дополнительные настройки</string>
|
||||||
<string name="settings_preset_descr">Выбор режима работы приложения</string>
|
<string name="settings_preset_descr">Выбор режима работы приложения</string>
|
||||||
|
@ -19,12 +21,12 @@
|
||||||
<string name="monitor_preferences">Мониторинг</string>
|
<string name="monitor_preferences">Мониторинг</string>
|
||||||
<string name="save_track_to_gpx_descrp">Сохранять путь в gpx формате в папку track</string>
|
<string name="save_track_to_gpx_descrp">Сохранять путь в gpx формате в папку track</string>
|
||||||
<string name="save_track_to_gpx">Мониторить</string>
|
<string name="save_track_to_gpx">Мониторить</string>
|
||||||
<string name="navigate_to">Перейти к</string>
|
<string name="navigate_to">Идти к</string>
|
||||||
<string name="update_tile">Обновить карту</string>
|
<string name="update_tile">Обновить карту</string>
|
||||||
<string name="reload_tile">Обновить часть карты</string>
|
<string name="reload_tile">Обновить часть карты</string>
|
||||||
<string name="user_name_descr">Указать имя пользователя для работы с OSM</string>
|
<string name="user_name_descr">Указать имя пользователя для работы с OSM</string>
|
||||||
<string name="user_name">Имя пользователя</string>
|
<string name="user_name">Имя пользователя</string>
|
||||||
<string name="mark_point">Цель</string>
|
<string name="mark_point">Точка</string>
|
||||||
<string name="show_osm_bugs_descr">Показывать слой Open Street Bugs</string>
|
<string name="show_osm_bugs_descr">Показывать слой Open Street Bugs</string>
|
||||||
<string name="show_osm_bugs">Open Street Bugs</string>
|
<string name="show_osm_bugs">Open Street Bugs</string>
|
||||||
<string name="favourites_activity">Список избранных точек</string>
|
<string name="favourites_activity">Список избранных точек</string>
|
||||||
|
@ -36,7 +38,7 @@
|
||||||
<string name="choose_building">Выберите здание</string>
|
<string name="choose_building">Выберите здание</string>
|
||||||
<string name="choose_street">Выберите улицу</string>
|
<string name="choose_street">Выберите улицу</string>
|
||||||
<string name="choose_city">Выберите город</string>
|
<string name="choose_city">Выберите город</string>
|
||||||
<string name="ChooseCountry">Выберите страну</string>
|
<string name="ChooseCountry">Выберите регион</string>
|
||||||
<string name="position_on_map_descr">Установить расположение текущей позиции на карте</string>
|
<string name="position_on_map_descr">Установить расположение текущей позиции на карте</string>
|
||||||
<string name="position_on_map">Текущая позиция</string>
|
<string name="position_on_map">Текущая позиция</string>
|
||||||
<string name="map_specify_point">Перейти к точке</string>
|
<string name="map_specify_point">Перейти к точке</string>
|
||||||
|
@ -77,7 +79,7 @@
|
||||||
<string name="incremental_search_street">Search street incrementally</string>
|
<string name="incremental_search_street">Search street incrementally</string>
|
||||||
<string name="incremental_search_building">Search building incrementally</string>
|
<string name="incremental_search_building">Search building incrementally</string>
|
||||||
<string name="choose_available_region">Choose region</string>
|
<string name="choose_available_region">Choose region</string>
|
||||||
<string name="choose_intersected_street">Choose intersected street</string>
|
<string name="choose_intersected_street">Выберите пересечение улиц</string>
|
||||||
<string name="Closest_Amenities">Closest amenities</string>
|
<string name="Closest_Amenities">Closest amenities</string>
|
||||||
<string name="app_mode_default">По умолчанию</string>
|
<string name="app_mode_default">По умолчанию</string>
|
||||||
<string name="app_mode_car">Автомобиль</string>
|
<string name="app_mode_car">Автомобиль</string>
|
||||||
|
@ -85,4 +87,52 @@
|
||||||
<string name="app_mode_pedestrian">Пешеход</string>
|
<string name="app_mode_pedestrian">Пешеход</string>
|
||||||
<string name="position_on_map_center">В центре</string>
|
<string name="position_on_map_center">В центре</string>
|
||||||
<string name="position_on_map_bottom">Внизу</string>
|
<string name="position_on_map_bottom">Внизу</string>
|
||||||
|
<string name="interval_1_second">1 секунда</string>
|
||||||
|
<string name="interval_2_seconds">2 секунды</string>
|
||||||
|
<string name="interval_5_seconds">5 секунд</string>
|
||||||
|
<string name="interval_15_seconds">15 секунд</string>
|
||||||
|
<string name="interval_30_seconds">30 секунд</string>
|
||||||
|
<string name="interval_1_minute">1 минута</string>
|
||||||
|
<string name="interval_5_minutes">5 минут</string>
|
||||||
|
<string name="navigate_point_top_text">Введите широту и долготу в выбранном формате (Г - градусы, М - минуты, С - секунды)</string>
|
||||||
|
<string name="navigate_point_latitude">Широта</string>
|
||||||
|
<string name="navigate_point_longitude">Долгота</string>
|
||||||
|
<string name="navigate_point_format_D">ГГГ.ГГГГ</string>
|
||||||
|
<string name="navigate_point_format_DM">ГГГ:ММ.МММММ</string>
|
||||||
|
<string name="navigate_point_format_DMS">ГГГ:ММ:СС.ССССС</string>
|
||||||
|
<string name="search_shown_on_map">Показать</string>
|
||||||
|
<string name="navigate_point_cancel">Отмена</string>
|
||||||
|
<string name="search_address_top_text">Выберите адрес</string>
|
||||||
|
<string name="search_address_region">Регион</string>
|
||||||
|
<string name="search_address_city">Город</string>
|
||||||
|
<string name="search_address_street">Улица</string>
|
||||||
|
<string name="search_address_building">Здание</string>
|
||||||
|
<string name="search_address_building_option">Здание</string>
|
||||||
|
<string name="search_address_street_option">Пересечение улиц</string>
|
||||||
|
<string name="search_tabs_address">Адрес</string>
|
||||||
|
<string name="search_tabs_location">Координаты</string>
|
||||||
|
<string name="context_menu_item_navigate_point">Идти к точке</string>
|
||||||
|
<string name="context_menu_item_add_favorite">Добавить к избранным</string>
|
||||||
|
<string name="context_menu_item_update_map">Обновить карту</string>
|
||||||
|
<string name="context_menu_item_open_bug">Создать open street bug</string>
|
||||||
|
<string name="context_menu_item_create_poi">Добавить poi</string>
|
||||||
|
<string name="context_menu_item_update_map_confirm">Вы действительно хотите удалить эту часть карты с диска и загрузить ее из Интернет?</string>
|
||||||
|
<string name="default_buttons_yes">Да</string>
|
||||||
|
<string name="default_buttons_cancel">Отмена</string>
|
||||||
|
<string name="default_buttons_apply">Применить</string><string name="default_buttons_add">Добавить</string><string name="default_buttons_no">Нет</string><string name="add_favorite_dialog_top_text">Введите имя точки</string>
|
||||||
|
<string name="add_favorite_dialog_default_favourite_name">Избранная</string>
|
||||||
|
<string name="add_favorite_dialog_favourite_added_template">Точка '{0}' была успешно добавлена к Избранным.</string>
|
||||||
|
|
||||||
|
<string name="favourites_context_menu_title">Контекстное меню</string>
|
||||||
|
<string name="favourites_context_menu_navigate">Показать</string>
|
||||||
|
<string name="favourites_context_menu_edit">Редактировать точку</string>
|
||||||
|
<string name="favourites_context_menu_delete">Удалить точку</string>
|
||||||
|
<string name="favourites_edit_dialog_title">Введите новое имя точки</string>
|
||||||
|
|
||||||
|
<string name="favourites_remove_dialog_title">Вы действительно хотите удалить точку из Избранных?</string>
|
||||||
|
<string name="favourites_remove_dialog_success">Точка {0} была успешно удалена из Избранных.</string>
|
||||||
|
|
||||||
|
<string name="osb_add_dialog_title">Введите текст для Open Street Bug</string>
|
||||||
|
<string name="osb_add_dialog_success">Open Streen Bug был успешно создан</string>
|
||||||
|
<string name="osb_add_dialog_error">Произошла ошибка. Open Street Bug не был создан.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -89,4 +89,54 @@
|
||||||
<string name="app_mode_pedestrian">Pedestrian</string>
|
<string name="app_mode_pedestrian">Pedestrian</string>
|
||||||
<string name="position_on_map_center">Center</string>
|
<string name="position_on_map_center">Center</string>
|
||||||
<string name="position_on_map_bottom">Bottom</string>
|
<string name="position_on_map_bottom">Bottom</string>
|
||||||
|
<string name="interval_1_second">1 second</string>
|
||||||
|
<string name="interval_2_seconds">2 seconds</string>
|
||||||
|
<string name="interval_5_seconds">5 seconds</string>
|
||||||
|
<string name="interval_15_seconds">15 seconds</string>
|
||||||
|
<string name="interval_30_seconds">30 seconds</string>
|
||||||
|
<string name="interval_1_minute">1 minute</string>
|
||||||
|
<string name="interval_5_minutes">5 minutes</string>
|
||||||
|
<string name="navigate_point_top_text">Input latitude & longitude in the selected format (D - degrees, M - minutes, S - seconds)</string>
|
||||||
|
<string name="navigate_point_latitude">Latitude</string>
|
||||||
|
<string name="navigate_point_longitude">Longitude</string>
|
||||||
|
<string name="navigate_point_format_D">DDD.DDDDD</string>
|
||||||
|
<string name="navigate_point_format_DM">DDD:MM.MMMMM</string>
|
||||||
|
<string name="navigate_point_format_DMS">DDD:MM:SS.SSSSS</string>
|
||||||
|
<string name="search_shown_on_map">Show on map</string>
|
||||||
|
<string name="navigate_point_cancel">Cancel</string>
|
||||||
|
<string name="search_address_top_text">Select address</string>
|
||||||
|
<string name="search_address_region">Region</string>
|
||||||
|
<string name="search_address_city">City</string>
|
||||||
|
<string name="search_address_street">Street</string>
|
||||||
|
<string name="search_address_building">Building</string>
|
||||||
|
<string name="search_address_building_option">Building</string>
|
||||||
|
<string name="search_address_street_option">Intersected street</string>
|
||||||
|
|
||||||
|
<string name="search_tabs_address">Address</string>
|
||||||
|
<string name="search_tabs_location">Location</string>
|
||||||
|
|
||||||
|
<string name="context_menu_item_navigate_point">Navigate to point</string>
|
||||||
|
<string name="context_menu_item_add_favorite">Add to favourites</string>
|
||||||
|
<string name="context_menu_item_update_map">Update map</string>
|
||||||
|
<string name="context_menu_item_open_bug">Open osm bug</string>
|
||||||
|
<string name="context_menu_item_create_poi">Create POI</string>
|
||||||
|
<string name="context_menu_item_update_map_confirm">Tile image will be removed from file system. Do you want to reload tile from internet?</string>
|
||||||
|
<string name="default_buttons_yes">Yes</string>
|
||||||
|
<string name="default_buttons_cancel">Cancel</string>
|
||||||
|
<string name="default_buttons_apply">Apply</string><string name="default_buttons_add">Add</string><string name="default_buttons_no">No</string><string name="add_favorite_dialog_top_text">Input name of favourite point</string>
|
||||||
|
<string name="add_favorite_dialog_default_favourite_name">Favourite</string>
|
||||||
|
<string name="add_favorite_dialog_favourite_added_template">Favourite point '{0}' was added successfully.</string>
|
||||||
|
|
||||||
|
<string name="favourites_context_menu_title">Context menu</string>
|
||||||
|
<string name="favourites_context_menu_navigate">Navigate to</string>
|
||||||
|
<string name="favourites_context_menu_edit">Edit favourite</string>
|
||||||
|
<string name="favourites_context_menu_delete">Delete favourite</string>
|
||||||
|
<string name="favourites_edit_dialog_title">Input new name of favourite point</string>
|
||||||
|
|
||||||
|
<string name="favourites_remove_dialog_title">Are you sure about deleting favourite point?</string>
|
||||||
|
<string name="favourites_remove_dialog_success">Favourite point {0} was succesfully deleted.</string>
|
||||||
|
|
||||||
|
<string name="osb_add_dialog_title">Input text of bug</string>
|
||||||
|
<string name="osb_add_dialog_success">Bug was successfully created</string>
|
||||||
|
<string name="osb_add_dialog_error">Exception occured : bug was not created</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class PoiFilter {
|
||||||
public PoiFilter(AmenityType type){
|
public PoiFilter(AmenityType type){
|
||||||
isStandardFilter = true;
|
isStandardFilter = true;
|
||||||
filterId = STD_PREFIX + type;
|
filterId = STD_PREFIX + type;
|
||||||
name = type == null ? "Closest poi" : Algoritms.capitalizeFirstLetterAndLowercase(type.name()).replace('_', ' ');
|
name = type == null ? Messages.getMessage("poi_filter_closest_poi") : AmenityType.toPublicString(type);
|
||||||
if(type == null){
|
if(type == null){
|
||||||
initSearchAll();
|
initSearchAll();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class PoiFiltersHelper {
|
||||||
list.add("car");
|
list.add("car");
|
||||||
list.add("car_repair");
|
list.add("car_repair");
|
||||||
types.put(AmenityType.SHOP, list);
|
types.put(AmenityType.SHOP, list);
|
||||||
filters.add(new PoiFilter("Car aid", null, types));
|
filters.add(new PoiFilter(Messages.getMessage("poi_filter_car_aid"), null, types));
|
||||||
types.clear();
|
types.clear();
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,13 +70,13 @@ public class PoiFiltersHelper {
|
||||||
list.add("waste_basket");
|
list.add("waste_basket");
|
||||||
list.add("waste_disposal");
|
list.add("waste_disposal");
|
||||||
types.put(AmenityType.OTHER, list);
|
types.put(AmenityType.OTHER, list);
|
||||||
filters.add(new PoiFilter("For tourists", null, types));
|
filters.add(new PoiFilter(Messages.getMessage("poi_filter_for_tourists"), null, types));
|
||||||
types.clear();
|
types.clear();
|
||||||
|
|
||||||
list = new ArrayList<String>();
|
list = new ArrayList<String>();
|
||||||
list.add("fuel");
|
list.add("fuel");
|
||||||
types.put(AmenityType.TRANSPORTATION, list);
|
types.put(AmenityType.TRANSPORTATION, list);
|
||||||
filters.add(new PoiFilter("Fuel", null, types));
|
filters.add(new PoiFilter(Messages.getMessage("poi_filter_fuel"), null, types));
|
||||||
types.clear();
|
types.clear();
|
||||||
|
|
||||||
list = new ArrayList<String>();
|
list = new ArrayList<String>();
|
||||||
|
@ -94,7 +94,7 @@ public class PoiFiltersHelper {
|
||||||
list.add("supermarket");
|
list.add("supermarket");
|
||||||
list.add("variety_store");
|
list.add("variety_store");
|
||||||
types.put(AmenityType.SHOP, list);
|
types.put(AmenityType.SHOP, list);
|
||||||
filters.add(new PoiFilter("Food shop", null, types));
|
filters.add(new PoiFilter(Messages.getMessage("poi_filter_food_shop"), null, types));
|
||||||
types.clear();
|
types.clear();
|
||||||
|
|
||||||
return filters;
|
return filters;
|
||||||
|
@ -106,7 +106,7 @@ public class PoiFiltersHelper {
|
||||||
////ctx.deleteDatabase(PoiFilterDbHelper.DATABASE_NAME);
|
////ctx.deleteDatabase(PoiFilterDbHelper.DATABASE_NAME);
|
||||||
|
|
||||||
cacheUserDefinedFilters = new ArrayList<PoiFilter>();
|
cacheUserDefinedFilters = new ArrayList<PoiFilter>();
|
||||||
PoiFilter filter = new PoiFilter("Custom filter", PoiFilter.CUSTOM_FILTER_ID, null);
|
PoiFilter filter = new PoiFilter(Messages.getMessage("poi_filter_custom_filter"), PoiFilter.CUSTOM_FILTER_ID, null);
|
||||||
cacheUserDefinedFilters.add(filter);
|
cacheUserDefinedFilters.add(filter);
|
||||||
PoiFilterDbHelper helper = new PoiFilterDbHelper(ctx);
|
PoiFilterDbHelper helper = new PoiFilterDbHelper(ctx);
|
||||||
cacheUserDefinedFilters.addAll(helper.getFilters());
|
cacheUserDefinedFilters.addAll(helper.getFilters());
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
*/
|
*/
|
||||||
package com.osmand.activities;
|
package com.osmand.activities;
|
||||||
|
|
||||||
|
import java.text.MessageFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -12,6 +13,7 @@ import android.app.AlertDialog.Builder;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.res.Resources;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
import android.database.sqlite.SQLiteOpenHelper;
|
import android.database.sqlite.SQLiteOpenHelper;
|
||||||
|
@ -67,10 +69,10 @@ public class FavouritesActivity extends ListActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
|
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
|
||||||
menu.setHeaderTitle("Context menu");
|
menu.setHeaderTitle(R.string.favourites_context_menu_title);
|
||||||
menu.add(0, NAVIGATE_TO, 0, "Navigate to");
|
menu.add(0, NAVIGATE_TO, 0, R.string.favourites_context_menu_navigate);
|
||||||
menu.add(0, EDIT_ITEM, 1, "Edit favourite");
|
menu.add(0, EDIT_ITEM, 1, R.string.favourites_context_menu_edit);
|
||||||
menu.add(0, DELETE_ITEM, 2, "Delete favourite");
|
menu.add(0, DELETE_ITEM, 2, R.string.favourites_context_menu_delete);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -94,12 +96,12 @@ public class FavouritesActivity extends ListActivity {
|
||||||
startActivity(newIntent);
|
startActivity(newIntent);
|
||||||
} else if(aItem.getItemId() == EDIT_ITEM){
|
} else if(aItem.getItemId() == EDIT_ITEM){
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle("Input new name of favourite point");
|
builder.setTitle(R.string.favourites_edit_dialog_title);
|
||||||
final EditText editText = new EditText(this);
|
final EditText editText = new EditText(this);
|
||||||
builder.setView(editText);
|
builder.setView(editText);
|
||||||
editText.setText(point.getName());
|
editText.setText(point.getName());
|
||||||
builder.setNegativeButton("Cancel", null);
|
builder.setNegativeButton(R.string.default_buttons_cancel, null);
|
||||||
builder.setPositiveButton("Apply", new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.default_buttons_apply, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
boolean editied = helper.editFavouriteName(point, editText.getText().toString());
|
boolean editied = helper.editFavouriteName(point, editText.getText().toString());
|
||||||
|
@ -112,15 +114,16 @@ public class FavouritesActivity extends ListActivity {
|
||||||
builder.create().show();
|
builder.create().show();
|
||||||
return true;
|
return true;
|
||||||
} if(aItem.getItemId() == DELETE_ITEM){
|
} if(aItem.getItemId() == DELETE_ITEM){
|
||||||
|
final Resources resources = this.getResources();
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setMessage("Are you sure about deleting favourite point?");
|
builder.setMessage(R.string.favourites_remove_dialog_title);
|
||||||
builder.setNegativeButton("No", null);
|
builder.setNegativeButton(R.string.default_buttons_no, null);
|
||||||
builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.default_buttons_yes, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
boolean deleted = helper.deleteFavourite(point);
|
boolean deleted = helper.deleteFavourite(point);
|
||||||
if (deleted) {
|
if (deleted) {
|
||||||
Toast.makeText(FavouritesActivity.this, "Favourite point " + point.getName() + " was succesfully deleted.",
|
Toast.makeText(FavouritesActivity.this, MessageFormat.format(resources.getString(R.string.favourites_remove_dialog_success), point.getName()),
|
||||||
Toast.LENGTH_SHORT).show();
|
Toast.LENGTH_SHORT).show();
|
||||||
favouritesList.remove(point);
|
favouritesList.remove(point);
|
||||||
favouritesAdapter.notifyDataSetChanged();
|
favouritesAdapter.notifyDataSetChanged();
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
package com.osmand.activities;
|
package com.osmand.activities;
|
||||||
|
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
|
import org.apache.http.entity.StringEntity;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.AlertDialog.Builder;
|
import android.app.AlertDialog.Builder;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.res.Resources;
|
||||||
import android.graphics.PointF;
|
import android.graphics.PointF;
|
||||||
import android.hardware.Sensor;
|
import android.hardware.Sensor;
|
||||||
import android.hardware.SensorEvent;
|
import android.hardware.SensorEvent;
|
||||||
|
@ -18,6 +23,7 @@ import android.location.LocationProvider;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
import android.os.PowerManager.WakeLock;
|
import android.os.PowerManager.WakeLock;
|
||||||
|
import android.text.format.Formatter;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
@ -526,9 +532,9 @@ public class MapActivity extends Activity implements LocationListener, IMapLocat
|
||||||
|
|
||||||
protected void reloadTile(final int zoom, final double latitude, final double longitude){
|
protected void reloadTile(final int zoom, final double latitude, final double longitude){
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setMessage("Tile image will be removed from file system. Do you want to reload tile from internet?");
|
builder.setMessage(R.string.context_menu_item_update_map_confirm);
|
||||||
builder.setNegativeButton("Cancel", null);
|
builder.setNegativeButton(R.string.default_buttons_cancel, null);
|
||||||
builder.setPositiveButton("Yes", new DialogInterface.OnClickListener(){
|
builder.setPositiveButton(R.string.default_buttons_yes, new DialogInterface.OnClickListener(){
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
int x = (int) MapUtils.getTileNumberX(zoom, longitude);
|
int x = (int) MapUtils.getTileNumberX(zoom, longitude);
|
||||||
|
@ -542,7 +548,14 @@ public class MapActivity extends Activity implements LocationListener, IMapLocat
|
||||||
|
|
||||||
protected void contextMenuPoint(final double latitude, final double longitude){
|
protected void contextMenuPoint(final double latitude, final double longitude){
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setItems(new String[]{"Navigate to point", "Add to favourites", "Update map", "Open osm bug", "Create POI"}, new DialogInterface.OnClickListener(){
|
Resources resources = this.getResources();
|
||||||
|
builder.setItems(new String[]{
|
||||||
|
resources.getString(R.string.context_menu_item_navigate_point),
|
||||||
|
resources.getString(R.string.context_menu_item_add_favorite),
|
||||||
|
resources.getString(R.string.context_menu_item_update_map),
|
||||||
|
resources.getString(R.string.context_menu_item_open_bug),
|
||||||
|
resources.getString(R.string.context_menu_item_create_poi)
|
||||||
|
}, new DialogInterface.OnClickListener(){
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
@ -565,24 +578,25 @@ public class MapActivity extends Activity implements LocationListener, IMapLocat
|
||||||
|
|
||||||
|
|
||||||
protected void addFavouritePoint(double latitude, double longitude){
|
protected void addFavouritePoint(double latitude, double longitude){
|
||||||
|
final Resources resources = this.getResources();
|
||||||
final FavouritePoint p = new FavouritesActivity.FavouritePoint();
|
final FavouritePoint p = new FavouritesActivity.FavouritePoint();
|
||||||
p.setLatitude(latitude);
|
p.setLatitude(latitude);
|
||||||
p.setLongitude(longitude);
|
p.setLongitude(longitude);
|
||||||
p.setName("Favourite");
|
p.setName(resources.getString(R.string.add_favorite_dialog_default_favourite_name));
|
||||||
|
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle("Input name of favourite point");
|
builder.setTitle(R.string.add_favorite_dialog_top_text);
|
||||||
final EditText editText = new EditText(this);
|
final EditText editText = new EditText(this);
|
||||||
builder.setView(editText);
|
builder.setView(editText);
|
||||||
builder.setNegativeButton("Cancel", null);
|
builder.setNegativeButton(R.string.default_buttons_cancel, null);
|
||||||
builder.setPositiveButton("Add", new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.default_buttons_add, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
FavouritesDbHelper helper = new FavouritesActivity.FavouritesDbHelper(MapActivity.this);
|
FavouritesDbHelper helper = new FavouritesActivity.FavouritesDbHelper(MapActivity.this);
|
||||||
p.setName(editText.getText().toString());
|
p.setName(editText.getText().toString());
|
||||||
boolean added = helper.addFavourite(p);
|
boolean added = helper.addFavourite(p);
|
||||||
if (added) {
|
if (added) {
|
||||||
Toast.makeText(MapActivity.this, "Favourite point " + p.getName() + " was succesfully added.", Toast.LENGTH_SHORT)
|
Toast.makeText(MapActivity.this, MessageFormat.format(resources.getString(R.string.add_favorite_dialog_favourite_added_template), p.getName()), Toast.LENGTH_SHORT)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
helper.close();
|
helper.close();
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class NavigatePointActivity extends Activity {
|
||||||
|
|
||||||
public void showDialog(){
|
public void showDialog(){
|
||||||
dlg.setContentView(R.layout.navigate_point);
|
dlg.setContentView(R.layout.navigate_point);
|
||||||
dlg.setTitle("Navigate to point");
|
dlg.setTitle(R.string.map_specify_point);
|
||||||
LatLon loc = activity.getMapLocation();
|
LatLon loc = activity.getMapLocation();
|
||||||
initUI(loc.getLatitude(), loc.getLongitude());
|
initUI(loc.getLatitude(), loc.getLongitude());
|
||||||
dlg.show();
|
dlg.show();
|
||||||
|
@ -48,7 +48,7 @@ public class NavigatePointActivity extends Activity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
LatLon loc = OsmandSettings.getLastKnownMapLocation(this);
|
LatLon loc = OsmandSettings.getLastKnownMapLocation(this);
|
||||||
setContentView(R.layout.navigate_point);
|
setContentView(R.layout.navigate_point);
|
||||||
setTitle("Navigate to point");
|
setTitle(R.string.map_specify_point);
|
||||||
initUI(loc.getLatitude(), loc.getLongitude());
|
initUI(loc.getLatitude(), loc.getLongitude());
|
||||||
((Button) findViewById(R.id.Cancel)).setText(getString(R.string.navigate_to));
|
((Button) findViewById(R.id.Cancel)).setText(getString(R.string.navigate_to));
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,14 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
|
||||||
userName.setText(OsmandSettings.getUserName(this));
|
userName.setText(OsmandSettings.getUserName(this));
|
||||||
userPassword.setText(OsmandSettings.getUserPassword(this));
|
userPassword.setText(OsmandSettings.getUserPassword(this));
|
||||||
|
|
||||||
saveTrackInterval.setEntries(new String[]{"1 second", "2 seconds", "5 seconds", "15 seconds", "30 seconds", "1 minute", "5 minute"});
|
saveTrackInterval.setEntries(new String[]{
|
||||||
|
resources.getString(R.string.interval_1_second),
|
||||||
|
resources.getString(R.string.interval_2_seconds),
|
||||||
|
resources.getString(R.string.interval_5_seconds),
|
||||||
|
resources.getString(R.string.interval_15_seconds),
|
||||||
|
resources.getString(R.string.interval_30_seconds),
|
||||||
|
resources.getString(R.string.interval_1_minute),
|
||||||
|
resources.getString(R.string.interval_5_minutes)});
|
||||||
saveTrackInterval.setEntryValues(new String[]{"1", "2", "5", "15", "30", "60", "300"});
|
saveTrackInterval.setEntryValues(new String[]{"1", "2", "5", "15", "30", "60", "300"});
|
||||||
saveTrackInterval.setValue(OsmandSettings.getSavingTrackInterval(this)+"");
|
saveTrackInterval.setValue(OsmandSettings.getSavingTrackInterval(this)+"");
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
*/
|
*/
|
||||||
package com.osmand.activities.search;
|
package com.osmand.activities.search;
|
||||||
|
|
||||||
|
import com.osmand.R;
|
||||||
import com.osmand.activities.NavigatePointActivity;
|
import com.osmand.activities.NavigatePointActivity;
|
||||||
|
|
||||||
import android.app.TabActivity;
|
import android.app.TabActivity;
|
||||||
|
@ -24,8 +25,8 @@ public class SearchActivity extends TabActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
TabHost host = getTabHost();
|
TabHost host = getTabHost();
|
||||||
host.addTab(host.newTabSpec("Search_POI").setIndicator("POI").setContent(new Intent(this, SearchPoiFilterActivity.class)));
|
host.addTab(host.newTabSpec("Search_POI").setIndicator("POI").setContent(new Intent(this, SearchPoiFilterActivity.class)));
|
||||||
host.addTab(host.newTabSpec("Search_Address").setIndicator("Address").setContent(new Intent(this, SearchAddressActivity.class)));
|
host.addTab(host.newTabSpec("Search_Address").setIndicator(this.getResources().getString(R.string.search_tabs_address)).setContent(new Intent(this, SearchAddressActivity.class)));
|
||||||
host.addTab(host.newTabSpec("Search_Location").setIndicator("Location").setContent(new Intent(this, NavigatePointActivity.class)));
|
host.addTab(host.newTabSpec("Search_Location").setIndicator(this.getResources().getString(R.string.search_tabs_location)).setContent(new Intent(this, NavigatePointActivity.class)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,14 +198,14 @@ public class SearchAddressActivity extends Activity {
|
||||||
|
|
||||||
protected void updateBuildingSection(){
|
protected void updateBuildingSection(){
|
||||||
if(radioBuilding){
|
if(radioBuilding){
|
||||||
((TextView)findViewById(R.id.BuildingText)).setText("Building");
|
((TextView)findViewById(R.id.BuildingText)).setText(R.string.search_address_building);
|
||||||
if(building == null){
|
if(building == null){
|
||||||
((TextView)findViewById(R.id.BuildingButton)).setText(R.string.choose_building);
|
((TextView)findViewById(R.id.BuildingButton)).setText(R.string.choose_building);
|
||||||
} else {
|
} else {
|
||||||
((TextView)findViewById(R.id.BuildingButton)).setText(building.getName(region.useEnglishNames()));
|
((TextView)findViewById(R.id.BuildingButton)).setText(building.getName(region.useEnglishNames()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
((TextView)findViewById(R.id.BuildingText)).setText("Street 2");
|
((TextView)findViewById(R.id.BuildingText)).setText(R.string.search_address_street);
|
||||||
if(street2 == null){
|
if(street2 == null){
|
||||||
((TextView)findViewById(R.id.BuildingButton)).setText(R.string.choose_intersected_street);
|
((TextView)findViewById(R.id.BuildingButton)).setText(R.string.choose_intersected_street);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -340,12 +340,12 @@ public class OsmBugsLayer implements OsmandMapLayer {
|
||||||
|
|
||||||
public void openBug(final Context ctx, LayoutInflater layoutInflater, final OsmandMapTileView mapView, final double latitude, final double longitude){
|
public void openBug(final Context ctx, LayoutInflater layoutInflater, final OsmandMapTileView mapView, final double latitude, final double longitude){
|
||||||
Builder builder = new AlertDialog.Builder(ctx);
|
Builder builder = new AlertDialog.Builder(ctx);
|
||||||
builder.setTitle("Input text of bug");
|
builder.setTitle(R.string.osb_add_dialog_title);
|
||||||
final View view = layoutInflater.inflate(R.layout.open_bug, null);
|
final View view = layoutInflater.inflate(R.layout.open_bug, null);
|
||||||
builder.setView(view);
|
builder.setView(view);
|
||||||
((EditText)view.findViewById(R.id.AuthorName)).setText(OsmandSettings.getUserName(ctx));
|
((EditText)view.findViewById(R.id.AuthorName)).setText(OsmandSettings.getUserName(ctx));
|
||||||
builder.setNegativeButton("Cancel", null);
|
builder.setNegativeButton(R.string.default_buttons_cancel, null);
|
||||||
builder.setPositiveButton("Add", new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.default_buttons_add, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
String text = ((EditText)view.findViewById(R.id.BugMessage)).getText().toString();
|
String text = ((EditText)view.findViewById(R.id.BugMessage)).getText().toString();
|
||||||
|
@ -354,13 +354,13 @@ public class OsmBugsLayer implements OsmandMapLayer {
|
||||||
boolean bug = createNewBug(latitude, longitude,
|
boolean bug = createNewBug(latitude, longitude,
|
||||||
text, author);
|
text, author);
|
||||||
if (bug) {
|
if (bug) {
|
||||||
Toast.makeText(ctx, "Bug was successfully created", Toast.LENGTH_LONG).show();
|
Toast.makeText(ctx, ctx.getResources().getString(R.string.osb_add_dialog_success), Toast.LENGTH_LONG).show();
|
||||||
clearCache();
|
clearCache();
|
||||||
if (mapView.getLayers().contains(OsmBugsLayer.this)) {
|
if (mapView.getLayers().contains(OsmBugsLayer.this)) {
|
||||||
mapView.refreshMap();
|
mapView.refreshMap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(ctx, "Exception occured : bug was not created", Toast.LENGTH_LONG).show();
|
Toast.makeText(ctx, ctx.getResources().getString(R.string.osb_add_dialog_error), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue