Dialogs replaced with AppCompatDialogs
This commit is contained in:
parent
4f97ccc711
commit
b3266d86af
69 changed files with 1368 additions and 1130 deletions
|
@ -1,17 +1,17 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="net.osmand.plus"
|
||||||
android:installLocation="auto"
|
android:installLocation="auto"
|
||||||
android:versionName="@string/app_version"
|
|
||||||
android:versionCode="231"
|
android:versionCode="231"
|
||||||
package="net.osmand.plus">
|
android:versionName="@string/app_version" >
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
|
|
||||||
|
|
||||||
|
<uses-sdk
|
||||||
|
android:minSdkVersion="14"
|
||||||
|
android:targetSdkVersion="21" />
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
|
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.STORAGE" />
|
<uses-permission android:name="android.permission.STORAGE" />
|
||||||
|
@ -22,42 +22,96 @@
|
||||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||||
<uses-permission android:name="com.android.vending.BILLING" />
|
<uses-permission android:name="com.android.vending.BILLING" />
|
||||||
|
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.camera"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.camera.autofocus"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.microphone"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.wifi"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.location"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.location.network"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.location.gps"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.sensor.light"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.sensor.compass"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.sensor.accelerometer"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.sensor.gyroscope"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.touchscreen"
|
||||||
|
android:required="false" />
|
||||||
|
|
||||||
|
<supports-screens
|
||||||
|
android:anyDensity="true"
|
||||||
|
android:largeScreens="true"
|
||||||
|
android:normalScreens="true"
|
||||||
|
android:resizeable="true"
|
||||||
|
android:smallScreens="true"
|
||||||
|
android:xlargeScreens="true" />
|
||||||
|
|
||||||
<uses-feature android:name="android.hardware.camera" android:required="false" />
|
<android:uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||||
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
|
<android:uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- android:theme="@style/OsmandLightDarkActionBarTheme" -->
|
||||||
<uses-feature android:name="android.hardware.microphone" android:required="false" />
|
<application
|
||||||
<uses-feature android:name="android.hardware.wifi" android:required="false" />
|
android:name=".OsmandApplication"
|
||||||
<uses-feature android:name="android.hardware.location" android:required="false" />
|
android:allowBackup="true"
|
||||||
<uses-feature android:name="android.hardware.location.network" android:required="false" />
|
android:backupAgent=".OsmandBackupAgent"
|
||||||
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
|
android:configChanges="locale"
|
||||||
<uses-feature android:name="android.hardware.sensor.light" android:required="false" />
|
android:icon="@drawable/icon"
|
||||||
<uses-feature android:name="android.hardware.sensor.compass" android:required="false" />
|
android:label="@string/app_name"
|
||||||
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="false" />
|
android:largeHeap="true"
|
||||||
<uses-feature android:name="android.hardware.sensor.gyroscope" android:required="false" />
|
android:restoreAnyVersion="true"
|
||||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
|
android:theme="@style/OsmandDarkTheme" >
|
||||||
|
<meta-data
|
||||||
|
android:name="com.google.android.backup.api_key"
|
||||||
|
android:value="AEdPqrEAAAAIqF3tNGT66etVBn_vgzpfAY1wmIzKV1Ss6Ku-2A" />
|
||||||
|
<meta-data
|
||||||
|
android:name="com.sec.android.support.multiwindow"
|
||||||
|
android:value="true" />
|
||||||
|
<meta-data
|
||||||
|
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W"
|
||||||
|
android:resource="@dimen/app_defaultsize_w"
|
||||||
|
android:value="" />
|
||||||
|
<meta-data
|
||||||
|
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H"
|
||||||
|
android:resource="@dimen/app_defaultsize_h"
|
||||||
|
android:value="" />
|
||||||
|
<meta-data
|
||||||
|
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W"
|
||||||
|
android:resource="@dimen/app_minimumsize_w"
|
||||||
|
android:value="" />
|
||||||
|
<meta-data
|
||||||
|
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H"
|
||||||
|
android:resource="@dimen/app_minimumsize_h"
|
||||||
|
android:value="" />
|
||||||
|
<meta-data
|
||||||
|
android:name="com.sec.minimode.icon.portrait.normal"
|
||||||
|
android:resource="@drawable/icon"
|
||||||
|
android:value="" />
|
||||||
|
<meta-data
|
||||||
|
android:name="com.sec.minimode.icon.landscape.normal"
|
||||||
|
android:resource="@drawable/icon"
|
||||||
|
android:value="" />
|
||||||
|
|
||||||
|
<activity android:name=".activities.HelpActivity" />
|
||||||
<supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true"
|
<activity android:name=".activities.ExitActivity" />
|
||||||
android:xlargeScreens="true" android:anyDensity="true" />
|
|
||||||
|
|
||||||
|
|
||||||
<!-- android:theme="@style/OsmandLightDarkActionBarTheme" -->
|
|
||||||
<application android:allowBackup="true" android:backupAgent="net.osmand.plus.OsmandBackupAgent"
|
|
||||||
android:icon="@drawable/icon" android:label="@string/app_name"
|
|
||||||
android:name="net.osmand.plus.OsmandApplication" android:configChanges="locale"
|
|
||||||
android:theme="@style/OsmandDarkTheme" android:restoreAnyVersion="true" android:largeHeap="true">
|
|
||||||
|
|
||||||
<meta-data android:name="com.google.android.backup.api_key" android:value="AEdPqrEAAAAIqF3tNGT66etVBn_vgzpfAY1wmIzKV1Ss6Ku-2A" />
|
|
||||||
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
|
|
||||||
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:resource="@dimen/app_defaultsize_w" android:value="" />
|
|
||||||
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:resource="@dimen/app_defaultsize_h" android:value="" />
|
|
||||||
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:resource="@dimen/app_minimumsize_w" android:value="" />
|
|
||||||
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:resource="@dimen/app_minimumsize_h" android:value="" />
|
|
||||||
<meta-data android:name="com.sec.minimode.icon.portrait.normal" android:resource="@drawable/icon" android:value="" />
|
|
||||||
<meta-data android:name="com.sec.minimode.icon.landscape.normal" android:resource="@drawable/icon" android:value="" />
|
|
||||||
<activity android:name="net.osmand.plus.activities.HelpActivity" />
|
|
||||||
<activity android:name="net.osmand.plus.activities.ExitActivity" />
|
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="android.support.v4.content.FileProvider"
|
android:name="android.support.v4.content.FileProvider"
|
||||||
|
@ -69,27 +123,39 @@
|
||||||
android:resource="@xml/paths" />
|
android:resource="@xml/paths" />
|
||||||
</provider>
|
</provider>
|
||||||
|
|
||||||
<activity android:name="net.osmand.plus.activities.MapActivity" android:label="@string/app_name"
|
<activity
|
||||||
android:screenOrientation="unspecified" android:launchMode="singleTop">
|
android:name=".activities.MapActivity"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:launchMode="singleTop"
|
||||||
|
android:screenOrientation="unspecified" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<action android:name="android.intent.action.SEND" />
|
<action android:name="android.intent.action.SEND" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
<data android:scheme="content" android:host="*" android:mimeType="binary/octet-stream" />
|
|
||||||
<data android:scheme="content" android:host="*" android:mimeType="application/octet-stream" />
|
|
||||||
</intent-filter>
|
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
|
<data
|
||||||
|
android:host="*"
|
||||||
|
android:mimeType="binary/octet-stream"
|
||||||
|
android:scheme="content" />
|
||||||
|
<data
|
||||||
|
android:host="*"
|
||||||
|
android:mimeType="application/octet-stream"
|
||||||
|
android:scheme="content" />
|
||||||
|
</intent-filter>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
|
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<data android:scheme="http" />
|
<data android:scheme="http" />
|
||||||
<data android:host="osmand.net" />
|
<data android:host="osmand.net" />
|
||||||
<data android:pathPrefix="/go" />
|
<data android:pathPrefix="/go" />
|
||||||
|
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
<category android:name="android.intent.category.APP_MAPS" />
|
<category android:name="android.intent.category.APP_MAPS" />
|
||||||
|
@ -97,12 +163,13 @@
|
||||||
<category android:name="android.intent.category.CAR_DOCK" />
|
<category android:name="android.intent.category.CAR_DOCK" />
|
||||||
<category android:name="android.intent.category.DESK_DOCK" />
|
<category android:name="android.intent.category.DESK_DOCK" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<data android:scheme="https" />
|
<data android:scheme="https" />
|
||||||
<data android:host="osmand.net" />
|
<data android:host="osmand.net" />
|
||||||
<data android:pathPrefix="/go" />
|
<data android:pathPrefix="/go" />
|
||||||
|
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
<category android:name="android.intent.category.APP_MAPS" />
|
<category android:name="android.intent.category.APP_MAPS" />
|
||||||
|
@ -111,92 +178,178 @@
|
||||||
<category android:name="android.intent.category.DESK_DOCK" />
|
<category android:name="android.intent.category.DESK_DOCK" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
|
||||||
<!-- android matches non-greedy : http://stackoverflow.com/questions/3400072/pathpattern-to-match-file-extension-does-not-work-if-a-period-exists-elsewhere-i -->
|
<!-- android matches non-greedy : http://stackoverflow.com/questions/3400072/pathpattern-to-match-file-extension-does-not-work-if-a-period-exists-elsewhere-i -->
|
||||||
<!-- mimeType&host are both needed or you will either have unwanted matching or no match when needed -->
|
<!-- mimeType&host are both needed or you will either have unwanted matching or no match when needed -->
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\.gpx" />
|
|
||||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\.gpx" />
|
<data
|
||||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\.gpx" />
|
android:host="*"
|
||||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\..*\\.gpx" />
|
android:mimeType="*/*"
|
||||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\..*\\..*\\.gpx" />
|
android:pathPattern=".*\\.gpx"
|
||||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\.kml" />
|
android:scheme="file" />
|
||||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\.kml" />
|
<data
|
||||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\.kml" />
|
android:host="*"
|
||||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\..*\\.kml" />
|
android:mimeType="*/*"
|
||||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\..*\\..*\\.kml" />
|
android:pathPattern=".*\\..*\\.gpx"
|
||||||
|
android:scheme="file" />
|
||||||
|
<data
|
||||||
|
android:host="*"
|
||||||
|
android:mimeType="*/*"
|
||||||
|
android:pathPattern=".*\\..*\\..*\\.gpx"
|
||||||
|
android:scheme="file" />
|
||||||
|
<data
|
||||||
|
android:host="*"
|
||||||
|
android:mimeType="*/*"
|
||||||
|
android:pathPattern=".*\\..*\\..*\\..*\\.gpx"
|
||||||
|
android:scheme="file" />
|
||||||
|
<data
|
||||||
|
android:host="*"
|
||||||
|
android:mimeType="*/*"
|
||||||
|
android:pathPattern=".*\\..*\\..*\\..*\\..*\\.gpx"
|
||||||
|
android:scheme="file" />
|
||||||
|
<data
|
||||||
|
android:host="*"
|
||||||
|
android:mimeType="*/*"
|
||||||
|
android:pathPattern=".*\\.kml"
|
||||||
|
android:scheme="file" />
|
||||||
|
<data
|
||||||
|
android:host="*"
|
||||||
|
android:mimeType="*/*"
|
||||||
|
android:pathPattern=".*\\..*\\.kml"
|
||||||
|
android:scheme="file" />
|
||||||
|
<data
|
||||||
|
android:host="*"
|
||||||
|
android:mimeType="*/*"
|
||||||
|
android:pathPattern=".*\\..*\\..*\\.kml"
|
||||||
|
android:scheme="file" />
|
||||||
|
<data
|
||||||
|
android:host="*"
|
||||||
|
android:mimeType="*/*"
|
||||||
|
android:pathPattern=".*\\..*\\..*\\..*\\.kml"
|
||||||
|
android:scheme="file" />
|
||||||
|
<data
|
||||||
|
android:host="*"
|
||||||
|
android:mimeType="*/*"
|
||||||
|
android:pathPattern=".*\\..*\\..*\\..*\\..*\\.kml"
|
||||||
|
android:scheme="file" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<!-- google navigation intent -->
|
<!-- google navigation intent -->
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
<data android:scheme="google.navigation" />
|
<data android:scheme="google.navigation" />
|
||||||
<data android:scheme="osmand.navigation" />
|
<data android:scheme="osmand.navigation" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<receiver android:name="net.osmand.plus.audionotes.MediaRemoteControlReceiver">
|
<receiver android:name=".audionotes.MediaRemoteControlReceiver" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.CAMERA_BUTTON" />
|
<action android:name="android.intent.action.CAMERA_BUTTON" />
|
||||||
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<activity android:name="net.osmand.plus.activities.SettingsActivity" android:label="@string/shared_string_settings" android:configChanges="keyboardHidden|orientation" />
|
<activity
|
||||||
<activity android:name="net.osmand.plus.activities.SettingsGeneralActivity" android:configChanges="keyboardHidden|orientation" />
|
android:name=".activities.SettingsActivity"
|
||||||
<activity android:name="net.osmand.plus.activities.SettingsNavigationActivity" android:configChanges="keyboardHidden|orientation" />
|
android:configChanges="keyboardHidden|orientation"
|
||||||
<activity android:name="net.osmand.plus.monitoring.SettingsMonitoringActivity" android:configChanges="keyboardHidden|orientation" />
|
android:label="@string/shared_string_settings" />
|
||||||
<activity android:name="net.osmand.plus.rastermaps.SettingsRasterMapsActivity" android:configChanges="keyboardHidden|orientation" />
|
<activity
|
||||||
<activity android:name="net.osmand.plus.routepointsnavigation.RoutePointsActivity" />
|
android:name=".activities.SettingsGeneralActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation" />
|
||||||
<activity android:name="net.osmand.plus.osmedit.SettingsOsmEditingActivity" android:configChanges="keyboardHidden|orientation" />
|
<activity
|
||||||
<activity android:name="net.osmand.plus.development.SettingsDevelopmentActivity" android:configChanges="keyboardHidden|orientation" />
|
android:name=".activities.SettingsNavigationActivity"
|
||||||
<activity android:name="net.osmand.plus.audionotes.SettingsAudioVideoActivity" android:configChanges="keyboardHidden|orientation" />
|
android:configChanges="keyboardHidden|orientation" />
|
||||||
<activity android:name="net.osmand.access.SettingsAccessibilityActivity" android:configChanges="keyboardHidden|orientation" />
|
<activity
|
||||||
|
android:name=".monitoring.SettingsMonitoringActivity"
|
||||||
<activity android:name="net.osmand.plus.activities.search.SearchActivity" android:label="@string/search_activity" />
|
android:configChanges="keyboardHidden|orientation" />
|
||||||
<activity android:name="net.osmand.plus.activities.ShowRouteInfoActivity" android:label="@string/show_route" />
|
<activity
|
||||||
<activity android:name="net.osmand.plus.activities.FavoritesListActivity" android:label="@string/favourites_list_activity" />
|
android:name=".rastermaps.SettingsRasterMapsActivity"
|
||||||
<activity android:name=".myplaces.FavoritesActivity" android:windowSoftInputMode="adjustPan" />
|
android:configChanges="keyboardHidden|orientation" />
|
||||||
<activity android:name="net.osmand.plus.activities.TrackActivity"/>
|
<activity android:name=".routepointsnavigation.RoutePointsActivity" />
|
||||||
<activity android:name="net.osmand.plus.activities.PluginsActivity" />
|
<activity
|
||||||
<activity android:name="net.osmand.plus.activities.PluginActivity" />
|
android:name=".osmedit.SettingsOsmEditingActivity"
|
||||||
<activity android:name="net.osmand.plus.activities.ContributionVersionActivity" android:configChanges="keyboardHidden|orientation" android:label="@string/contribution_activity" />
|
android:configChanges="keyboardHidden|orientation" />
|
||||||
|
<activity
|
||||||
|
android:name=".development.SettingsDevelopmentActivity"
|
||||||
<activity android:name="net.osmand.plus.osmo.SettingsOsMoActivity" android:configChanges="keyboardHidden|orientation" />
|
android:configChanges="keyboardHidden|orientation" />
|
||||||
<activity android:name="net.osmand.plus.osmo.OsMoGroupsActivity">
|
<activity
|
||||||
|
android:name=".audionotes.SettingsAudioVideoActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation" />
|
||||||
|
<activity
|
||||||
|
android:name="net.osmand.access.SettingsAccessibilityActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation" />
|
||||||
|
<activity
|
||||||
|
android:name=".activities.search.SearchActivity"
|
||||||
|
android:label="@string/search_activity" />
|
||||||
|
<activity
|
||||||
|
android:name=".activities.ShowRouteInfoActivity"
|
||||||
|
android:label="@string/show_route" />
|
||||||
|
<activity
|
||||||
|
android:name=".activities.FavoritesListActivity"
|
||||||
|
android:label="@string/favourites_list_activity" />
|
||||||
|
<activity
|
||||||
|
android:name=".myplaces.FavoritesActivity"
|
||||||
|
android:windowSoftInputMode="adjustPan" />
|
||||||
|
<activity android:name=".activities.TrackActivity" />
|
||||||
|
<activity android:name=".activities.PluginsActivity" />
|
||||||
|
<activity android:name=".activities.PluginActivity" />
|
||||||
|
<activity
|
||||||
|
android:name=".activities.ContributionVersionActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation"
|
||||||
|
android:label="@string/contribution_activity" />
|
||||||
|
<activity
|
||||||
|
android:name=".osmo.SettingsOsMoActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation" />
|
||||||
|
<activity android:name=".osmo.OsMoGroupsActivity" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<data android:scheme="http" android:host="z.osmo.mobi" />
|
<data
|
||||||
|
android:host="z.osmo.mobi"
|
||||||
|
android:scheme="http" />
|
||||||
|
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
<activity
|
||||||
<activity android:name="net.osmand.plus.activities.search.SearchPOIActivity" android:label="@string/searchpoi_activity" />
|
android:name=".activities.search.SearchPOIActivity"
|
||||||
<activity android:name="net.osmand.plus.activities.search.SearchAddressActivity" android:label="@string/select_address_activity" />
|
android:label="@string/searchpoi_activity" />
|
||||||
<activity android:name="net.osmand.plus.activities.search.SearchCityByNameActivity" />
|
<activity
|
||||||
<activity android:name="net.osmand.plus.activities.search.SearchRegionByNameActivity" />
|
android:name=".activities.search.SearchAddressActivity"
|
||||||
<activity android:name="net.osmand.plus.activities.search.SearchStreetByNameActivity" />
|
android:label="@string/select_address_activity" />
|
||||||
<activity android:name="net.osmand.plus.activities.search.SearchStreet2ByNameActivity" />
|
<activity android:name=".activities.search.SearchCityByNameActivity" />
|
||||||
<activity android:name="net.osmand.plus.activities.search.SearchBuildingByNameActivity" />
|
<activity android:name=".activities.search.SearchRegionByNameActivity" />
|
||||||
<activity android:name="net.osmand.plus.sherpafy.TourViewActivity" android:exported="true"
|
<activity android:name=".activities.search.SearchStreetByNameActivity" />
|
||||||
android:launchMode= "singleInstance" android:label="Sherpafy" />
|
<activity android:name=".activities.search.SearchStreet2ByNameActivity" />
|
||||||
<activity android:name="net.osmand.plus.activities.EditPOIFilterActivity" />
|
<activity android:name=".activities.search.SearchBuildingByNameActivity" />
|
||||||
|
<activity
|
||||||
<activity android:name="net.osmand.plus.activities.search.GeoIntentActivity" android:label="@string/app_name">
|
android:name=".sherpafy.TourViewActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:label="Sherpafy"
|
||||||
|
android:launchMode="singleInstance" />
|
||||||
|
<activity android:name=".activities.EditPOIFilterActivity" />
|
||||||
|
<activity
|
||||||
|
android:name=".activities.search.GeoIntentActivity"
|
||||||
|
android:label="@string/app_name" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<data android:scheme="osmand.geo" />
|
<data android:scheme="osmand.geo" />
|
||||||
|
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<data android:scheme="geo" />
|
<data android:scheme="geo" />
|
||||||
|
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
@ -219,28 +372,54 @@
|
||||||
<data android:host="map.wap.qq.com" />
|
<data android:host="map.wap.qq.com" />
|
||||||
<data android:host="map.qq.com" />
|
<data android:host="map.qq.com" />
|
||||||
<data android:host="maps.apple.com" />
|
<data android:host="maps.apple.com" />
|
||||||
|
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<data android:scheme="http" android:host="www.google.com" android:pathPrefix="/maps" />
|
<data
|
||||||
<data android:scheme="https" android:host="www.google.com" android:pathPrefix="/maps" />
|
android:host="www.google.com"
|
||||||
|
android:pathPrefix="/maps"
|
||||||
|
android:scheme="http" />
|
||||||
|
<data
|
||||||
|
android:host="www.google.com"
|
||||||
|
android:pathPrefix="/maps"
|
||||||
|
android:scheme="https" />
|
||||||
|
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<data android:scheme="http" android:host="openstreetmap.de" android:pathPrefix="/karte" />
|
<data
|
||||||
<data android:scheme="https" android:host="openstreetmap.de" android:pathPrefix="/karte" />
|
android:host="openstreetmap.de"
|
||||||
|
android:pathPrefix="/karte"
|
||||||
|
android:scheme="http" />
|
||||||
|
<data
|
||||||
|
android:host="openstreetmap.de"
|
||||||
|
android:pathPrefix="/karte"
|
||||||
|
android:scheme="https" />
|
||||||
|
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<data android:scheme="http" android:host="download.osmand.net" android:pathPrefix="/go" />
|
<data
|
||||||
<data android:scheme="http" android:host="download.osmand.net" android:pathPrefix="go" />
|
android:host="download.osmand.net"
|
||||||
|
android:pathPrefix="/go"
|
||||||
|
android:scheme="http" />
|
||||||
|
<data
|
||||||
|
android:host="download.osmand.net"
|
||||||
|
android:pathPrefix="go"
|
||||||
|
android:scheme="http" />
|
||||||
|
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
<category android:name="android.intent.category.APP_MAPS" />
|
<category android:name="android.intent.category.APP_MAPS" />
|
||||||
|
@ -257,26 +436,28 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
-->
|
-->
|
||||||
</activity>
|
</activity>
|
||||||
|
<activity android:name=".development.TestVoiceActivity" />
|
||||||
<activity android:name="net.osmand.plus.development.TestVoiceActivity" />
|
<activity
|
||||||
<activity android:name="net.osmand.plus.download.DownloadActivity" android:label="" />
|
android:name=".download.DownloadActivity"
|
||||||
|
android:label="" />
|
||||||
|
|
||||||
<!-- keep android:process on a separate line !! -->
|
<!-- keep android:process on a separate line !! -->
|
||||||
<service
|
<service
|
||||||
android:process="net.osmand.plus"
|
android:name=".NavigationService"
|
||||||
android:label="@string/process_navigation_service"
|
android:label="@string/process_navigation_service"
|
||||||
android:name="net.osmand.plus.NavigationService"
|
android:process="net.osmand.plus"
|
||||||
android:stopWithTask="false" >
|
android:stopWithTask="false" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="net.osmand.plus.NavigationService" />
|
<action android:name="net.osmand.plus.NavigationService" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<receiver android:name="net.osmand.plus.OnNavigationServiceAlarmReceiver" />
|
<receiver android:name=".OnNavigationServiceAlarmReceiver" />
|
||||||
<activity android:name="net.osmand.plus.activities.PrintDialogActivity" />
|
|
||||||
|
<activity android:name=".activities.PrintDialogActivity" />
|
||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
android:name="net.osmand.plus.DeviceAdminRecv"
|
android:name=".DeviceAdminRecv"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:permission="android.permission.BIND_DEVICE_ADMIN" >
|
android:permission="android.permission.BIND_DEVICE_ADMIN" >
|
||||||
<meta-data
|
<meta-data
|
||||||
|
@ -288,5 +469,9 @@
|
||||||
<action android:name="android.app.action.DEVICE_ADMIN_DISABLED" />
|
<action android:name="android.app.action.DEVICE_ADMIN_DISABLED" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
|
<activity android:name=".activities.AppCompatPreferenceActivity" >
|
||||||
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package net.osmand.access;
|
package net.osmand.access;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.Context;
|
|
||||||
|
|
||||||
// Since usual message in an AlertDialog that is set by
|
// Since usual message in an AlertDialog that is set by
|
||||||
// AlertDialog.Builder.setMessage() is spoken only once
|
// AlertDialog.Builder.setMessage() is spoken only once
|
||||||
|
@ -17,7 +18,7 @@ import android.content.Context;
|
||||||
// or system accessibility service is turned off this class
|
// or system accessibility service is turned off this class
|
||||||
// acts just identical to it's direct parent.
|
// acts just identical to it's direct parent.
|
||||||
//
|
//
|
||||||
public class AccessibleAlertBuilder extends Builder {
|
public class AccessibleAlertBuilder extends AlertDialog.Builder {
|
||||||
|
|
||||||
// The method getContext() is only available
|
// The method getContext() is only available
|
||||||
// starting from API level 11, so store it here.
|
// starting from API level 11, so store it here.
|
||||||
|
@ -33,14 +34,14 @@ public class AccessibleAlertBuilder extends Builder {
|
||||||
// Provided setMessage() alternatives.
|
// Provided setMessage() alternatives.
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder setMessage(CharSequence msg) {
|
public AlertDialog.Builder setMessage(CharSequence msg) {
|
||||||
if (((OsmandApplication) context.getApplicationContext()).accessibilityExtensions())
|
if (((OsmandApplication) context.getApplicationContext()).accessibilityExtensions())
|
||||||
return setView(TextMessage.makeView(context, msg, R.layout.alert));
|
return setView(TextMessage.makeView(context, msg, R.layout.alert));
|
||||||
return super.setMessage(msg);
|
return super.setMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder setMessage(int msgid) {
|
public AlertDialog.Builder setMessage(int msgid) {
|
||||||
if (((OsmandApplication) context.getApplicationContext()).accessibilityExtensions())
|
if (((OsmandApplication) context.getApplicationContext()).accessibilityExtensions())
|
||||||
return setView(TextMessage.makeView(context, msgid, R.layout.alert));
|
return setView(TextMessage.makeView(context, msgid, R.layout.alert));
|
||||||
return super.setMessage(msgid);
|
return super.setMessage(msgid);
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package net.osmand.access;
|
package net.osmand.access;
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import android.content.Context;
|
||||||
import java.util.List;
|
import android.content.DialogInterface;
|
||||||
|
import android.os.SystemClock;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
import net.osmand.Location;
|
import net.osmand.Location;
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
|
@ -12,10 +14,9 @@ import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
||||||
import net.osmand.plus.access.RelativeDirectionStyle;
|
import net.osmand.plus.access.RelativeDirectionStyle;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.Context;
|
import java.util.ArrayList;
|
||||||
import android.content.DialogInterface;
|
import java.util.List;
|
||||||
import android.os.SystemClock;
|
|
||||||
|
|
||||||
public class NavigationInfo {
|
public class NavigationInfo {
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package net.osmand.plus;
|
package net.osmand.plus;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
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.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
import net.osmand.IProgress;
|
import net.osmand.IProgress;
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
|
|
|
@ -1,5 +1,18 @@
|
||||||
package net.osmand.plus;
|
package net.osmand.plus;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
|
import net.osmand.PlatformUtil;
|
||||||
|
import net.osmand.data.FavouritePoint;
|
||||||
|
import net.osmand.plus.GPXUtilities.GPXFile;
|
||||||
|
import net.osmand.plus.GPXUtilities.WptPt;
|
||||||
|
import net.osmand.plus.api.SQLiteAPI.SQLiteConnection;
|
||||||
|
import net.osmand.plus.api.SQLiteAPI.SQLiteCursor;
|
||||||
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
|
import org.apache.tools.bzip2.CBZip2OutputStream;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
|
@ -12,19 +25,6 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import net.osmand.PlatformUtil;
|
|
||||||
import net.osmand.data.FavouritePoint;
|
|
||||||
import net.osmand.plus.GPXUtilities.GPXFile;
|
|
||||||
import net.osmand.plus.GPXUtilities.WptPt;
|
|
||||||
import net.osmand.plus.api.SQLiteAPI.SQLiteConnection;
|
|
||||||
import net.osmand.plus.api.SQLiteAPI.SQLiteCursor;
|
|
||||||
import net.osmand.util.Algorithms;
|
|
||||||
|
|
||||||
import org.apache.tools.bzip2.CBZip2OutputStream;
|
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.Context;
|
|
||||||
|
|
||||||
public class FavouritesDbHelper {
|
public class FavouritesDbHelper {
|
||||||
|
|
||||||
public interface FavoritesUpdatedListener {
|
public interface FavoritesUpdatedListener {
|
||||||
|
|
|
@ -1,24 +1,5 @@
|
||||||
package net.osmand.plus;
|
package net.osmand.plus;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.osmand.GeoidAltitudeCorrection;
|
|
||||||
import net.osmand.PlatformUtil;
|
|
||||||
import net.osmand.ResultMatcher;
|
|
||||||
import net.osmand.access.NavigationInfo;
|
|
||||||
import net.osmand.binary.RouteDataObject;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.data.QuadPoint;
|
|
||||||
import net.osmand.plus.OsmandSettings.OsmandPreference;
|
|
||||||
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
|
||||||
import net.osmand.plus.routing.RoutingHelper;
|
|
||||||
import net.osmand.router.RouteSegmentResult;
|
|
||||||
import net.osmand.util.MapUtils;
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
@ -36,8 +17,28 @@ import android.location.LocationManager;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import net.osmand.GeoidAltitudeCorrection;
|
||||||
|
import net.osmand.PlatformUtil;
|
||||||
|
import net.osmand.ResultMatcher;
|
||||||
|
import net.osmand.access.NavigationInfo;
|
||||||
|
import net.osmand.binary.RouteDataObject;
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.data.QuadPoint;
|
||||||
|
import net.osmand.plus.OsmandSettings.OsmandPreference;
|
||||||
|
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
||||||
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
|
import net.osmand.router.RouteSegmentResult;
|
||||||
|
import net.osmand.util.MapUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class OsmAndLocationProvider implements SensorEventListener {
|
public class OsmAndLocationProvider implements SensorEventListener {
|
||||||
|
|
||||||
private static final String SIMULATED_PROVIDER = "OsmAnd";
|
private static final String SIMULATED_PROVIDER = "OsmAnd";
|
||||||
|
|
|
@ -1,18 +1,9 @@
|
||||||
package net.osmand.plus;
|
package net.osmand.plus;
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.osmand.CallbackWithObject;
|
|
||||||
import net.osmand.Location;
|
|
||||||
import net.osmand.access.AccessibleToast;
|
|
||||||
import net.osmand.plus.helpers.GpxUiHelper;
|
|
||||||
import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||||
|
@ -22,6 +13,15 @@ import android.widget.SeekBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import net.osmand.CallbackWithObject;
|
||||||
|
import net.osmand.Location;
|
||||||
|
import net.osmand.access.AccessibleToast;
|
||||||
|
import net.osmand.plus.helpers.GpxUiHelper;
|
||||||
|
import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class OsmAndLocationSimulation {
|
public class OsmAndLocationSimulation {
|
||||||
|
|
||||||
private Thread routeAnimation;
|
private Thread routeAnimation;
|
||||||
|
@ -53,7 +53,7 @@ public class OsmAndLocationSimulation {
|
||||||
|
|
||||||
public void startStopRouteAnimation(final Activity ma, final Runnable runnable) {
|
public void startStopRouteAnimation(final Activity ma, final Runnable runnable) {
|
||||||
if (!isRouteAnimating()) {
|
if (!isRouteAnimating()) {
|
||||||
Builder builder = new AlertDialog.Builder(ma);
|
AlertDialog.Builder builder = new AlertDialog.Builder(ma);
|
||||||
builder.setTitle(R.string.animate_route);
|
builder.setTitle(R.string.animate_route);
|
||||||
|
|
||||||
final View view = ma.getLayoutInflater().inflate(R.layout.animate_route, null);
|
final View view = ma.getLayoutInflater().inflate(R.layout.animate_route, null);
|
||||||
|
|
|
@ -2,8 +2,6 @@ package net.osmand.plus;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlarmManager;
|
import android.app.AlarmManager;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
@ -16,6 +14,7 @@ import android.os.AsyncTask;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.text.format.DateFormat;
|
import android.text.format.DateFormat;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -342,7 +341,7 @@ public class OsmandApplication extends Application {
|
||||||
String voiceProvider = osmandSettings.VOICE_PROVIDER.get();
|
String voiceProvider = osmandSettings.VOICE_PROVIDER.get();
|
||||||
if (voiceProvider == null || OsmandSettings.VOICE_PROVIDER_NOT_USE.equals(voiceProvider)) {
|
if (voiceProvider == null || OsmandSettings.VOICE_PROVIDER_NOT_USE.equals(voiceProvider)) {
|
||||||
if (warningNoneProvider && voiceProvider == null) {
|
if (warningNoneProvider && voiceProvider == null) {
|
||||||
Builder builder = new AccessibleAlertBuilder(uiContext);
|
AlertDialog.Builder builder = new AccessibleAlertBuilder(uiContext);
|
||||||
LinearLayout ll = new LinearLayout(uiContext);
|
LinearLayout ll = new LinearLayout(uiContext);
|
||||||
ll.setOrientation(LinearLayout.VERTICAL);
|
ll.setOrientation(LinearLayout.VERTICAL);
|
||||||
final TextView tv = new TextView(uiContext);
|
final TextView tv = new TextView(uiContext);
|
||||||
|
@ -408,7 +407,7 @@ public class OsmandApplication extends Application {
|
||||||
|
|
||||||
public synchronized void closeApplication(final Activity activity) {
|
public synchronized void closeApplication(final Activity activity) {
|
||||||
if (getNavigationService() != null) {
|
if (getNavigationService() != null) {
|
||||||
Builder bld = new AlertDialog.Builder(activity);
|
AlertDialog.Builder bld = new AlertDialog.Builder(activity);
|
||||||
bld.setMessage(R.string.background_service_is_enabled_question);
|
bld.setMessage(R.string.background_service_is_enabled_question);
|
||||||
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.OsmandSettings;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.os.Build.VERSION;
|
import android.os.Build.VERSION;
|
||||||
import android.os.Build.VERSION_CODES;
|
import android.os.Build.VERSION_CODES;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceActivity;
|
|
||||||
import android.support.v4.view.ViewCompat;
|
import android.support.v4.view.ViewCompat;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
|
@ -15,7 +11,11 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
|
|
||||||
public abstract class ActionBarPreferenceActivity extends PreferenceActivity {
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
|
||||||
|
public abstract class ActionBarPreferenceActivity extends AppCompatPreferenceActivity {
|
||||||
private Toolbar tb;
|
private Toolbar tb;
|
||||||
private View shadowView;
|
private View shadowView;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,108 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package net.osmand.plus.activities;
|
||||||
|
import android.content.res.Configuration;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.preference.PreferenceActivity;
|
||||||
|
import android.support.annotation.LayoutRes;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.v7.app.ActionBar;
|
||||||
|
import android.support.v7.app.AppCompatDelegate;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.view.MenuInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
/**
|
||||||
|
* A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls
|
||||||
|
* to be used with AppCompat.
|
||||||
|
*
|
||||||
|
* This technique can be used with an {@link android.app.Activity} class, not just
|
||||||
|
* {@link android.preference.PreferenceActivity}.
|
||||||
|
*/
|
||||||
|
public abstract class AppCompatPreferenceActivity extends PreferenceActivity {
|
||||||
|
private AppCompatDelegate mDelegate;
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
getDelegate().installViewFactory();
|
||||||
|
getDelegate().onCreate(savedInstanceState);
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void onPostCreate(Bundle savedInstanceState) {
|
||||||
|
super.onPostCreate(savedInstanceState);
|
||||||
|
getDelegate().onPostCreate(savedInstanceState);
|
||||||
|
}
|
||||||
|
public ActionBar getSupportActionBar() {
|
||||||
|
return getDelegate().getSupportActionBar();
|
||||||
|
}
|
||||||
|
public void setSupportActionBar(@Nullable Toolbar toolbar) {
|
||||||
|
getDelegate().setSupportActionBar(toolbar);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public MenuInflater getMenuInflater() {
|
||||||
|
return getDelegate().getMenuInflater();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void setContentView(@LayoutRes int layoutResID) {
|
||||||
|
getDelegate().setContentView(layoutResID);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void setContentView(View view) {
|
||||||
|
getDelegate().setContentView(view);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void setContentView(View view, ViewGroup.LayoutParams params) {
|
||||||
|
getDelegate().setContentView(view, params);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void addContentView(View view, ViewGroup.LayoutParams params) {
|
||||||
|
getDelegate().addContentView(view, params);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void onPostResume() {
|
||||||
|
super.onPostResume();
|
||||||
|
getDelegate().onPostResume();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void onTitleChanged(CharSequence title, int color) {
|
||||||
|
super.onTitleChanged(title, color);
|
||||||
|
getDelegate().setTitle(title);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onConfigurationChanged(Configuration newConfig) {
|
||||||
|
super.onConfigurationChanged(newConfig);
|
||||||
|
getDelegate().onConfigurationChanged(newConfig);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
getDelegate().onStop();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
getDelegate().onDestroy();
|
||||||
|
}
|
||||||
|
public void invalidateOptionsMenu() {
|
||||||
|
getDelegate().invalidateOptionsMenu();
|
||||||
|
}
|
||||||
|
private AppCompatDelegate getDelegate() {
|
||||||
|
if (mDelegate == null) {
|
||||||
|
mDelegate = AppCompatDelegate.create(this, null);
|
||||||
|
}
|
||||||
|
return mDelegate;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,16 +1,19 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
import java.io.File;
|
import android.app.ProgressDialog;
|
||||||
import java.io.FileOutputStream;
|
import android.content.DialogInterface;
|
||||||
import java.io.InputStream;
|
import android.content.Intent;
|
||||||
import java.net.URL;
|
import android.net.Uri;
|
||||||
import java.net.URLConnection;
|
import android.os.Bundle;
|
||||||
import java.text.MessageFormat;
|
import android.support.v7.app.AlertDialog;
|
||||||
import java.text.ParseException;
|
import android.view.LayoutInflater;
|
||||||
import java.text.SimpleDateFormat;
|
import android.view.View;
|
||||||
import java.util.ArrayList;
|
import android.view.ViewGroup;
|
||||||
import java.util.Date;
|
import android.widget.AdapterView;
|
||||||
import java.util.List;
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.Filterable;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
|
@ -20,21 +23,16 @@ import net.osmand.plus.R;
|
||||||
import org.xmlpull.v1.XmlPullParser;
|
import org.xmlpull.v1.XmlPullParser;
|
||||||
import org.xmlpull.v1.XmlPullParserFactory;
|
import org.xmlpull.v1.XmlPullParserFactory;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import java.io.File;
|
||||||
import android.app.AlertDialog.Builder;
|
import java.io.FileOutputStream;
|
||||||
import android.app.ProgressDialog;
|
import java.io.InputStream;
|
||||||
import android.content.DialogInterface;
|
import java.net.URLConnection;
|
||||||
import android.content.Intent;
|
import java.text.MessageFormat;
|
||||||
import android.net.Uri;
|
import java.text.ParseException;
|
||||||
import android.os.Bundle;
|
import java.text.SimpleDateFormat;
|
||||||
import android.view.LayoutInflater;
|
import java.util.ArrayList;
|
||||||
import android.view.View;
|
import java.util.Date;
|
||||||
import android.view.ViewGroup;
|
import java.util.List;
|
||||||
import android.widget.AdapterView;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.Filterable;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
public class ContributionVersionActivity extends OsmandListActivity {
|
public class ContributionVersionActivity extends OsmandListActivity {
|
||||||
|
|
||||||
|
@ -210,7 +208,7 @@ public class ContributionVersionActivity extends OsmandListActivity {
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
final OsmAndBuild item = (OsmAndBuild) getListAdapter().getItem(position);
|
final OsmAndBuild item = (OsmAndBuild) getListAdapter().getItem(position);
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setMessage(MessageFormat.format(getString(R.string.install_selected_build), item.tag,
|
builder.setMessage(MessageFormat.format(getString(R.string.install_selected_build), item.tag,
|
||||||
AndroidUtils.formatDateTime(getMyApplication(), item.date.getTime()), item.size));
|
AndroidUtils.formatDateTime(getMyApplication(), item.date.getTime()), item.size));
|
||||||
builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import android.app.ProgressDialog;
|
||||||
import java.util.ArrayList;
|
import android.content.Context;
|
||||||
import java.util.List;
|
import android.content.DialogInterface;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.SeekBar;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
|
@ -23,18 +29,8 @@ import net.osmand.util.MapUtils;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import java.text.MessageFormat;
|
||||||
import android.app.AlertDialog.Builder;
|
import java.util.List;
|
||||||
import android.app.ProgressDialog;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.graphics.Rect;
|
|
||||||
import android.graphics.RectF;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.SeekBar;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
public class DownloadTilesDialog {
|
public class DownloadTilesDialog {
|
||||||
|
|
||||||
|
@ -67,7 +63,7 @@ public class DownloadTilesDialog {
|
||||||
final int zoom = rb.getZoom();
|
final int zoom = rb.getZoom();
|
||||||
|
|
||||||
// calculate pixel rectangle
|
// calculate pixel rectangle
|
||||||
Builder builder = new AlertDialog.Builder(ctx);
|
AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
|
||||||
LayoutInflater inflater = (LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
LayoutInflater inflater = (LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
View view = inflater.inflate(R.layout.download_tiles, null);
|
View view = inflater.inflate(R.layout.download_tiles, null);
|
||||||
|
|
||||||
|
|
|
@ -4,27 +4,10 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
|
|
||||||
import java.text.Collator;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.LinkedHashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import net.osmand.osm.PoiCategory;
|
|
||||||
import net.osmand.osm.PoiType;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.poi.PoiFiltersHelper;
|
|
||||||
import net.osmand.plus.poi.PoiUIFilter;
|
|
||||||
import net.osmand.util.Algorithms;
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.view.MenuItemCompat;
|
import android.support.v4.view.MenuItemCompat;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
@ -35,9 +18,25 @@ import android.widget.AdapterView;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.ScrollView;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import net.osmand.osm.PoiCategory;
|
||||||
|
import net.osmand.osm.PoiType;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.poi.PoiFiltersHelper;
|
||||||
|
import net.osmand.plus.poi.PoiUIFilter;
|
||||||
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
|
import java.text.Collator;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -112,7 +111,7 @@ public class EditPOIFilterActivity extends OsmandListActivity {
|
||||||
final int index = lv.getFirstVisiblePosition();
|
final int index = lv.getFirstVisiblePosition();
|
||||||
View v = lv.getChildAt(0);
|
View v = lv.getChildAt(0);
|
||||||
final int top = (v == null) ? 0 : v.getTop();
|
final int top = (v == null) ? 0 : v.getTop();
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
final LinkedHashMap<String, String> subCategories = new LinkedHashMap<String, String>();
|
final LinkedHashMap<String, String> subCategories = new LinkedHashMap<String, String>();
|
||||||
Set<String> acceptedCategories = filter.getAcceptedSubtypes(poiCategory);
|
Set<String> acceptedCategories = filter.getAcceptedSubtypes(poiCategory);
|
||||||
if (acceptedCategories != null) {
|
if (acceptedCategories != null) {
|
||||||
|
|
|
@ -1,16 +1,39 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
import gnu.trove.list.array.TIntArrayList;
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
import java.io.File;
|
import android.content.DialogInterface;
|
||||||
import java.text.MessageFormat;
|
import android.content.Intent;
|
||||||
import java.util.ArrayList;
|
import android.content.res.Resources;
|
||||||
import java.util.HashSet;
|
import android.graphics.PorterDuff;
|
||||||
import java.util.LinkedHashMap;
|
import android.graphics.Typeface;
|
||||||
import java.util.LinkedHashSet;
|
import android.graphics.drawable.Drawable;
|
||||||
import java.util.List;
|
import android.net.Uri;
|
||||||
import java.util.Map;
|
import android.os.AsyncTask;
|
||||||
import java.util.Set;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.support.v4.app.FragmentActivity;
|
||||||
|
import android.support.v4.view.MenuItemCompat;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.support.v7.view.ActionMode;
|
||||||
|
import android.support.v7.widget.SearchView;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuInflater;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.AutoCompleteTextView;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ExpandableListView;
|
||||||
|
import android.widget.Filter;
|
||||||
|
import android.widget.Filterable;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.Spinner;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
import net.osmand.data.FavouritePoint;
|
import net.osmand.data.FavouritePoint;
|
||||||
|
@ -32,41 +55,18 @@ import net.osmand.plus.helpers.ColorDialogs;
|
||||||
import net.osmand.plus.myplaces.FavoritesActivity;
|
import net.osmand.plus.myplaces.FavoritesActivity;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
import net.osmand.util.MapUtils;
|
import net.osmand.util.MapUtils;
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.AlertDialog;
|
import java.io.File;
|
||||||
import android.app.AlertDialog.Builder;
|
import java.text.MessageFormat;
|
||||||
import android.content.Context;
|
import java.util.ArrayList;
|
||||||
import android.content.DialogInterface;
|
import java.util.HashSet;
|
||||||
import android.content.Intent;
|
import java.util.LinkedHashMap;
|
||||||
import android.content.res.Resources;
|
import java.util.LinkedHashSet;
|
||||||
import android.graphics.PorterDuff;
|
import java.util.List;
|
||||||
import android.graphics.Typeface;
|
import java.util.Map;
|
||||||
import android.graphics.drawable.Drawable;
|
import java.util.Set;
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.AsyncTask;
|
import gnu.trove.list.array.TIntArrayList;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Handler;
|
|
||||||
import android.support.v4.app.FragmentActivity;
|
|
||||||
import android.support.v4.view.MenuItemCompat;
|
|
||||||
import android.support.v7.view.ActionMode;
|
|
||||||
import android.support.v7.widget.SearchView;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.Menu;
|
|
||||||
import android.view.MenuInflater;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.AutoCompleteTextView;
|
|
||||||
import android.widget.CheckBox;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.ExpandableListView;
|
|
||||||
import android.widget.Filter;
|
|
||||||
import android.widget.Filterable;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.Spinner;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
|
|
||||||
public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
|
@ -188,7 +188,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
|
|
||||||
public static boolean editPoint(final Context ctx, final FavouritePoint point, final Runnable callback) {
|
public static boolean editPoint(final Context ctx, final FavouritePoint point, final Runnable callback) {
|
||||||
OsmandApplication app = (OsmandApplication) ctx.getApplicationContext();
|
OsmandApplication app = (OsmandApplication) ctx.getApplicationContext();
|
||||||
final Builder builder = new AlertDialog.Builder(ctx);
|
final AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
|
||||||
builder.setTitle(R.string.favourites_context_menu_edit);
|
builder.setTitle(R.string.favourites_context_menu_edit);
|
||||||
final View v = LayoutInflater.from(ctx).inflate(R.layout.favorite_edit_dialog,
|
final View v = LayoutInflater.from(ctx).inflate(R.layout.favorite_edit_dialog,
|
||||||
null, false);
|
null, false);
|
||||||
|
@ -247,7 +247,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
|
|
||||||
private boolean deletePoint(final FavouritePoint point) {
|
private boolean deletePoint(final FavouritePoint point) {
|
||||||
final Resources resources = this.getResources();
|
final Resources resources = this.getResources();
|
||||||
Builder builder = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
builder.setMessage(getString(R.string.favourites_remove_dialog_msg, point.getName()));
|
builder.setMessage(getString(R.string.favourites_remove_dialog_msg, point.getName()));
|
||||||
builder.setNegativeButton(R.string.shared_string_no, null);
|
builder.setNegativeButton(R.string.shared_string_no, null);
|
||||||
builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||||
|
@ -295,7 +295,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
final TargetPointsHelper targetPointsHelper = getMyApplication().getTargetPointsHelper();
|
final TargetPointsHelper targetPointsHelper = getMyApplication().getTargetPointsHelper();
|
||||||
if (targetPointsHelper.getIntermediatePoints().size() > 0) {
|
if (targetPointsHelper.getIntermediatePoints().size() > 0) {
|
||||||
final FragmentActivity act = getActivity();
|
final FragmentActivity act = getActivity();
|
||||||
Builder builder = new AlertDialog.Builder(act);
|
AlertDialog.Builder builder = new AlertDialog.Builder(act);
|
||||||
builder.setTitle(R.string.new_directions_point_dialog);
|
builder.setTitle(R.string.new_directions_point_dialog);
|
||||||
builder.setItems(
|
builder.setItems(
|
||||||
new String[] { act.getString(R.string.keep_intermediate_points),
|
new String[] { act.getString(R.string.keep_intermediate_points),
|
||||||
|
@ -491,7 +491,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void openChangeGroupDialog(final FavoriteGroup group) {
|
protected void openChangeGroupDialog(final FavoriteGroup group) {
|
||||||
Builder builder = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
View view = getActivity().getLayoutInflater().inflate(R.layout.fav_group_edit, null);
|
View view = getActivity().getLayoutInflater().inflate(R.layout.fav_group_edit, null);
|
||||||
|
|
||||||
final EditText nameEditText = (EditText) view.findViewById(R.id.nameEditText);
|
final EditText nameEditText = (EditText) view.findViewById(R.id.nameEditText);
|
||||||
|
@ -532,7 +532,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
private void deleteFavoritesAction() {
|
private void deleteFavoritesAction() {
|
||||||
if (groupsToDelete.size() + favoritesSelected.size() > 0) {
|
if (groupsToDelete.size() + favoritesSelected.size() > 0) {
|
||||||
|
|
||||||
Builder b = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder b = new AlertDialog.Builder(getActivity());
|
||||||
b.setMessage(getString(R.string.favorite_delete_multiple, favoritesSelected.size(), groupsToDelete.size()));
|
b.setMessage(getString(R.string.favorite_delete_multiple, favoritesSelected.size(), groupsToDelete.size()));
|
||||||
b.setPositiveButton(R.string.shared_string_delete, new DialogInterface.OnClickListener() {
|
b.setPositiveButton(R.string.shared_string_delete, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -615,7 +615,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (tosave.exists()) {
|
if (tosave.exists()) {
|
||||||
Builder bld = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder bld = new AlertDialog.Builder(getActivity());
|
||||||
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
|
|
@ -1,29 +1,12 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
import gnu.trove.list.array.TIntArrayList;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.osmand.Location;
|
|
||||||
import net.osmand.TspAnt;
|
|
||||||
import net.osmand.access.AccessibleAlertBuilder;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.TargetPointsHelper;
|
|
||||||
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
|
||||||
import net.osmand.util.MapUtils;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.DialogInterface.OnShowListener;
|
import android.content.DialogInterface.OnShowListener;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
|
@ -38,6 +21,23 @@ import android.widget.ListView;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import net.osmand.Location;
|
||||||
|
import net.osmand.TspAnt;
|
||||||
|
import net.osmand.access.AccessibleAlertBuilder;
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.TargetPointsHelper;
|
||||||
|
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
||||||
|
import net.osmand.util.MapUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import gnu.trove.list.array.TIntArrayList;
|
||||||
|
|
||||||
public class IntermediatePointsDialog {
|
public class IntermediatePointsDialog {
|
||||||
|
|
||||||
public static void openIntermediatePointsDialog(final Activity activity,
|
public static void openIntermediatePointsDialog(final Activity activity,
|
||||||
|
@ -86,7 +86,7 @@ public class IntermediatePointsDialog {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Builder builder = new AccessibleAlertBuilder(activity);
|
AlertDialog.Builder builder = new AccessibleAlertBuilder(activity);
|
||||||
builder.setView(contentView);
|
builder.setView(contentView);
|
||||||
builder.setInverseBackgroundForced(true);
|
builder.setInverseBackgroundForced(true);
|
||||||
lv.setBackgroundColor(Color.WHITE);
|
lv.setBackgroundColor(Color.WHITE);
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -20,6 +19,7 @@ import android.widget.EditText;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.londatiga.android.ActionItem;
|
import net.londatiga.android.ActionItem;
|
||||||
import net.londatiga.android.QuickAction;
|
import net.londatiga.android.QuickAction;
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
|
@ -111,7 +111,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
|
|
||||||
getMyApplication().getAppCustomization().prepareLocationMenu(mapActivity, adapter);
|
getMyApplication().getAppCustomization().prepareLocationMenu(mapActivity, adapter);
|
||||||
|
|
||||||
final Builder builder = new AlertDialog.Builder(mapActivity);
|
final AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity);
|
||||||
builder.setTitle(R.string.get_directions);
|
builder.setTitle(R.string.get_directions);
|
||||||
final ArrayAdapter<?> listAdapter =
|
final ArrayAdapter<?> listAdapter =
|
||||||
adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent());
|
adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent());
|
||||||
|
@ -193,7 +193,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dialog createAddWaypointDialog(final Bundle args) {
|
private Dialog createAddWaypointDialog(final Bundle args) {
|
||||||
Builder builder = new AlertDialog.Builder(mapActivity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity);
|
||||||
builder.setTitle(R.string.add_waypoint_dialog_title);
|
builder.setTitle(R.string.add_waypoint_dialog_title);
|
||||||
View view = mapActivity.getLayoutInflater().inflate(R.layout.add_gpx_point_dialog, null);
|
View view = mapActivity.getLayoutInflater().inflate(R.layout.add_gpx_point_dialog, null);
|
||||||
final EditText editText = (EditText) view.findViewById(android.R.id.edit);
|
final EditText editText = (EditText) view.findViewById(android.R.id.edit);
|
||||||
|
@ -344,7 +344,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
OsmandPlugin.registerMapContextMenu(mapActivity, latitude, longitude, adapter, selectedObj);
|
OsmandPlugin.registerMapContextMenu(mapActivity, latitude, longitude, adapter, selectedObj);
|
||||||
getMyApplication().getAppCustomization().prepareLocationMenu(mapActivity, adapter);
|
getMyApplication().getAppCustomization().prepareLocationMenu(mapActivity, adapter);
|
||||||
|
|
||||||
final Builder builder = new AlertDialog.Builder(mapActivity);
|
final AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity);
|
||||||
final ArrayAdapter<?> listAdapter =
|
final ArrayAdapter<?> listAdapter =
|
||||||
adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent());
|
adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent());
|
||||||
builder.setAdapter(listAdapter, new DialogInterface.OnClickListener() {
|
builder.setAdapter(listAdapter, new DialogInterface.OnClickListener() {
|
||||||
|
@ -410,7 +410,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gpxFiles.size() > 0 && !useCurrentGPX) {
|
if (gpxFiles.size() > 0 && !useCurrentGPX) {
|
||||||
Builder bld = new AlertDialog.Builder(mapActivity);
|
AlertDialog.Builder bld = new AlertDialog.Builder(mapActivity);
|
||||||
if (gpxFiles.size() == 1) {
|
if (gpxFiles.size() == 1) {
|
||||||
bld.setMessage(R.string.use_displayed_track_for_navigation);
|
bld.setMessage(R.string.use_displayed_track_for_navigation);
|
||||||
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||||
|
@ -522,7 +522,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dialog createReloadTitleDialog(final Bundle args) {
|
private Dialog createReloadTitleDialog(final Bundle args) {
|
||||||
Builder builder = new AccessibleAlertBuilder(mapActivity);
|
AlertDialog.Builder builder = new AccessibleAlertBuilder(mapActivity);
|
||||||
builder.setMessage(R.string.context_menu_item_update_map_confirm);
|
builder.setMessage(R.string.context_menu_item_update_map_confirm);
|
||||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
||||||
final OsmandMapTileView mapView = mapActivity.getMapView();
|
final OsmandMapTileView mapView = mapActivity.getMapView();
|
||||||
|
@ -561,7 +561,6 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(int id) {
|
public Dialog onCreateDialog(int id) {
|
||||||
Bundle args = dialogBundle;
|
Bundle args = dialogBundle;
|
||||||
|
@ -799,7 +798,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
public AlertDialog stopNavigationActionConfirm() {
|
public AlertDialog stopNavigationActionConfirm() {
|
||||||
Builder builder = new AlertDialog.Builder(mapActivity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity);
|
||||||
// Stop the navigation
|
// Stop the navigation
|
||||||
builder.setTitle(getString(R.string.cancel_route));
|
builder.setTitle(getString(R.string.cancel_route));
|
||||||
builder.setMessage(getString(R.string.stop_routing_confirm));
|
builder.setMessage(getString(R.string.stop_routing_confirm));
|
||||||
|
@ -814,7 +813,6 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void whereAmIDialog() {
|
public void whereAmIDialog() {
|
||||||
final List<String> items = new ArrayList<String>();
|
final List<String> items = new ArrayList<String>();
|
||||||
items.add(getString(R.string.show_location));
|
items.add(getString(R.string.show_location));
|
||||||
|
@ -841,14 +839,11 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void showObjectContextMenu(final ContextMenuAdapter qa, final Activity activity,
|
public static void showObjectContextMenu(final ContextMenuAdapter qa, final Activity activity,
|
||||||
final OnClickListener onShow) {
|
final OnClickListener onShow) {
|
||||||
OsmandApplication app = (OsmandApplication) activity.getApplication();
|
OsmandApplication app = (OsmandApplication) activity.getApplication();
|
||||||
if (app.accessibilityEnabled()) {
|
if (app.accessibilityEnabled()) {
|
||||||
Builder builder = new AlertDialog.Builder(activity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
String[] values = qa.getItemNames();
|
String[] values = qa.getItemNames();
|
||||||
builder.setItems(values, new DialogInterface.OnClickListener() {
|
builder.setItems(values, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,20 +1,10 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.util.OpeningHoursParser.BasicOpeningHourRule;
|
|
||||||
import net.osmand.util.OpeningHoursParser.OpeningHoursRule;
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.text.format.DateFormat;
|
import android.text.format.DateFormat;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -26,6 +16,16 @@ import android.widget.TextView;
|
||||||
import android.widget.TimePicker;
|
import android.widget.TimePicker;
|
||||||
import android.widget.TimePicker.OnTimeChangedListener;
|
import android.widget.TimePicker.OnTimeChangedListener;
|
||||||
|
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.util.OpeningHoursParser.BasicOpeningHourRule;
|
||||||
|
import net.osmand.util.OpeningHoursParser.OpeningHoursRule;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class OpeningHoursView {
|
public class OpeningHoursView {
|
||||||
|
|
||||||
private final Context ctx;
|
private final Context ctx;
|
||||||
|
@ -160,7 +160,7 @@ public class OpeningHoursView {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showDaysDialog(final BasicOpeningHourRule item, final int positionToAdd) {
|
public void showDaysDialog(final BasicOpeningHourRule item, final int positionToAdd) {
|
||||||
Builder b = new AlertDialog.Builder(ctx);
|
AlertDialog.Builder b = new AlertDialog.Builder(ctx);
|
||||||
|
|
||||||
boolean add = positionToAdd > -1;
|
boolean add = positionToAdd > -1;
|
||||||
Calendar inst = Calendar.getInstance();
|
Calendar inst = Calendar.getInstance();
|
||||||
|
|
|
@ -1,13 +1,25 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import android.content.Context;
|
||||||
import java.util.ArrayList;
|
import android.content.DialogInterface;
|
||||||
import java.util.LinkedHashMap;
|
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
||||||
import java.util.LinkedHashSet;
|
import android.os.Bundle;
|
||||||
import java.util.List;
|
import android.preference.CheckBoxPreference;
|
||||||
import java.util.Map;
|
import android.preference.EditTextPreference;
|
||||||
import java.util.Map.Entry;
|
import android.preference.ListPreference;
|
||||||
import java.util.Set;
|
import android.preference.Preference;
|
||||||
|
import android.preference.Preference.OnPreferenceChangeListener;
|
||||||
|
import android.preference.Preference.OnPreferenceClickListener;
|
||||||
|
import android.preference.PreferenceGroup;
|
||||||
|
import android.preference.PreferenceScreen;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
import net.osmand.plus.ApplicationMode;
|
import net.osmand.plus.ApplicationMode;
|
||||||
|
@ -18,28 +30,15 @@ import net.osmand.plus.OsmandSettings.OsmandPreference;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.actions.AppModeDialog;
|
import net.osmand.plus.activities.actions.AppModeDialog;
|
||||||
import net.osmand.plus.views.SeekBarPreference;
|
import net.osmand.plus.views.SeekBarPreference;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
import java.lang.reflect.Field;
|
||||||
import android.content.Context;
|
import java.util.ArrayList;
|
||||||
import android.content.DialogInterface;
|
import java.util.LinkedHashMap;
|
||||||
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
import java.util.LinkedHashSet;
|
||||||
import android.graphics.Color;
|
import java.util.List;
|
||||||
import android.os.Bundle;
|
import java.util.Map;
|
||||||
import android.preference.CheckBoxPreference;
|
import java.util.Map.Entry;
|
||||||
import android.preference.EditTextPreference;
|
import java.util.Set;
|
||||||
import android.preference.ListPreference;
|
|
||||||
import android.preference.Preference;
|
|
||||||
import android.preference.Preference.OnPreferenceChangeListener;
|
|
||||||
import android.preference.Preference.OnPreferenceClickListener;
|
|
||||||
import android.preference.PreferenceGroup;
|
|
||||||
import android.preference.PreferenceScreen;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.AdapterView;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
|
|
||||||
public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
|
public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
|
||||||
|
@ -399,7 +398,7 @@ public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void profileDialog() {
|
protected void profileDialog() {
|
||||||
Builder b = new AlertDialog.Builder(this);
|
AlertDialog.Builder b = new AlertDialog.Builder(this);
|
||||||
final Set<ApplicationMode> selected = new LinkedHashSet<ApplicationMode>();
|
final Set<ApplicationMode> selected = new LinkedHashSet<ApplicationMode>();
|
||||||
View v = AppModeDialog.prepareAppModeView(this, selected, false, null, true,
|
View v = AppModeDialog.prepareAppModeView(this, selected, false, null, true,
|
||||||
new View.OnClickListener() {
|
new View.OnClickListener() {
|
||||||
|
@ -538,7 +537,7 @@ public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
|
||||||
|
|
||||||
|
|
||||||
public void showBooleanSettings(String[] vals, final OsmandPreference<Boolean>[] prefs) {
|
public void showBooleanSettings(String[] vals, final OsmandPreference<Boolean>[] prefs) {
|
||||||
Builder bld = new AlertDialog.Builder(this);
|
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||||
boolean[] checkedItems = new boolean[prefs.length];
|
boolean[] checkedItems = new boolean[prefs.length];
|
||||||
for (int i = 0; i < prefs.length; i++) {
|
for (int i = 0; i < prefs.length; i++) {
|
||||||
checkedItems[i] = prefs[i].get();
|
checkedItems[i] = prefs[i].get();
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
|
@ -21,9 +19,11 @@ import android.preference.Preference.OnPreferenceChangeListener;
|
||||||
import android.preference.Preference.OnPreferenceClickListener;
|
import android.preference.Preference.OnPreferenceClickListener;
|
||||||
import android.preference.PreferenceGroup;
|
import android.preference.PreferenceGroup;
|
||||||
import android.preference.PreferenceScreen;
|
import android.preference.PreferenceScreen;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.IProgress;
|
import net.osmand.IProgress;
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
|
@ -73,7 +73,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
settings = getMyApplication().getSettings();
|
settings = getMyApplication().getSettings();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ApplicationMode[] appModes = ApplicationMode.values(settings).toArray(new ApplicationMode[0]);
|
ApplicationMode[] appModes = ApplicationMode.values(settings).toArray(new ApplicationMode[0]);
|
||||||
entries = new String[appModes.length];
|
entries = new String[appModes.length];
|
||||||
for (int i = 0; i < entries.length; i++) {
|
for (int i = 0; i < entries.length; i++) {
|
||||||
|
@ -102,7 +101,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void addVoicePrefs(PreferenceGroup cat) {
|
private void addVoicePrefs(PreferenceGroup cat) {
|
||||||
if (!Version.isBlackberry((OsmandApplication) getApplication())) {
|
if (!Version.isBlackberry((OsmandApplication) getApplication())) {
|
||||||
ListPreference lp = createListPreference(
|
ListPreference lp = createListPreference(
|
||||||
|
@ -131,7 +129,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void addLocalPrefs(PreferenceGroup screen) {
|
private void addLocalPrefs(PreferenceGroup screen) {
|
||||||
String[] entries;
|
String[] entries;
|
||||||
String[] entrieValues;
|
String[] entrieValues;
|
||||||
|
@ -337,7 +334,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showAppDirDialogV19() {
|
private void showAppDirDialogV19() {
|
||||||
Builder bld = new AlertDialog.Builder(this);
|
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||||
ChooseAppDirFragment frg = new DashChooseAppDirFragment.ChooseAppDirFragment(this, (Dialog) null);
|
ChooseAppDirFragment frg = new DashChooseAppDirFragment.ChooseAppDirFragment(this, (Dialog) null);
|
||||||
bld.setView(frg.initView(getLayoutInflater(), null, null));
|
bld.setView(frg.initView(getLayoutInflater(), null, null));
|
||||||
AlertDialog dlg = bld.show();
|
AlertDialog dlg = bld.show();
|
||||||
|
@ -345,7 +342,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void addMiscPreferences(PreferenceGroup misc) {
|
private void addMiscPreferences(PreferenceGroup misc) {
|
||||||
if (!Version.isBlackberry(getMyApplication())) {
|
if (!Version.isBlackberry(getMyApplication())) {
|
||||||
applicationDir = new Preference(this);
|
applicationDir = new Preference(this);
|
||||||
|
@ -388,7 +384,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void updateApplicationDirTextAndSummary() {
|
private void updateApplicationDirTextAndSummary() {
|
||||||
if (applicationDir != null) {
|
if (applicationDir != null) {
|
||||||
String storageDir = settings.getExternalStorageDirectory().getAbsolutePath();
|
String storageDir = settings.getExternalStorageDirectory().getAbsolutePath();
|
||||||
|
@ -445,9 +440,8 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void restartApp() {
|
private void restartApp() {
|
||||||
Builder bld = new AlertDialog.Builder(this);
|
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||||
bld.setMessage(R.string.restart_is_required);
|
bld.setMessage(R.string.restart_is_required);
|
||||||
bld.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
bld.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
||||||
|
|
||||||
|
@ -463,7 +457,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void warnAboutChangingStorage(final String newValue) {
|
private void warnAboutChangingStorage(final String newValue) {
|
||||||
String newDir = newValue != null ? newValue.trim() : newValue;
|
String newDir = newValue != null ? newValue.trim() : newValue;
|
||||||
if (!newDir.replace('/', ' ').trim().
|
if (!newDir.replace('/', ' ').trim().
|
||||||
|
@ -476,7 +469,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
AccessibleToast.makeText(this, R.string.specified_dir_doesnt_exist, Toast.LENGTH_LONG).show();
|
AccessibleToast.makeText(this, R.string.specified_dir_doesnt_exist, Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setMessage(getString(R.string.application_dir_change_warning3));
|
builder.setMessage(getString(R.string.application_dir_change_warning3));
|
||||||
builder.setPositiveButton(R.string.shared_string_yes, new OnClickListener() {
|
builder.setPositiveButton(R.string.shared_string_yes, new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,9 +1,18 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import android.app.admin.DevicePolicyManager;
|
||||||
import java.util.List;
|
import android.content.ComponentName;
|
||||||
import java.util.Map;
|
import android.content.DialogInterface;
|
||||||
|
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.preference.CheckBoxPreference;
|
||||||
|
import android.preference.ListPreference;
|
||||||
|
import android.preference.Preference;
|
||||||
|
import android.preference.PreferenceCategory;
|
||||||
|
import android.preference.PreferenceScreen;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
import net.osmand.plus.ApplicationMode;
|
import net.osmand.plus.ApplicationMode;
|
||||||
import net.osmand.plus.DeviceAdminRecv;
|
import net.osmand.plus.DeviceAdminRecv;
|
||||||
|
@ -18,19 +27,10 @@ import net.osmand.plus.routing.RouteProvider.RouteService;
|
||||||
import net.osmand.router.GeneralRouter;
|
import net.osmand.router.GeneralRouter;
|
||||||
import net.osmand.router.GeneralRouter.RoutingParameter;
|
import net.osmand.router.GeneralRouter.RoutingParameter;
|
||||||
import net.osmand.router.GeneralRouter.RoutingParameterType;
|
import net.osmand.router.GeneralRouter.RoutingParameterType;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
import java.util.ArrayList;
|
||||||
import android.app.admin.DevicePolicyManager;
|
import java.util.List;
|
||||||
import android.content.ComponentName;
|
import java.util.Map;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.preference.CheckBoxPreference;
|
|
||||||
import android.preference.ListPreference;
|
|
||||||
import android.preference.Preference;
|
|
||||||
import android.preference.PreferenceCategory;
|
|
||||||
import android.preference.PreferenceScreen;
|
|
||||||
|
|
||||||
public class SettingsNavigationActivity extends SettingsBaseActivity {
|
public class SettingsNavigationActivity extends SettingsBaseActivity {
|
||||||
|
|
||||||
|
@ -391,7 +391,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void confirmSpeedCamerasDlg() {
|
private void confirmSpeedCamerasDlg() {
|
||||||
Builder bld = new AlertDialog.Builder(this);
|
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||||
bld.setMessage(R.string.confirm_usage_speed_cameras);
|
bld.setMessage(R.string.confirm_usage_speed_cameras);
|
||||||
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||||
|
|
||||||
|
@ -405,7 +405,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public AlertDialog showBooleanSettings(String[] vals, final OsmandPreference<Boolean>[] prefs, final CharSequence title) {
|
public AlertDialog showBooleanSettings(String[] vals, final OsmandPreference<Boolean>[] prefs, final CharSequence title) {
|
||||||
Builder bld = new AlertDialog.Builder(this);
|
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||||
boolean[] checkedItems = new boolean[prefs.length];
|
boolean[] checkedItems = new boolean[prefs.length];
|
||||||
for (int i = 0; i < prefs.length; i++) {
|
for (int i = 0; i < prefs.length; i++) {
|
||||||
checkedItems[i] = prefs[i].get();
|
checkedItems[i] = prefs[i].get();
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
package net.osmand.plus.activities.actions;
|
package net.osmand.plus.activities.actions;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.osmand.access.AccessibleAlertBuilder;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.Version;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
@ -18,10 +9,19 @@ import android.content.pm.PackageManager;
|
||||||
import android.content.pm.ResolveInfo;
|
import android.content.pm.ResolveInfo;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.text.ClipboardManager;
|
import android.text.ClipboardManager;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import net.osmand.access.AccessibleAlertBuilder;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.Version;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class ShareDialog {
|
public class ShareDialog {
|
||||||
|
|
||||||
private Activity a;
|
private Activity a;
|
||||||
|
@ -113,7 +113,7 @@ public class ShareDialog {
|
||||||
if(type == ACTION) {
|
if(type == ACTION) {
|
||||||
runnable.run();
|
runnable.run();
|
||||||
} else if(type == VIEW) {
|
} else if(type == VIEW) {
|
||||||
Builder bld = new AlertDialog.Builder(a);
|
AlertDialog.Builder bld = new AlertDialog.Builder(a);
|
||||||
bld.setTitle(title);
|
bld.setTitle(title);
|
||||||
bld.setMessage(content);
|
bld.setMessage(content);
|
||||||
bld.show();
|
bld.show();
|
||||||
|
@ -131,7 +131,7 @@ public class ShareDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showDialog() {
|
public void showDialog() {
|
||||||
AlertDialog.Builder builder = new Builder(a);
|
AlertDialog.Builder builder = new AlertDialog.Builder(a);
|
||||||
builder.setTitle(title);
|
builder.setTitle(title);
|
||||||
String[] shareStrings = new String[share.size()];
|
String[] shareStrings = new String[share.size()];
|
||||||
for(int i = 0; i < shareStrings.length; i++) {
|
for(int i = 0; i < shareStrings.length; i++) {
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
package net.osmand.plus.activities.actions;
|
package net.osmand.plus.activities.actions;
|
||||||
|
|
||||||
import net.osmand.access.AccessibleAlertBuilder;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.Version;
|
|
||||||
import net.osmand.plus.activities.MapActivity;
|
|
||||||
import net.osmand.plus.views.OsmandMapTileView;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
@ -16,6 +10,7 @@ import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
|
@ -28,6 +23,12 @@ import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import net.osmand.access.AccessibleAlertBuilder;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.Version;
|
||||||
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.views.OsmandMapTileView;
|
||||||
|
|
||||||
public class StartGPSStatus extends OsmAndAction {
|
public class StartGPSStatus extends OsmAndAction {
|
||||||
|
|
||||||
public enum GpsStatusApps {
|
public enum GpsStatusApps {
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
package net.osmand.plus.activities.search;
|
package net.osmand.plus.activities.search;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.FragmentActivity;
|
import android.support.v4.app.FragmentActivity;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.widget.PopupMenu;
|
import android.support.v7.widget.PopupMenu;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
@ -36,7 +35,6 @@ import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.OsmAndListFragment;
|
import net.osmand.plus.activities.OsmAndListFragment;
|
||||||
import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
|
import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
|
||||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
import net.osmand.plus.dashboard.DashLocationFragment;
|
||||||
import net.osmand.plus.dialogs.DirectionsDialogs;
|
|
||||||
import net.osmand.plus.helpers.SearchHistoryHelper;
|
import net.osmand.plus.helpers.SearchHistoryHelper;
|
||||||
import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry;
|
import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry;
|
||||||
import net.osmand.util.MapUtils;
|
import net.osmand.util.MapUtils;
|
||||||
|
@ -80,7 +78,7 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearWithConfirmation() {
|
private void clearWithConfirmation() {
|
||||||
Builder bld = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder bld = new AlertDialog.Builder(getActivity());
|
||||||
bld.setMessage(R.string.confirmation_to_clear_history);
|
bld.setMessage(R.string.confirmation_to_clear_history);
|
||||||
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||||
|
|
||||||
|
|
|
@ -3,16 +3,37 @@
|
||||||
*/
|
*/
|
||||||
package net.osmand.plus.activities.search;
|
package net.osmand.plus.activities.search;
|
||||||
|
|
||||||
import gnu.trove.set.hash.TLongHashSet;
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
import java.text.MessageFormat;
|
import android.content.Intent;
|
||||||
import java.util.ArrayList;
|
import android.graphics.drawable.Drawable;
|
||||||
import java.util.Calendar;
|
import android.os.AsyncTask;
|
||||||
import java.util.Collection;
|
import android.os.AsyncTask.Status;
|
||||||
import java.util.Collections;
|
import android.os.Bundle;
|
||||||
import java.util.List;
|
import android.support.v4.view.MenuItemCompat;
|
||||||
import java.util.Map;
|
import android.support.v7.app.AlertDialog;
|
||||||
import java.util.TreeMap;
|
import android.support.v7.widget.PopupMenu;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.MenuItem.OnMenuItemClickListener;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.Filter;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.LinearLayout.LayoutParams;
|
||||||
|
import android.widget.ListView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.Location;
|
import net.osmand.Location;
|
||||||
import net.osmand.ResultMatcher;
|
import net.osmand.ResultMatcher;
|
||||||
|
@ -43,38 +64,17 @@ import net.osmand.util.Algorithms;
|
||||||
import net.osmand.util.MapUtils;
|
import net.osmand.util.MapUtils;
|
||||||
import net.osmand.util.OpeningHoursParser;
|
import net.osmand.util.OpeningHoursParser;
|
||||||
import net.osmand.util.OpeningHoursParser.OpeningHours;
|
import net.osmand.util.OpeningHoursParser.OpeningHours;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
import java.text.MessageFormat;
|
||||||
import android.content.Context;
|
import java.util.ArrayList;
|
||||||
import android.content.DialogInterface;
|
import java.util.Calendar;
|
||||||
import android.content.Intent;
|
import java.util.Collection;
|
||||||
import android.graphics.drawable.Drawable;
|
import java.util.Collections;
|
||||||
import android.os.AsyncTask;
|
import java.util.List;
|
||||||
import android.os.AsyncTask.Status;
|
import java.util.Map;
|
||||||
import android.os.Bundle;
|
import java.util.TreeMap;
|
||||||
import android.support.v4.view.MenuItemCompat;
|
|
||||||
import android.support.v7.widget.PopupMenu;
|
import gnu.trove.set.hash.TLongHashSet;
|
||||||
import android.support.v7.widget.Toolbar;
|
|
||||||
import android.text.Editable;
|
|
||||||
import android.text.TextWatcher;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.Menu;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.MenuItem.OnMenuItemClickListener;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.view.inputmethod.InputMethodManager;
|
|
||||||
import android.widget.AdapterView;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.Filter;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.LinearLayout.LayoutParams;
|
|
||||||
import android.widget.ListView;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search poi activity
|
* Search poi activity
|
||||||
|
@ -860,7 +860,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
|
|
||||||
|
|
||||||
private void removePoiFilter() {
|
private void removePoiFilter() {
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setMessage(R.string.edit_filter_delete_dialog_title);
|
builder.setMessage(R.string.edit_filter_delete_dialog_title);
|
||||||
builder.setNegativeButton(R.string.shared_string_no, null);
|
builder.setNegativeButton(R.string.shared_string_no, null);
|
||||||
builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||||
|
@ -881,7 +881,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
}
|
}
|
||||||
|
|
||||||
public void savePoiFilter() {
|
public void savePoiFilter() {
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle(R.string.edit_filter_save_as_menu_item);
|
builder.setTitle(R.string.edit_filter_save_as_menu_item);
|
||||||
final EditText editText = new EditText(this);
|
final EditText editText = new EditText(this);
|
||||||
if(filter.isStandardFilter()) {
|
if(filter.isStandardFilter()) {
|
||||||
|
|
|
@ -1,32 +1,31 @@
|
||||||
package net.osmand.plus.base;
|
package net.osmand.plus.base;
|
||||||
|
|
||||||
import java.io.File;
|
import android.content.DialogInterface;
|
||||||
import java.util.ArrayList;
|
import android.content.DialogInterface.OnCancelListener;
|
||||||
|
import android.content.DialogInterface.OnDismissListener;
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
import net.osmand.access.AccessibleAlertBuilder;
|
import net.osmand.access.AccessibleAlertBuilder;
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.plus.GPXUtilities;
|
import net.osmand.plus.GPXUtilities;
|
||||||
import net.osmand.plus.GPXUtilities.GPXFile;
|
import net.osmand.plus.GPXUtilities.GPXFile;
|
||||||
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.TargetPointsHelper;
|
import net.osmand.plus.TargetPointsHelper;
|
||||||
|
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.routing.RoutingHelper;
|
|
||||||
import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
|
import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
|
||||||
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import java.io.File;
|
||||||
import android.app.AlertDialog.Builder;
|
import java.util.ArrayList;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.DialogInterface.OnCancelListener;
|
|
||||||
import android.content.DialogInterface.OnDismissListener;
|
|
||||||
import android.os.AsyncTask;
|
|
||||||
import android.os.Handler;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
public class FailSafeFuntions {
|
public class FailSafeFuntions {
|
||||||
private static boolean quitRouteRestoreDialog = false;
|
private static boolean quitRouteRestoreDialog = false;
|
||||||
|
@ -49,7 +48,7 @@ public class FailSafeFuntions {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Builder builder = new AccessibleAlertBuilder(ma);
|
AlertDialog.Builder builder = new AccessibleAlertBuilder(ma);
|
||||||
final TextView tv = new TextView(ma);
|
final TextView tv = new TextView(ma);
|
||||||
tv.setText(ma.getString(R.string.continue_follow_previous_route_auto, delay + ""));
|
tv.setText(ma.getString(R.string.continue_follow_previous_route_auto, delay + ""));
|
||||||
tv.setPadding(7, 5, 7, 5);
|
tv.setPadding(7, 5, 7, 5);
|
||||||
|
|
|
@ -1,6 +1,37 @@
|
||||||
package net.osmand.plus.dashboard;
|
package net.osmand.plus.dashboard;
|
||||||
|
|
||||||
import gnu.trove.list.array.TIntArrayList;
|
import android.annotation.TargetApi;
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.app.ProgressDialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.StatFs;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v4.app.FragmentActivity;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.View.OnClickListener;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import net.osmand.IndexConstants;
|
||||||
|
import net.osmand.ValueHolder;
|
||||||
|
import net.osmand.access.AccessibleToast;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
import net.osmand.plus.ProgressImplementation;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
@ -13,37 +44,7 @@ import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import net.osmand.IndexConstants;
|
import gnu.trove.list.array.TIntArrayList;
|
||||||
import net.osmand.ValueHolder;
|
|
||||||
import net.osmand.access.AccessibleToast;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.OsmandSettings;
|
|
||||||
import net.osmand.plus.ProgressImplementation;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.util.Algorithms;
|
|
||||||
import android.annotation.TargetApi;
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.app.ProgressDialog;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.os.AsyncTask;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.StatFs;
|
|
||||||
import android.support.annotation.Nullable;
|
|
||||||
import android.support.v4.app.Fragment;
|
|
||||||
import android.support.v4.app.FragmentActivity;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.View.OnClickListener;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
public class DashChooseAppDirFragment {
|
public class DashChooseAppDirFragment {
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package net.osmand.plus.dashboard;
|
package net.osmand.plus.dashboard;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
package net.osmand.plus.dashboard;
|
package net.osmand.plus.dashboard;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.widget.PopupMenu;
|
import android.support.v7.widget.PopupMenu;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
@ -195,7 +194,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
|
||||||
|
|
||||||
protected void deletePointConfirm(final TargetPoint point, View view) {
|
protected void deletePointConfirm(final TargetPoint point, View view) {
|
||||||
final boolean target = point == getMyApplication().getTargetPointsHelper().getPointToNavigate();
|
final boolean target = point == getMyApplication().getTargetPointsHelper().getPointToNavigate();
|
||||||
Builder builder = new AlertDialog.Builder(view.getContext());
|
AlertDialog.Builder builder = new AlertDialog.Builder(view.getContext());
|
||||||
// Stop the navigation
|
// Stop the navigation
|
||||||
builder.setTitle(getString(R.string.delete_target_point));
|
builder.setTitle(getString(R.string.delete_target_point));
|
||||||
builder.setMessage(PointDescription.getSimpleName(point, getActivity()));
|
builder.setMessage(PointDescription.getSimpleName(point, getActivity()));
|
||||||
|
|
|
@ -2,8 +2,6 @@ package net.osmand.plus.development;
|
||||||
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Debug;
|
import android.os.Debug;
|
||||||
|
@ -13,6 +11,7 @@ import android.preference.Preference;
|
||||||
import android.preference.Preference.OnPreferenceClickListener;
|
import android.preference.Preference.OnPreferenceClickListener;
|
||||||
import android.preference.PreferenceCategory;
|
import android.preference.PreferenceCategory;
|
||||||
import android.preference.PreferenceScreen;
|
import android.preference.PreferenceScreen;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import net.osmand.plus.ApplicationMode;
|
import net.osmand.plus.ApplicationMode;
|
||||||
|
@ -207,7 +206,7 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void availableProfileDialog() {
|
protected void availableProfileDialog() {
|
||||||
Builder b = new AlertDialog.Builder(this);
|
AlertDialog.Builder b = new AlertDialog.Builder(this);
|
||||||
final List<ApplicationMode> modes = ApplicationMode.allPossibleValues();
|
final List<ApplicationMode> modes = ApplicationMode.allPossibleValues();
|
||||||
modes.remove(ApplicationMode.DEFAULT);
|
modes.remove(ApplicationMode.DEFAULT);
|
||||||
final Set<ApplicationMode> selected = new LinkedHashSet<ApplicationMode>(ApplicationMode.values(settings));
|
final Set<ApplicationMode> selected = new LinkedHashSet<ApplicationMode>(ApplicationMode.values(settings));
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
package net.osmand.plus.development;
|
package net.osmand.plus.development;
|
||||||
|
|
||||||
import android.app.ActionBar;
|
import android.app.ActionBar;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -106,7 +105,7 @@ public class TestVoiceActivity extends OsmandActionBarActivity {
|
||||||
}
|
}
|
||||||
k++;
|
k++;
|
||||||
}
|
}
|
||||||
Builder bld = new AlertDialog.Builder(this);
|
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||||
bld.setSingleChoiceItems(entrieValues, selected, new DialogInterface.OnClickListener() {
|
bld.setSingleChoiceItems(entrieValues, selected, new DialogInterface.OnClickListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
package net.osmand.plus.dialogs;
|
package net.osmand.plus.dialogs;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.widget.PopupMenu;
|
import android.support.v7.widget.PopupMenu;
|
||||||
|
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
|
@ -23,7 +22,7 @@ public class DirectionsDialogs {
|
||||||
final OsmandApplication ctx = (OsmandApplication) act.getApplication();
|
final OsmandApplication ctx = (OsmandApplication) act.getApplication();
|
||||||
final TargetPointsHelper targetPointsHelper = ctx.getTargetPointsHelper();
|
final TargetPointsHelper targetPointsHelper = ctx.getTargetPointsHelper();
|
||||||
if (targetPointsHelper.getIntermediatePoints().size() > 0) {
|
if (targetPointsHelper.getIntermediatePoints().size() > 0) {
|
||||||
Builder builder = new AlertDialog.Builder(act);
|
AlertDialog.Builder builder = new AlertDialog.Builder(act);
|
||||||
builder.setTitle(R.string.new_directions_point_dialog);
|
builder.setTitle(R.string.new_directions_point_dialog);
|
||||||
builder.setItems(
|
builder.setItems(
|
||||||
new String[] { act.getString(R.string.keep_intermediate_points),
|
new String[] { act.getString(R.string.keep_intermediate_points),
|
||||||
|
@ -51,7 +50,7 @@ public class DirectionsDialogs {
|
||||||
final OsmandApplication ctx = (OsmandApplication) act.getApplication();
|
final OsmandApplication ctx = (OsmandApplication) act.getApplication();
|
||||||
final TargetPointsHelper targetPointsHelper = ctx.getTargetPointsHelper();
|
final TargetPointsHelper targetPointsHelper = ctx.getTargetPointsHelper();
|
||||||
if (targetPointsHelper.getPointToNavigate() != null) {
|
if (targetPointsHelper.getPointToNavigate() != null) {
|
||||||
Builder builder = new AlertDialog.Builder(act);
|
AlertDialog.Builder builder = new AlertDialog.Builder(act);
|
||||||
builder.setTitle(R.string.new_destination_point_dialog);
|
builder.setTitle(R.string.new_destination_point_dialog);
|
||||||
builder.setItems(
|
builder.setItems(
|
||||||
new String[] { act.getString(R.string.replace_destination_point),
|
new String[] { act.getString(R.string.replace_destination_point),
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package net.osmand.plus.dialogs;
|
package net.osmand.plus.dialogs;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
@ -10,6 +8,7 @@ import android.content.DialogInterface.OnClickListener;
|
||||||
import android.content.DialogInterface.OnDismissListener;
|
import android.content.DialogInterface.OnDismissListener;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.AdapterView.OnItemClickListener;
|
import android.widget.AdapterView.OnItemClickListener;
|
||||||
|
@ -98,7 +97,7 @@ public class FavoriteDialogs {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Dialog createAddFavouriteDialog(final Activity activity, final Bundle args) {
|
public static Dialog createAddFavouriteDialog(final Activity activity, final Bundle args) {
|
||||||
Builder builder = new AlertDialog.Builder(activity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
builder.setTitle(R.string.favourites_context_menu_edit);
|
builder.setTitle(R.string.favourites_context_menu_edit);
|
||||||
final View v = activity.getLayoutInflater().inflate(R.layout.favorite_edit_dialog, null, false);
|
final View v = activity.getLayoutInflater().inflate(R.layout.favorite_edit_dialog, null, false);
|
||||||
final FavouritesDbHelper helper = ((OsmandApplication) activity.getApplication()).getFavorites();
|
final FavouritesDbHelper helper = ((OsmandApplication) activity.getApplication()).getFavorites();
|
||||||
|
@ -138,7 +137,7 @@ public class FavoriteDialogs {
|
||||||
point.setName(editText.getText().toString().trim());
|
point.setName(editText.getText().toString().trim());
|
||||||
point.setDescription(description.getText().toString().trim());
|
point.setDescription(description.getText().toString().trim());
|
||||||
point.setCategory(categoryStr);
|
point.setCategory(categoryStr);
|
||||||
Builder bld = FavouritesDbHelper.checkDuplicates(point, helper, activity);
|
AlertDialog.Builder bld = FavouritesDbHelper.checkDuplicates(point, helper, activity);
|
||||||
if(bld != null) {
|
if(bld != null) {
|
||||||
bld.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
bld.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -172,7 +171,7 @@ public class FavoriteDialogs {
|
||||||
final FavouritesAdapter favouritesAdapter, final OnItemClickListener click,
|
final FavouritesAdapter favouritesAdapter, final OnItemClickListener click,
|
||||||
final OnDismissListener dismissListener, final Dialog[] dialogHolder, final boolean sortByDist) {
|
final OnDismissListener dismissListener, final Dialog[] dialogHolder, final boolean sortByDist) {
|
||||||
ListView listView = new ListView(uiContext);
|
ListView listView = new ListView(uiContext);
|
||||||
Builder bld = new AlertDialog.Builder(uiContext);
|
AlertDialog.Builder bld = new AlertDialog.Builder(uiContext);
|
||||||
final Collator inst = Collator.getInstance();
|
final Collator inst = Collator.getInstance();
|
||||||
favouritesAdapter.sort(new Comparator<FavouritePoint>() {
|
favouritesAdapter.sort(new Comparator<FavouritePoint>() {
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package net.osmand.plus.distancecalculator;
|
package net.osmand.plus.distancecalculator;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
|
@ -17,6 +15,7 @@ import android.graphics.Paint.Style;
|
||||||
import android.graphics.Path;
|
import android.graphics.Path;
|
||||||
import android.graphics.PointF;
|
import android.graphics.PointF;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -170,7 +169,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void showDialog(final MapActivity activity) {
|
private void showDialog(final MapActivity activity) {
|
||||||
Builder bld = new AlertDialog.Builder(activity);
|
AlertDialog.Builder bld = new AlertDialog.Builder(activity);
|
||||||
final TIntArrayList list = new TIntArrayList();
|
final TIntArrayList list = new TIntArrayList();
|
||||||
if(distanceMeasurementMode == 0) {
|
if(distanceMeasurementMode == 0) {
|
||||||
list.add(R.string.distance_measurement_start_editing);
|
list.add(R.string.distance_measurement_start_editing);
|
||||||
|
@ -257,7 +256,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void saveGpx(final MapActivity activity) {
|
protected void saveGpx(final MapActivity activity) {
|
||||||
Builder b = new AlertDialog.Builder(activity);
|
AlertDialog.Builder b = new AlertDialog.Builder(activity);
|
||||||
final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR);
|
final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR);
|
||||||
LinearLayout ll = new LinearLayout(activity);
|
LinearLayout ll = new LinearLayout(activity);
|
||||||
ll.setOrientation(LinearLayout.VERTICAL);
|
ll.setOrientation(LinearLayout.VERTICAL);
|
||||||
|
@ -393,7 +392,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
|
||||||
final CommonPreference<Boolean> pref = app.getSettings().registerBooleanPreference("show_measurement_help_first_time", true);
|
final CommonPreference<Boolean> pref = app.getSettings().registerBooleanPreference("show_measurement_help_first_time", true);
|
||||||
pref.makeGlobal();
|
pref.makeGlobal();
|
||||||
if(pref.get()) {
|
if(pref.get()) {
|
||||||
Builder builder = new AlertDialog.Builder(ctx);
|
AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
|
||||||
builder.setMessage(R.string.use_distance_measurement_help);
|
builder.setMessage(R.string.use_distance_measurement_help);
|
||||||
builder.setNegativeButton(R.string.shared_string_do_not_show_again, new OnClickListener() {
|
builder.setNegativeButton(R.string.shared_string_do_not_show_again, new OnClickListener() {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ package net.osmand.plus.download;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
|
@ -16,6 +15,7 @@ import android.os.AsyncTask.Status;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.StatFs;
|
import android.os.StatFs;
|
||||||
import android.support.annotation.UiThread;
|
import android.support.annotation.UiThread;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.app.NotificationCompat;
|
import android.support.v7.app.NotificationCompat;
|
||||||
import android.support.v7.app.NotificationCompat.Builder;
|
import android.support.v7.app.NotificationCompat.Builder;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
|
@ -1,19 +1,5 @@
|
||||||
package net.osmand.plus.download;
|
package net.osmand.plus.download;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
|
||||||
import java.text.MessageFormat;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import net.osmand.access.AccessibleToast;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.OsmandSettings;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.Version;
|
|
||||||
import net.osmand.plus.activities.ActionBarProgressActivity;
|
|
||||||
import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents;
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
@ -22,12 +8,20 @@ import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.UiThread;
|
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
import android.support.v4.app.Fragment;
|
|
||||||
import android.support.v4.app.FragmentActivity;
|
import android.support.v4.app.FragmentActivity;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import net.osmand.access.AccessibleToast;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.Version;
|
||||||
|
import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents;
|
||||||
|
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
public class DownloadValidationManager {
|
public class DownloadValidationManager {
|
||||||
public static final int MAXIMUM_AVAILABLE_FREE_DOWNLOADS = 5;
|
public static final int MAXIMUM_AVAILABLE_FREE_DOWNLOADS = 5;
|
||||||
protected OsmandSettings settings;
|
protected OsmandSettings settings;
|
||||||
|
@ -91,7 +85,6 @@ public class DownloadValidationManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected void downloadFilesWithAllChecks(FragmentActivity activity, IndexItem[] items) {
|
protected void downloadFilesWithAllChecks(FragmentActivity activity, IndexItem[] items) {
|
||||||
downloadFilesCheck_1_FreeVersion(activity, items);
|
downloadFilesCheck_1_FreeVersion(activity, items);
|
||||||
}
|
}
|
||||||
|
@ -132,7 +125,6 @@ public class DownloadValidationManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void makeSureUserCancelDownload(Context ctx, final IndexItem item) {
|
public void makeSureUserCancelDownload(Context ctx, final IndexItem item) {
|
||||||
AlertDialog.Builder bld = new AlertDialog.Builder(ctx);
|
AlertDialog.Builder bld = new AlertDialog.Builder(ctx);
|
||||||
bld.setTitle(ctx.getString(R.string.shared_string_cancel));
|
bld.setTitle(ctx.getString(R.string.shared_string_cancel));
|
||||||
|
@ -150,6 +142,7 @@ public class DownloadValidationManager {
|
||||||
|
|
||||||
public static class InstallPaidVersionDialogFragment extends DialogFragment {
|
public static class InstallPaidVersionDialogFragment extends DialogFragment {
|
||||||
public static final String TAG = "InstallPaidVersionDialogFragment";
|
public static final String TAG = "InstallPaidVersionDialogFragment";
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
|
|
|
@ -1,21 +1,22 @@
|
||||||
package net.osmand.plus.download.ui;
|
package net.osmand.plus.download.ui;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import android.app.Dialog;
|
||||||
import java.util.List;
|
import android.os.Bundle;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.v4.app.DialogFragment;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.download.DownloadActivity;
|
import net.osmand.plus.download.DownloadActivity;
|
||||||
import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents;
|
import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents;
|
||||||
import net.osmand.plus.download.IndexItem;
|
import net.osmand.plus.download.IndexItem;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
import java.util.ArrayList;
|
||||||
import android.os.Bundle;
|
import java.util.List;
|
||||||
import android.support.annotation.NonNull;
|
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
|
|
||||||
public class ActiveDownloadsDialogFragment extends DialogFragment implements DownloadEvents {
|
public class ActiveDownloadsDialogFragment extends DialogFragment implements DownloadEvents {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.osmand.plus.download.ui;
|
package net.osmand.plus.download.ui;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
@ -369,7 +368,7 @@ public class ItemViewHolder {
|
||||||
: LocalIndexType.VOICE_DATA;
|
: LocalIndexType.VOICE_DATA;
|
||||||
}
|
}
|
||||||
final LocalIndexInfo info = new LocalIndexInfo(tp, fl, false);
|
final LocalIndexInfo info = new LocalIndexInfo(tp, fl, false);
|
||||||
Builder confirm = new Builder(context);
|
AlertDialog.Builder confirm = new AlertDialog.Builder(context);
|
||||||
confirm.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
confirm.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
|
|
@ -1,20 +1,40 @@
|
||||||
package net.osmand.plus.download.ui;
|
package net.osmand.plus.download.ui;
|
||||||
|
|
||||||
import java.io.File;
|
import android.app.Activity;
|
||||||
import java.text.Collator;
|
import android.content.DialogInterface;
|
||||||
import java.util.ArrayList;
|
import android.content.res.Resources;
|
||||||
import java.util.Collections;
|
import android.content.res.TypedArray;
|
||||||
import java.util.Comparator;
|
import android.graphics.PorterDuff;
|
||||||
import java.util.EnumSet;
|
import android.graphics.Typeface;
|
||||||
import java.util.HashMap;
|
import android.graphics.drawable.Drawable;
|
||||||
import java.util.LinkedHashMap;
|
import android.os.AsyncTask;
|
||||||
import java.util.LinkedHashSet;
|
import android.os.Bundle;
|
||||||
import java.util.List;
|
import android.support.v4.view.MenuItemCompat;
|
||||||
import java.util.Map;
|
import android.support.v7.app.ActionBar;
|
||||||
import java.util.Set;
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.support.v7.view.ActionMode;
|
||||||
|
import android.support.v7.widget.PopupMenu;
|
||||||
|
import android.util.TypedValue;
|
||||||
|
import android.view.ContextMenu;
|
||||||
|
import android.view.ContextMenu.ContextMenuInfo;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuInflater;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.SubMenu;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ExpandableListView;
|
||||||
|
import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.PlatformUtil;
|
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
import net.osmand.plus.ContextMenuAdapter;
|
import net.osmand.plus.ContextMenuAdapter;
|
||||||
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
||||||
|
@ -38,42 +58,18 @@ import net.osmand.plus.resources.IncrementalChangesManager.IncrementalUpdate;
|
||||||
import net.osmand.plus.resources.IncrementalChangesManager.IncrementalUpdateList;
|
import net.osmand.plus.resources.IncrementalChangesManager.IncrementalUpdateList;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import java.io.File;
|
||||||
|
import java.text.Collator;
|
||||||
import android.app.Activity;
|
import java.util.ArrayList;
|
||||||
import android.app.AlertDialog;
|
import java.util.Collections;
|
||||||
import android.app.AlertDialog.Builder;
|
import java.util.Comparator;
|
||||||
import android.content.DialogInterface;
|
import java.util.EnumSet;
|
||||||
import android.content.res.Resources;
|
import java.util.HashMap;
|
||||||
import android.content.res.TypedArray;
|
import java.util.LinkedHashMap;
|
||||||
import android.graphics.PorterDuff;
|
import java.util.LinkedHashSet;
|
||||||
import android.graphics.Typeface;
|
import java.util.List;
|
||||||
import android.graphics.drawable.Drawable;
|
import java.util.Map;
|
||||||
import android.os.AsyncTask;
|
import java.util.Set;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.support.v4.view.MenuItemCompat;
|
|
||||||
import android.support.v7.app.ActionBar;
|
|
||||||
import android.support.v7.view.ActionMode;
|
|
||||||
import android.support.v7.widget.PopupMenu;
|
|
||||||
import android.util.TypedValue;
|
|
||||||
import android.view.ContextMenu;
|
|
||||||
import android.view.ContextMenu.ContextMenuInfo;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.Menu;
|
|
||||||
import android.view.MenuInflater;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.SubMenu;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.CheckBox;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.ExpandableListView;
|
|
||||||
import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
|
|
||||||
import android.widget.ImageButton;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
|
|
||||||
public class LocalIndexesFragment extends OsmandExpandableListFragment implements DownloadEvents {
|
public class LocalIndexesFragment extends OsmandExpandableListFragment implements DownloadEvents {
|
||||||
|
@ -170,7 +166,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showContextMenu(final LocalIndexInfo info) {
|
private void showContextMenu(final LocalIndexInfo info) {
|
||||||
Builder builder = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
final ContextMenuAdapter adapter = new ContextMenuAdapter(getActivity());
|
final ContextMenuAdapter adapter = new ContextMenuAdapter(getActivity());
|
||||||
basicFileOperation(info, adapter);
|
basicFileOperation(info, adapter);
|
||||||
OsmandPlugin.onContextMenuActivity(getActivity(), null, info, adapter);
|
OsmandPlugin.onContextMenuActivity(getActivity(), null, info, adapter);
|
||||||
|
@ -224,7 +220,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
||||||
} else if (resId == R.string.local_index_mi_restore) {
|
} else if (resId == R.string.local_index_mi_restore) {
|
||||||
new LocalIndexOperationTask(getDownloadActivity(), listAdapter, LocalIndexOperationTask.RESTORE_OPERATION).execute(info);
|
new LocalIndexOperationTask(getDownloadActivity(), listAdapter, LocalIndexOperationTask.RESTORE_OPERATION).execute(info);
|
||||||
} else if (resId == R.string.shared_string_delete) {
|
} else if (resId == R.string.shared_string_delete) {
|
||||||
Builder confirm = new Builder(getActivity());
|
AlertDialog.Builder confirm = new AlertDialog.Builder(getActivity());
|
||||||
confirm.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
confirm.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
@ -244,7 +240,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void renameFile(final Activity a, final File f, final Runnable callback) {
|
public static void renameFile(final Activity a, final File f, final Runnable callback) {
|
||||||
Builder b = new AlertDialog.Builder(a);
|
AlertDialog.Builder b = new AlertDialog.Builder(a);
|
||||||
if (f.exists()) {
|
if (f.exists()) {
|
||||||
int xt = f.getName().lastIndexOf('.');
|
int xt = f.getName().lastIndexOf('.');
|
||||||
final String ext = xt == -1 ? "" : f.getName().substring(xt);
|
final String ext = xt == -1 ? "" : f.getName().substring(xt);
|
||||||
|
@ -679,7 +675,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Builder builder = new AlertDialog.Builder(getDownloadActivity());
|
AlertDialog.Builder builder = new AlertDialog.Builder(getDownloadActivity());
|
||||||
builder.setMessage(getString(R.string.local_index_action_do, actionButton.toLowerCase(), selectedItems.size()));
|
builder.setMessage(getString(R.string.local_index_action_do, actionButton.toLowerCase(), selectedItems.size()));
|
||||||
builder.setPositiveButton(actionButton, listener);
|
builder.setPositiveButton(actionButton, listener);
|
||||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
package net.osmand.plus.helpers;
|
package net.osmand.plus.helpers;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
|
@ -103,7 +102,7 @@ public class AvoidSpecificRoads {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showDialog(final MapActivity mapActivity) {
|
public void showDialog(final MapActivity mapActivity) {
|
||||||
Builder bld = new AlertDialog.Builder(mapActivity);
|
AlertDialog.Builder bld = new AlertDialog.Builder(mapActivity);
|
||||||
bld.setTitle(R.string.impassable_road);
|
bld.setTitle(R.string.impassable_road);
|
||||||
if (getMissingRoads().size() == 0){
|
if (getMissingRoads().size() == 0){
|
||||||
bld.setMessage(R.string.avoid_roads_msg);
|
bld.setMessage(R.string.avoid_roads_msg);
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package net.osmand.plus.helpers;
|
package net.osmand.plus.helpers;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
@ -9,7 +8,9 @@ import android.net.Uri;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.ParcelFileDescriptor;
|
import android.os.ParcelFileDescriptor;
|
||||||
import android.provider.OpenableColumns;
|
import android.provider.OpenableColumns;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
import net.osmand.data.FavouritePoint;
|
import net.osmand.data.FavouritePoint;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package net.osmand.plus.mapcontextmenu.controllers;
|
package net.osmand.plus.mapcontextmenu.controllers;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
import net.osmand.binary.BinaryMapDataObject;
|
import net.osmand.binary.BinaryMapDataObject;
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package net.osmand.plus.mapcontextmenu.editors;
|
package net.osmand.plus.mapcontextmenu.editors;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package net.osmand.plus.mapcontextmenu.editors;
|
package net.osmand.plus.mapcontextmenu.editors;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.osmand.plus.mapcontextmenu.editors;
|
package net.osmand.plus.mapcontextmenu.editors;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
|
@ -9,6 +8,7 @@ import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package net.osmand.plus.monitoring;
|
package net.osmand.plus.monitoring;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
@ -247,7 +246,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
private void controlDialog(final Activity map) {
|
private void controlDialog(final Activity map) {
|
||||||
final boolean wasTrackMonitored = settings.SAVE_GLOBAL_TRACK_TO_GPX.get();
|
final boolean wasTrackMonitored = settings.SAVE_GLOBAL_TRACK_TO_GPX.get();
|
||||||
|
|
||||||
Builder bld = new AlertDialog.Builder(map);
|
AlertDialog.Builder bld = new AlertDialog.Builder(map);
|
||||||
final TIntArrayList items = new TIntArrayList();
|
final TIntArrayList items = new TIntArrayList();
|
||||||
if(wasTrackMonitored) {
|
if(wasTrackMonitored) {
|
||||||
items.add(R.string.gpx_monitoring_stop);
|
items.add(R.string.gpx_monitoring_stop);
|
||||||
|
@ -381,7 +380,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
|
|
||||||
public static void showIntervalChooseDialog(final Context uiCtx, final String patternMsg,
|
public static void showIntervalChooseDialog(final Context uiCtx, final String patternMsg,
|
||||||
String title, final int[] seconds, final int[] minutes, final ValueHolder<Boolean> choice, final ValueHolder<Integer> v, OnClickListener onclick){
|
String title, final int[] seconds, final int[] minutes, final ValueHolder<Boolean> choice, final ValueHolder<Integer> v, OnClickListener onclick){
|
||||||
Builder dlg = new AlertDialog.Builder(uiCtx);
|
AlertDialog.Builder dlg = new AlertDialog.Builder(uiCtx);
|
||||||
dlg.setTitle(title);
|
dlg.setTitle(title);
|
||||||
WindowManager mgr = (WindowManager) uiCtx.getSystemService(Context.WINDOW_SERVICE);
|
WindowManager mgr = (WindowManager) uiCtx.getSystemService(Context.WINDOW_SERVICE);
|
||||||
DisplayMetrics dm = new DisplayMetrics();
|
DisplayMetrics dm = new DisplayMetrics();
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package net.osmand.plus.myplaces;
|
package net.osmand.plus.myplaces;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
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;
|
||||||
|
@ -13,6 +11,7 @@ import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.support.v4.view.MenuItemCompat;
|
import android.support.v4.view.MenuItemCompat;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.view.ActionMode;
|
import android.support.v7.view.ActionMode;
|
||||||
import android.support.v7.widget.PopupMenu;
|
import android.support.v7.widget.PopupMenu;
|
||||||
import android.support.v7.widget.SearchView;
|
import android.support.v7.widget.SearchView;
|
||||||
|
@ -32,6 +31,7 @@ import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
import net.osmand.plus.ContextMenuAdapter;
|
import net.osmand.plus.ContextMenuAdapter;
|
||||||
|
@ -526,7 +526,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Builder builder = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
builder.setMessage(getString(R.string.local_index_action_do, actionButton.toLowerCase(),
|
builder.setMessage(getString(R.string.local_index_action_do, actionButton.toLowerCase(),
|
||||||
selectedItems.size()));
|
selectedItems.size()));
|
||||||
builder.setPositiveButton(actionButton, listener);
|
builder.setPositiveButton(actionButton, listener);
|
||||||
|
|
|
@ -2,8 +2,6 @@ package net.osmand.plus.myplaces;
|
||||||
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
@ -11,7 +9,7 @@ import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.support.v4.view.MenuItemCompat;
|
import android.support.v4.view.MenuItemCompat;
|
||||||
import android.support.v7.widget.PopupMenu;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
@ -30,7 +28,6 @@ import android.widget.TextView;
|
||||||
import net.osmand.data.FavouritePoint;
|
import net.osmand.data.FavouritePoint;
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.data.PointDescription;
|
import net.osmand.data.PointDescription;
|
||||||
import net.osmand.plus.ContextMenuAdapter;
|
|
||||||
import net.osmand.plus.FavouritesDbHelper;
|
import net.osmand.plus.FavouritesDbHelper;
|
||||||
import net.osmand.plus.GPXUtilities.GPXFile;
|
import net.osmand.plus.GPXUtilities.GPXFile;
|
||||||
import net.osmand.plus.GPXUtilities.WptPt;
|
import net.osmand.plus.GPXUtilities.WptPt;
|
||||||
|
@ -47,7 +44,6 @@ import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.OsmAndListFragment;
|
import net.osmand.plus.activities.OsmAndListFragment;
|
||||||
import net.osmand.plus.activities.TrackActivity;
|
import net.osmand.plus.activities.TrackActivity;
|
||||||
import net.osmand.plus.base.FavoriteImageDrawable;
|
import net.osmand.plus.base.FavoriteImageDrawable;
|
||||||
import net.osmand.plus.dialogs.DirectionsDialogs;
|
|
||||||
import net.osmand.plus.helpers.ColorDialogs;
|
import net.osmand.plus.helpers.ColorDialogs;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
|
@ -206,7 +202,7 @@ public class SelectedGPXFragment extends OsmAndListFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void saveAsFavorites(final GpxDisplayItemType gpxDisplayItemType) {
|
protected void saveAsFavorites(final GpxDisplayItemType gpxDisplayItemType) {
|
||||||
Builder b = new AlertDialog.Builder(getMyActivity());
|
AlertDialog.Builder b = new AlertDialog.Builder(getMyActivity());
|
||||||
final EditText editText = new EditText(getMyActivity());
|
final EditText editText = new EditText(getMyActivity());
|
||||||
final List<GpxDisplayGroup> gs = filterGroups(gpxDisplayItemType);
|
final List<GpxDisplayGroup> gs = filterGroups(gpxDisplayItemType);
|
||||||
if (gs.size() == 0) {
|
if (gs.size() == 0) {
|
||||||
|
@ -280,7 +276,7 @@ public class SelectedGPXFragment extends OsmAndListFragment {
|
||||||
ColorDialogs.setupColorSpinner(getActivity(), getGpx().getColor(0), colorSpinner, list);
|
ColorDialogs.setupColorSpinner(getActivity(), getGpx().getColor(0), colorSpinner, list);
|
||||||
|
|
||||||
final Spinner sp = (Spinner) view.findViewById(R.id.Spinner);
|
final Spinner sp = (Spinner) view.findViewById(R.id.Spinner);
|
||||||
Builder bld = new AlertDialog.Builder(getMyActivity());
|
AlertDialog.Builder bld = new AlertDialog.Builder(getMyActivity());
|
||||||
final List<Double> distanceSplit = new ArrayList<Double>();
|
final List<Double> distanceSplit = new ArrayList<Double>();
|
||||||
final TIntArrayList timeSplit = new TIntArrayList();
|
final TIntArrayList timeSplit = new TIntArrayList();
|
||||||
if(groups.size() == 0) {
|
if(groups.size() == 0) {
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package net.osmand.plus.openseamapsplugin;
|
package net.osmand.plus.openseamapsplugin;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
@ -59,7 +58,7 @@ public class NauticalMapsPlugin extends OsmandPlugin {
|
||||||
app.getSettings().RENDERER.set(RendererRegistry.NAUTICAL_RENDER);
|
app.getSettings().RENDERER.set(RendererRegistry.NAUTICAL_RENDER);
|
||||||
if(!app.getResourceManager().getIndexFileNames().containsKey("World_seamarks"+
|
if(!app.getResourceManager().getIndexFileNames().containsKey("World_seamarks"+
|
||||||
IndexConstants.BINARY_MAP_INDEX_EXT)){
|
IndexConstants.BINARY_MAP_INDEX_EXT)){
|
||||||
Builder dlg = new AlertDialog.Builder(activity);
|
AlertDialog.Builder dlg = new AlertDialog.Builder(activity);
|
||||||
dlg.setMessage(net.osmand.plus.R.string.nautical_maps_missing);
|
dlg.setMessage(net.osmand.plus.R.string.nautical_maps_missing);
|
||||||
dlg.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
dlg.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package net.osmand.plus.osmedit;
|
package net.osmand.plus.osmedit;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package net.osmand.plus.osmedit;
|
package net.osmand.plus.osmedit;
|
||||||
|
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
@ -10,6 +8,7 @@ import android.graphics.Paint;
|
||||||
import android.graphics.PointF;
|
import android.graphics.PointF;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.util.Xml;
|
import android.util.Xml;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
@ -320,7 +319,7 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
|
||||||
|
|
||||||
private Dialog createOpenBugDialog(final Bundle args) {
|
private Dialog createOpenBugDialog(final Bundle args) {
|
||||||
final View openBug = activity.getLayoutInflater().inflate(R.layout.open_bug, null);
|
final View openBug = activity.getLayoutInflater().inflate(R.layout.open_bug, null);
|
||||||
Builder builder = new AlertDialog.Builder(activity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
builder.setTitle(R.string.osb_add_dialog_title);
|
builder.setTitle(R.string.osb_add_dialog_title);
|
||||||
builder.setView(openBug);
|
builder.setView(openBug);
|
||||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
||||||
|
@ -406,7 +405,7 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dialog createCommentBugDialog(final Bundle args) {
|
private Dialog createCommentBugDialog(final Bundle args) {
|
||||||
Builder builder = new AlertDialog.Builder(activity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
builder.setTitle(R.string.osb_comment_dialog_title);
|
builder.setTitle(R.string.osb_comment_dialog_title);
|
||||||
final View view = activity.getLayoutInflater().inflate(R.layout.open_bug, null);
|
final View view = activity.getLayoutInflater().inflate(R.layout.open_bug, null);
|
||||||
builder.setView(view);
|
builder.setView(view);
|
||||||
|
@ -453,7 +452,7 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dialog createCloseBugDialog(final Bundle args) {
|
private Dialog createCloseBugDialog(final Bundle args) {
|
||||||
Builder builder = new AlertDialog.Builder(activity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
builder.setTitle(R.string.osb_close_dialog_title);
|
builder.setTitle(R.string.osb_close_dialog_title);
|
||||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
||||||
builder.setPositiveButton(R.string.osb_close_dialog_close_button, new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.osb_close_dialog_close_button, new DialogInterface.OnClickListener() {
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
package net.osmand.plus.osmedit;
|
package net.osmand.plus.osmedit;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
|
@ -285,7 +284,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
||||||
AccessibleToast.makeText(la, R.string.validate_gpx_upload_name_pwd, Toast.LENGTH_LONG).show();
|
AccessibleToast.makeText(la, R.string.validate_gpx_upload_name_pwd, Toast.LENGTH_LONG).show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Builder bldr = new AlertDialog.Builder(la);
|
AlertDialog.Builder bldr = new AlertDialog.Builder(la);
|
||||||
LayoutInflater inflater = (LayoutInflater) la.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
LayoutInflater inflater = (LayoutInflater) la.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
final View view = inflater.inflate(R.layout.send_gpx_osm, null);
|
final View view = inflater.inflate(R.layout.send_gpx_osm, null);
|
||||||
final EditText descr = (EditText) view.findViewById(R.id.memory_size);
|
final EditText descr = (EditText) view.findViewById(R.id.memory_size);
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package net.osmand.plus.osmedit;
|
package net.osmand.plus.osmedit;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
@ -11,6 +10,7 @@ import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
import android.support.v4.view.MenuItemCompat;
|
import android.support.v4.view.MenuItemCompat;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.view.ActionMode;
|
import android.support.v7.view.ActionMode;
|
||||||
import android.support.v7.widget.PopupMenu;
|
import android.support.v7.widget.PopupMenu;
|
||||||
import android.util.Xml;
|
import android.util.Xml;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package net.osmand.plus.osmedit.dialogs;
|
package net.osmand.plus.osmedit.dialogs;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
import net.osmand.data.Amenity;
|
import net.osmand.data.Amenity;
|
||||||
import net.osmand.osm.MapPoiTypes;
|
import net.osmand.osm.MapPoiTypes;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package net.osmand.plus.osmedit.dialogs;
|
package net.osmand.plus.osmedit.dialogs;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
import net.osmand.data.Amenity;
|
import net.osmand.data.Amenity;
|
||||||
import net.osmand.osm.MapPoiTypes;
|
import net.osmand.osm.MapPoiTypes;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package net.osmand.plus.osmedit.dialogs;
|
package net.osmand.plus.osmedit.dialogs;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
|
|
@ -3,48 +3,8 @@
|
||||||
*/
|
*/
|
||||||
package net.osmand.plus.osmo;
|
package net.osmand.plus.osmo;
|
||||||
|
|
||||||
import gnu.trove.list.array.TIntArrayList;
|
|
||||||
|
|
||||||
import java.text.Collator;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
|
||||||
import net.osmand.Location;
|
|
||||||
import net.osmand.StateChangedListener;
|
|
||||||
import net.osmand.access.AccessibleToast;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.plus.NavigationService;
|
|
||||||
import net.osmand.plus.OsmAndConstants;
|
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
|
||||||
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
|
||||||
import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.OsmandPlugin;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.TargetPointsHelper;
|
|
||||||
import net.osmand.plus.activities.MapActivity;
|
|
||||||
import net.osmand.plus.activities.OsmandBaseExpandableListAdapter;
|
|
||||||
import net.osmand.plus.activities.OsmandExpandableListActivity;
|
|
||||||
import net.osmand.plus.activities.actions.ShareDialog;
|
|
||||||
import net.osmand.plus.base.MapViewTrackingUtilities;
|
|
||||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
|
||||||
import net.osmand.plus.helpers.ColorDialogs;
|
|
||||||
import net.osmand.plus.osmo.OsMoGroups.OsMoGroupsUIListener;
|
|
||||||
import net.osmand.plus.osmo.OsMoGroupsStorage.OsMoDevice;
|
|
||||||
import net.osmand.plus.osmo.OsMoGroupsStorage.OsMoGroup;
|
|
||||||
import net.osmand.plus.osmo.OsMoService.SessionInfo;
|
|
||||||
import net.osmand.util.MapUtils;
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
@ -67,6 +27,7 @@ import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.support.v4.view.MenuItemCompat;
|
import android.support.v4.view.MenuItemCompat;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.view.ActionMode;
|
import android.support.v7.view.ActionMode;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
|
@ -100,6 +61,44 @@ import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
|
import net.osmand.Location;
|
||||||
|
import net.osmand.StateChangedListener;
|
||||||
|
import net.osmand.access.AccessibleToast;
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.data.PointDescription;
|
||||||
|
import net.osmand.plus.NavigationService;
|
||||||
|
import net.osmand.plus.OsmAndConstants;
|
||||||
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
|
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
||||||
|
import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandPlugin;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.activities.OsmandBaseExpandableListAdapter;
|
||||||
|
import net.osmand.plus.activities.OsmandExpandableListActivity;
|
||||||
|
import net.osmand.plus.activities.actions.ShareDialog;
|
||||||
|
import net.osmand.plus.base.MapViewTrackingUtilities;
|
||||||
|
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||||
|
import net.osmand.plus.helpers.ColorDialogs;
|
||||||
|
import net.osmand.plus.osmo.OsMoGroups.OsMoGroupsUIListener;
|
||||||
|
import net.osmand.plus.osmo.OsMoGroupsStorage.OsMoDevice;
|
||||||
|
import net.osmand.plus.osmo.OsMoGroupsStorage.OsMoGroup;
|
||||||
|
import net.osmand.plus.osmo.OsMoService.SessionInfo;
|
||||||
|
import net.osmand.util.MapUtils;
|
||||||
|
|
||||||
|
import java.text.Collator;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import gnu.trove.list.array.TIntArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -530,7 +529,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
||||||
@Override
|
@Override
|
||||||
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
|
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
|
||||||
if (item.getItemId() == DELETE_ACTION_ID) {
|
if (item.getItemId() == DELETE_ACTION_ID) {
|
||||||
Builder bld = new AlertDialog.Builder(OsMoGroupsActivity.this);
|
AlertDialog.Builder bld = new AlertDialog.Builder(OsMoGroupsActivity.this);
|
||||||
String name = ((OsMoGroup) selectedObject).getVisibleName(OsMoGroupsActivity.this);
|
String name = ((OsMoGroup) selectedObject).getVisibleName(OsMoGroupsActivity.this);
|
||||||
bld.setTitle(getString(R.string.osmo_leave_confirmation_msg, name));
|
bld.setTitle(getString(R.string.osmo_leave_confirmation_msg, name));
|
||||||
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||||
|
@ -578,7 +577,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
||||||
|
|
||||||
|
|
||||||
protected void showGroupInfo(final OsMoGroup group) {
|
protected void showGroupInfo(final OsMoGroup group) {
|
||||||
Builder bld = new AlertDialog.Builder(this);
|
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||||
bld.setTitle(R.string.osmo_group);
|
bld.setTitle(R.string.osmo_group);
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
if (group != null){
|
if (group != null){
|
||||||
|
@ -658,7 +657,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
||||||
setSupportProgressBarIndeterminateVisibility(true);
|
setSupportProgressBarIndeterminateVisibility(true);
|
||||||
signinPost(false);
|
signinPost(false);
|
||||||
} else {
|
} else {
|
||||||
Builder bld = new AlertDialog.Builder(this);
|
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||||
String text = getString(R.string.logged_as, app.getSettings().OSMO_USER_NAME.get());
|
String text = getString(R.string.logged_as, app.getSettings().OSMO_USER_NAME.get());
|
||||||
bld.setMessage(text);
|
bld.setMessage(text);
|
||||||
bld.setPositiveButton(R.string.shared_string_ok, null);
|
bld.setPositiveButton(R.string.shared_string_ok, null);
|
||||||
|
@ -822,7 +821,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void signin() {
|
protected void signin() {
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle(R.string.osmo_sign_in);
|
builder.setTitle(R.string.osmo_sign_in);
|
||||||
String message = "";
|
String message = "";
|
||||||
if(app.getSettings().OSMO_USER_PWD.get() != null) {
|
if(app.getSettings().OSMO_USER_PWD.get() != null) {
|
||||||
|
@ -850,7 +849,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
||||||
signin();
|
signin();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Builder builder = new AlertDialog.Builder(this);
|
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle(R.string.osmo_create_group);
|
builder.setTitle(R.string.osmo_create_group);
|
||||||
final View v = getLayoutInflater().inflate(R.layout.osmo_create_group, getExpandableListView(), false);
|
final View v = getLayoutInflater().inflate(R.layout.osmo_create_group, getExpandableListView(), false);
|
||||||
final EditText policy = (EditText) v.findViewById(R.id.Policy);
|
final EditText policy = (EditText) v.findViewById(R.id.Policy);
|
||||||
|
@ -918,7 +917,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private void connectToDevice() {
|
private void connectToDevice() {
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
final View v = getLayoutInflater().inflate(R.layout.osmo_connect_to_device, getExpandableListView(), false);
|
final View v = getLayoutInflater().inflate(R.layout.osmo_connect_to_device, getExpandableListView(), false);
|
||||||
final TextView labelTracker = (TextView ) v.findViewById(R.id.LabelTrackerId);
|
final TextView labelTracker = (TextView ) v.findViewById(R.id.LabelTrackerId);
|
||||||
final TextView labelName = (TextView ) v.findViewById(R.id.LabelName);
|
final TextView labelName = (TextView ) v.findViewById(R.id.LabelName);
|
||||||
|
@ -1402,7 +1401,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
||||||
|
|
||||||
|
|
||||||
public static void showSettingsDialog(Context ctx, final OsMoPlugin plugin, final OsMoDevice device) {
|
public static void showSettingsDialog(Context ctx, final OsMoPlugin plugin, final OsMoDevice device) {
|
||||||
Builder bld = new AlertDialog.Builder(ctx);
|
AlertDialog.Builder bld = new AlertDialog.Builder(ctx);
|
||||||
bld.setTitle(R.string.osmo_edit_device);
|
bld.setTitle(R.string.osmo_edit_device);
|
||||||
final LayoutInflater inflater = LayoutInflater.from(ctx);
|
final LayoutInflater inflater = LayoutInflater.from(ctx);
|
||||||
View view = inflater.inflate(R.layout.osmo_edit_device, null);
|
View view = inflater.inflate(R.layout.osmo_edit_device, null);
|
||||||
|
@ -1526,7 +1525,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showHint() {
|
private void showHint() {
|
||||||
Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle(R.string.anonymous_user);
|
builder.setTitle(R.string.anonymous_user);
|
||||||
String message = getString(R.string.anonymous_user_hint);
|
String message = getString(R.string.anonymous_user_hint);
|
||||||
builder.setMessage(message);
|
builder.setMessage(message);
|
||||||
|
|
|
@ -1,13 +1,21 @@
|
||||||
package net.osmand.plus.osmo;
|
package net.osmand.plus.osmo;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import android.app.Activity;
|
||||||
import java.io.IOException;
|
import android.app.Notification;
|
||||||
import java.io.InputStream;
|
import android.app.NotificationManager;
|
||||||
import java.io.InputStreamReader;
|
import android.app.PendingIntent;
|
||||||
import java.util.ArrayList;
|
import android.content.BroadcastReceiver;
|
||||||
import java.util.Collections;
|
import android.content.Context;
|
||||||
import java.util.List;
|
import android.content.DialogInterface;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.IntentFilter;
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.provider.Settings.Secure;
|
||||||
|
import android.support.v4.app.NotificationCompat;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
@ -27,23 +35,14 @@ import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import android.app.Activity;
|
import java.io.BufferedReader;
|
||||||
import android.app.AlertDialog;
|
import java.io.IOException;
|
||||||
import android.app.AlertDialog.Builder;
|
import java.io.InputStream;
|
||||||
import android.app.Notification;
|
import java.io.InputStreamReader;
|
||||||
import android.app.NotificationManager;
|
import java.util.ArrayList;
|
||||||
import android.app.PendingIntent;
|
import java.util.Collections;
|
||||||
import android.content.BroadcastReceiver;
|
import java.util.List;
|
||||||
import android.content.Context;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.IntentFilter;
|
|
||||||
import android.os.AsyncTask;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.provider.Settings.Secure;
|
|
||||||
import android.support.v4.app.NotificationCompat;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
|
|
||||||
public class OsMoService implements OsMoReactor {
|
public class OsMoService implements OsMoReactor {
|
||||||
private static final String HTTP_API_PREPARE = "http://api.osmo.mobi/prepare";
|
private static final String HTTP_API_PREPARE = "http://api.osmo.mobi/prepare";
|
||||||
|
@ -362,7 +361,7 @@ public class OsMoService implements OsMoReactor {
|
||||||
|
|
||||||
|
|
||||||
protected void showRegisterAgain(Activity ga, String msg) {
|
protected void showRegisterAgain(Activity ga, String msg) {
|
||||||
Builder bld = new AlertDialog.Builder(ga);
|
AlertDialog.Builder bld = new AlertDialog.Builder(ga);
|
||||||
bld.setMessage(msg);
|
bld.setMessage(msg);
|
||||||
bld.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
bld.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package net.osmand.plus.osmo;
|
package net.osmand.plus.osmo;
|
||||||
|
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
@ -11,6 +9,7 @@ import android.os.Bundle;
|
||||||
import android.preference.CheckBoxPreference;
|
import android.preference.CheckBoxPreference;
|
||||||
import android.preference.Preference;
|
import android.preference.Preference;
|
||||||
import android.preference.PreferenceScreen;
|
import android.preference.PreferenceScreen;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
|
@ -119,7 +118,7 @@ public class SettingsOsMoActivity extends SettingsBaseActivity {
|
||||||
final OsMoPlugin plugin = OsMoPlugin.getEnabledPlugin(OsMoPlugin.class);
|
final OsMoPlugin plugin = OsMoPlugin.getEnabledPlugin(OsMoPlugin.class);
|
||||||
if (preference == debugPref) {
|
if (preference == debugPref) {
|
||||||
updateDebugPref();
|
updateDebugPref();
|
||||||
Builder bld = new AlertDialog.Builder(this);
|
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||||
StringBuilder bs = new StringBuilder();
|
StringBuilder bs = new StringBuilder();
|
||||||
List<String> hs = plugin.getService().getHistoryOfCommands();
|
List<String> hs = plugin.getService().getHistoryOfCommands();
|
||||||
if(hs != null) {
|
if(hs != null) {
|
||||||
|
@ -173,7 +172,7 @@ public class SettingsOsMoActivity extends SettingsBaseActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Builder bld = new AlertDialog.Builder(SettingsOsMoActivity.this);
|
AlertDialog.Builder bld = new AlertDialog.Builder(SettingsOsMoActivity.this);
|
||||||
bld.setMessage(R.string.osmo_regenerate_login_ids_confirm);
|
bld.setMessage(R.string.osmo_regenerate_login_ids_confirm);
|
||||||
bld.setPositiveButton(R.string.shared_string_yes, new OnClickListener() {
|
bld.setPositiveButton(R.string.shared_string_yes, new OnClickListener() {
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package net.osmand.plus.parkingpoint;
|
package net.osmand.plus.parkingpoint;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
|
@ -2,11 +2,10 @@ package net.osmand.plus.parkingpoint;
|
||||||
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.text.format.DateFormat;
|
import android.text.format.DateFormat;
|
||||||
import android.text.format.Time;
|
import android.text.format.Time;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -290,7 +289,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
||||||
* Method creates confirmation dialog for deletion of a parking location.
|
* Method creates confirmation dialog for deletion of a parking location.
|
||||||
*/
|
*/
|
||||||
public AlertDialog showDeleteDialog(final Activity activity) {
|
public AlertDialog showDeleteDialog(final Activity activity) {
|
||||||
Builder confirm = new AlertDialog.Builder(activity);
|
AlertDialog.Builder confirm = new AlertDialog.Builder(activity);
|
||||||
confirm.setTitle(activity.getString(R.string.osmand_parking_delete));
|
confirm.setTitle(activity.getString(R.string.osmand_parking_delete));
|
||||||
confirm.setMessage(activity.getString(R.string.osmand_parking_delete_confirm));
|
confirm.setMessage(activity.getString(R.string.osmand_parking_delete_confirm));
|
||||||
confirm.setCancelable(true);
|
confirm.setCancelable(true);
|
||||||
|
@ -317,7 +316,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
||||||
*/
|
*/
|
||||||
private void showSetTimeLimitDialog(final MapActivity mapActivity, final Dialog choose) {
|
private void showSetTimeLimitDialog(final MapActivity mapActivity, final Dialog choose) {
|
||||||
final View setTimeParking = mapActivity.getLayoutInflater().inflate(R.layout.parking_set_time_limit, null);
|
final View setTimeParking = mapActivity.getLayoutInflater().inflate(R.layout.parking_set_time_limit, null);
|
||||||
Builder setTime = new AlertDialog.Builder(mapActivity);
|
AlertDialog.Builder setTime = new AlertDialog.Builder(mapActivity);
|
||||||
setTime.setView(setTimeParking);
|
setTime.setView(setTimeParking);
|
||||||
setTime.setTitle(mapActivity.getString(R.string.osmand_parking_time_limit_title));
|
setTime.setTitle(mapActivity.getString(R.string.osmand_parking_time_limit_title));
|
||||||
setTime.setNegativeButton(R.string.shared_string_cancel, new DialogInterface.OnClickListener() {
|
setTime.setNegativeButton(R.string.shared_string_cancel, new DialogInterface.OnClickListener() {
|
||||||
|
@ -407,7 +406,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
||||||
*/
|
*/
|
||||||
private void showDeleteEventWarning(final Activity activity) {
|
private void showDeleteEventWarning(final Activity activity) {
|
||||||
if (isParkingEventAdded()) {
|
if (isParkingEventAdded()) {
|
||||||
Builder deleteEventWarning = new AlertDialog.Builder(activity);
|
AlertDialog.Builder deleteEventWarning = new AlertDialog.Builder(activity);
|
||||||
deleteEventWarning.setTitle(activity.getString(R.string.osmand_parking_warning));
|
deleteEventWarning.setTitle(activity.getString(R.string.osmand_parking_warning));
|
||||||
deleteEventWarning.setMessage(activity.getString(R.string.osmand_parking_warning_text));
|
deleteEventWarning.setMessage(activity.getString(R.string.osmand_parking_warning_text));
|
||||||
deleteEventWarning.setNeutralButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
deleteEventWarning.setNeutralButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
package net.osmand.plus.rastermaps;
|
package net.osmand.plus.rastermaps;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.AdapterView.OnItemSelectedListener;
|
import android.widget.AdapterView.OnItemSelectedListener;
|
||||||
|
@ -150,7 +149,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
||||||
final MapActivityLayers layers = activity.getMapLayers();
|
final MapActivityLayers layers = activity.getMapLayers();
|
||||||
Map<String, String> entriesMap = settings.getTileSourceEntries();
|
Map<String, String> entriesMap = settings.getTileSourceEntries();
|
||||||
final ArrayList<String> keys = new ArrayList<String>(entriesMap.keySet());
|
final ArrayList<String> keys = new ArrayList<String>(entriesMap.keySet());
|
||||||
Builder builder = new AlertDialog.Builder(activity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
final String[] items = new String[entriesMap.size() + 1];
|
final String[] items = new String[entriesMap.size() + 1];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for(String it : entriesMap.values()){
|
for(String it : entriesMap.values()){
|
||||||
|
@ -285,7 +284,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
||||||
AccessibleToast.makeText(activity, R.string.shared_string_io_error, Toast.LENGTH_SHORT).show();
|
AccessibleToast.makeText(activity, R.string.shared_string_io_error, Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Builder builder = new AlertDialog.Builder(activity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
String[] names = new String[downloaded.size()];
|
String[] names = new String[downloaded.size()];
|
||||||
for (int i = 0; i < names.length; i++) {
|
for (int i = 0; i < names.length; i++) {
|
||||||
names[i] = downloaded.get(i).getName();
|
names[i] = downloaded.get(i).getName();
|
||||||
|
@ -339,7 +338,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
||||||
TileSourceTemplate ts = new TileSourceTemplate("NewMapnik","http://mapnik.osmand.net/{0}/{1}/{2}.png",
|
TileSourceTemplate ts = new TileSourceTemplate("NewMapnik","http://mapnik.osmand.net/{0}/{1}/{2}.png",
|
||||||
"png", 17, 5, 256, 16, 32000);
|
"png", 17, 5, 256, 16, 32000);
|
||||||
final TileSourceTemplate[] result = new TileSourceTemplate[] { ts };
|
final TileSourceTemplate[] result = new TileSourceTemplate[] { ts };
|
||||||
Builder bld = new AlertDialog.Builder(activity);
|
AlertDialog.Builder bld = new AlertDialog.Builder(activity);
|
||||||
View view = activity.getLayoutInflater().inflate(R.layout.editing_tile_source, null);
|
View view = activity.getLayoutInflater().inflate(R.layout.editing_tile_source, null);
|
||||||
final EditText name = (EditText) view.findViewById(R.id.Name);
|
final EditText name = (EditText) view.findViewById(R.id.Name);
|
||||||
final Spinner existing = (Spinner) view.findViewById(R.id.TileSourceSpinner);
|
final Spinner existing = (Spinner) view.findViewById(R.id.TileSourceSpinner);
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package net.osmand.plus.views;
|
package net.osmand.plus.views;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
@ -10,6 +9,7 @@ import android.graphics.PointF;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
package net.osmand.plus.views;
|
package net.osmand.plus.views;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import android.content.Context;
|
||||||
import java.util.List;
|
import android.graphics.Canvas;
|
||||||
|
import android.graphics.Paint;
|
||||||
|
import android.graphics.PointF;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
import net.osmand.access.AccessibleToast;
|
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.data.PointDescription;
|
import net.osmand.data.PointDescription;
|
||||||
import net.osmand.data.QuadRect;
|
import net.osmand.data.QuadRect;
|
||||||
|
@ -13,16 +18,9 @@ import net.osmand.plus.ContextMenuAdapter;
|
||||||
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.resources.TransportIndexRepository;
|
import net.osmand.plus.resources.TransportIndexRepository;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
import java.util.ArrayList;
|
||||||
import android.content.Context;
|
import java.util.List;
|
||||||
import android.graphics.Canvas;
|
|
||||||
import android.graphics.Paint;
|
|
||||||
import android.graphics.PointF;
|
|
||||||
import android.util.DisplayMetrics;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider {
|
public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider {
|
||||||
private static final int startZoom = 12;
|
private static final int startZoom = 12;
|
||||||
|
@ -164,7 +162,7 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showDescriptionDialog(TransportStop a) {
|
private void showDescriptionDialog(TransportStop a) {
|
||||||
Builder bs = new AlertDialog.Builder(view.getContext());
|
AlertDialog.Builder bs = new AlertDialog.Builder(view.getContext());
|
||||||
bs.setTitle(a.getName(view.getSettings().MAP_PREFERRED_LOCALE.get()));
|
bs.setTitle(a.getName(view.getSettings().MAP_PREFERRED_LOCALE.get()));
|
||||||
bs.setMessage(getStopDescription(a, true));
|
bs.setMessage(getStopDescription(a, true));
|
||||||
bs.show();
|
bs.show();
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
package net.osmand.plus.views.mapwidgets;
|
package net.osmand.plus.views.mapwidgets;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import net.osmand.Location;
|
import net.osmand.Location;
|
||||||
import net.osmand.ValueHolder;
|
import net.osmand.ValueHolder;
|
||||||
import net.osmand.binary.RouteDataObject;
|
import net.osmand.binary.RouteDataObject;
|
||||||
|
@ -25,17 +36,6 @@ import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
|
||||||
import net.osmand.plus.views.controls.MapRouteInfoControl;
|
import net.osmand.plus.views.controls.MapRouteInfoControl;
|
||||||
import net.osmand.plus.views.mapwidgets.NextTurnInfoWidget.TurnDrawable;
|
import net.osmand.plus.views.mapwidgets.NextTurnInfoWidget.TurnDrawable;
|
||||||
import net.osmand.router.TurnType;
|
import net.osmand.router.TurnType;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.util.DisplayMetrics;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
public class MapInfoWidgetsFactory {
|
public class MapInfoWidgetsFactory {
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ public class MapInfoWidgetsFactory {
|
||||||
final ValueHolder<Integer> vs = new ValueHolder<Integer>();
|
final ValueHolder<Integer> vs = new ValueHolder<Integer>();
|
||||||
vs.value = app.getSettings().SERVICE_OFF_INTERVAL.get();
|
vs.value = app.getSettings().SERVICE_OFF_INTERVAL.get();
|
||||||
final AlertDialog[] dlgshow = new AlertDialog[1];
|
final AlertDialog[] dlgshow = new AlertDialog[1];
|
||||||
Builder dlg = new AlertDialog.Builder(map);
|
AlertDialog.Builder dlg = new AlertDialog.Builder(map);
|
||||||
dlg.setTitle(app.getString(R.string.enable_sleep_mode));
|
dlg.setTitle(app.getString(R.string.enable_sleep_mode));
|
||||||
WindowManager mgr = (WindowManager) map.getSystemService(Context.WINDOW_SERVICE);
|
WindowManager mgr = (WindowManager) map.getSystemService(Context.WINDOW_SERVICE);
|
||||||
DisplayMetrics dm = new DisplayMetrics();
|
DisplayMetrics dm = new DisplayMetrics();
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package net.osmand.plus.voice;
|
package net.osmand.plus.voice;
|
||||||
|
|
||||||
import java.io.File;
|
import android.app.Activity;
|
||||||
import java.util.HashMap;
|
import android.content.Context;
|
||||||
import java.util.List;
|
import android.content.DialogInterface;
|
||||||
import java.util.Locale;
|
import android.content.Intent;
|
||||||
import java.util.Map;
|
import android.net.Uri;
|
||||||
|
import android.speech.tts.TextToSpeech;
|
||||||
|
import android.speech.tts.TextToSpeech.OnInitListener;
|
||||||
|
import android.speech.tts.TextToSpeech.OnUtteranceCompletedListener;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
import android.app.Notification;
|
|
||||||
import android.app.PendingIntent;
|
|
||||||
import android.support.v4.app.NotificationCompat;
|
|
||||||
import android.support.v4.app.NotificationManagerCompat;
|
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
@ -21,16 +21,11 @@ import org.apache.commons.logging.Log;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import android.app.Activity;
|
import java.io.File;
|
||||||
import android.app.AlertDialog;
|
import java.util.HashMap;
|
||||||
import android.app.AlertDialog.Builder;
|
import java.util.List;
|
||||||
import android.content.Context;
|
import java.util.Locale;
|
||||||
import android.content.DialogInterface;
|
import java.util.Map;
|
||||||
import android.content.Intent;
|
|
||||||
import android.net.Uri;
|
|
||||||
import android.speech.tts.TextToSpeech;
|
|
||||||
import android.speech.tts.TextToSpeech.OnInitListener;
|
|
||||||
import android.speech.tts.TextToSpeech.OnUtteranceCompletedListener;
|
|
||||||
|
|
||||||
|
|
||||||
public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
||||||
|
@ -161,7 +156,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
||||||
{
|
{
|
||||||
case TextToSpeech.LANG_MISSING_DATA:
|
case TextToSpeech.LANG_MISSING_DATA:
|
||||||
if (isSettingsActivity(act)) {
|
if (isSettingsActivity(act)) {
|
||||||
Builder builder = createAlertDialog(
|
AlertDialog.Builder builder = createAlertDialog(
|
||||||
R.string.tts_missing_language_data_title,
|
R.string.tts_missing_language_data_title,
|
||||||
R.string.tts_missing_language_data,
|
R.string.tts_missing_language_data,
|
||||||
new IntentStarter(
|
new IntentStarter(
|
||||||
|
@ -183,7 +178,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
||||||
//maybe weird, but I didn't want to introduce parameter in around 5 methods just to do
|
//maybe weird, but I didn't want to introduce parameter in around 5 methods just to do
|
||||||
//this if condition
|
//this if condition
|
||||||
if (isSettingsActivity(act)) {
|
if (isSettingsActivity(act)) {
|
||||||
Builder builder = createAlertDialog(
|
AlertDialog.Builder builder = createAlertDialog(
|
||||||
R.string.tts_language_not_supported_title,
|
R.string.tts_language_not_supported_title,
|
||||||
R.string.tts_language_not_supported,
|
R.string.tts_language_not_supported,
|
||||||
new IntentStarter(
|
new IntentStarter(
|
||||||
|
@ -214,9 +209,9 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Builder createAlertDialog(int titleResID, int messageResID,
|
private AlertDialog.Builder createAlertDialog(int titleResID, int messageResID,
|
||||||
IntentStarter intentStarter, final Activity ctx) {
|
IntentStarter intentStarter, final Activity ctx) {
|
||||||
Builder builder = new AlertDialog.Builder(ctx);
|
AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
|
||||||
builder.setCancelable(true);
|
builder.setCancelable(true);
|
||||||
builder.setNegativeButton(R.string.shared_string_no, null);
|
builder.setNegativeButton(R.string.shared_string_no, null);
|
||||||
builder.setPositiveButton(R.string.shared_string_yes, intentStarter);
|
builder.setPositiveButton(R.string.shared_string_yes, intentStarter);
|
||||||
|
|
|
@ -2,7 +2,7 @@ package net.osmand.nautical;
|
||||||
|
|
||||||
import net.osmand.nauticalPlugin.R;
|
import net.osmand.nauticalPlugin.R;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.osmand.parkingPlugin;
|
package net.osmand.parkingPlugin;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
@ -10,6 +9,7 @@ import android.content.pm.PackageManager;
|
||||||
import android.content.pm.ResolveInfo;
|
import android.content.pm.ResolveInfo;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
public class ParkingPluginActivity extends Activity {
|
public class ParkingPluginActivity extends Activity {
|
||||||
private static final String OSMAND_COMPONENT = "net.osmand"; //$NON-NLS-1$
|
private static final String OSMAND_COMPONENT = "net.osmand"; //$NON-NLS-1$
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package net.osmand.srtmPlugin;
|
package net.osmand.srtmPlugin;
|
||||||
|
|
||||||
import net.osmand.srtmPlugin.paid.R;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
@ -11,6 +9,9 @@ import android.content.pm.PackageManager;
|
||||||
import android.content.pm.ResolveInfo;
|
import android.content.pm.ResolveInfo;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
|
import net.osmand.srtmPlugin.paid.R;
|
||||||
|
|
||||||
public class SRTMPluginActivity extends Activity {
|
public class SRTMPluginActivity extends Activity {
|
||||||
private static final String OSMAND_COMPONENT = "net.osmand"; //$NON-NLS-1$
|
private static final String OSMAND_COMPONENT = "net.osmand"; //$NON-NLS-1$
|
||||||
|
|
|
@ -2,7 +2,7 @@ package net.osmand.skimaps;
|
||||||
|
|
||||||
import net.osmand.skimapsPlugin.R;
|
import net.osmand.skimapsPlugin.R;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
|
Loading…
Reference in a new issue