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"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="net.osmand.plus"
|
||||
android:installLocation="auto"
|
||||
android:versionName="@string/app_version"
|
||||
android:versionCode="231"
|
||||
package="net.osmand.plus">
|
||||
|
||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
|
||||
android:versionName="@string/app_version" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="14"
|
||||
android:targetSdkVersion="21" />
|
||||
|
||||
<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_LOCATION_EXTRA_COMMANDS" />
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.STORAGE" />
|
||||
|
@ -22,42 +22,96 @@
|
|||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<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" />
|
||||
<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" />
|
||||
<android:uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<android:uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- android:theme="@style/OsmandLightDarkActionBarTheme" -->
|
||||
<application
|
||||
android:name=".OsmandApplication"
|
||||
android:allowBackup="true"
|
||||
android:backupAgent=".OsmandBackupAgent"
|
||||
android:configChanges="locale"
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/app_name"
|
||||
android:largeHeap="true"
|
||||
android:restoreAnyVersion="true"
|
||||
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="" />
|
||||
|
||||
|
||||
<supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true"
|
||||
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" />
|
||||
<activity android:name=".activities.HelpActivity" />
|
||||
<activity android:name=".activities.ExitActivity" />
|
||||
|
||||
<provider
|
||||
android:name="android.support.v4.content.FileProvider"
|
||||
|
@ -69,27 +123,39 @@
|
|||
android:resource="@xml/paths" />
|
||||
</provider>
|
||||
|
||||
<activity android:name="net.osmand.plus.activities.MapActivity" android:label="@string/app_name"
|
||||
android:screenOrientation="unspecified" android:launchMode="singleTop">
|
||||
<activity
|
||||
android:name=".activities.MapActivity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="unspecified" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<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>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<data android:scheme="http" />
|
||||
<data android:host="osmand.net" />
|
||||
<data android:pathPrefix="/go" />
|
||||
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<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.DESK_DOCK" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<data android:scheme="https" />
|
||||
<data android:host="osmand.net" />
|
||||
<data android:pathPrefix="/go" />
|
||||
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.APP_MAPS" />
|
||||
|
@ -111,92 +178,178 @@
|
|||
<category android:name="android.intent.category.DESK_DOCK" />
|
||||
</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 -->
|
||||
<!-- mimeType&host are both needed or you will either have unwanted matching or no match when needed -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<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 android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\.gpx" />
|
||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\..*\\.gpx" />
|
||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\..*\\..*\\.gpx" />
|
||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\.kml" />
|
||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\.kml" />
|
||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\.kml" />
|
||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\..*\\.kml" />
|
||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\..*\\..*\\.kml" />
|
||||
|
||||
<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=".*\\..*\\..*\\..*\\.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>
|
||||
|
||||
<!-- google navigation intent -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:scheme="google.navigation" />
|
||||
<data android:scheme="osmand.navigation" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<receiver android:name="net.osmand.plus.audionotes.MediaRemoteControlReceiver">
|
||||
<receiver android:name=".audionotes.MediaRemoteControlReceiver" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.CAMERA_BUTTON" />
|
||||
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<activity android:name="net.osmand.plus.activities.SettingsActivity" android:label="@string/shared_string_settings" android:configChanges="keyboardHidden|orientation" />
|
||||
<activity android:name="net.osmand.plus.activities.SettingsGeneralActivity" android:configChanges="keyboardHidden|orientation" />
|
||||
<activity android:name="net.osmand.plus.activities.SettingsNavigationActivity" android:configChanges="keyboardHidden|orientation" />
|
||||
<activity android:name="net.osmand.plus.monitoring.SettingsMonitoringActivity" android:configChanges="keyboardHidden|orientation" />
|
||||
<activity android:name="net.osmand.plus.rastermaps.SettingsRasterMapsActivity" android:configChanges="keyboardHidden|orientation" />
|
||||
<activity android:name="net.osmand.plus.routepointsnavigation.RoutePointsActivity" />
|
||||
|
||||
<activity android:name="net.osmand.plus.osmedit.SettingsOsmEditingActivity" android:configChanges="keyboardHidden|orientation" />
|
||||
<activity android:name="net.osmand.plus.development.SettingsDevelopmentActivity" android:configChanges="keyboardHidden|orientation" />
|
||||
<activity android:name="net.osmand.plus.audionotes.SettingsAudioVideoActivity" android:configChanges="keyboardHidden|orientation" />
|
||||
<activity android:name="net.osmand.access.SettingsAccessibilityActivity" android:configChanges="keyboardHidden|orientation" />
|
||||
|
||||
<activity android:name="net.osmand.plus.activities.search.SearchActivity" android:label="@string/search_activity" />
|
||||
<activity android:name="net.osmand.plus.activities.ShowRouteInfoActivity" android:label="@string/show_route" />
|
||||
<activity android:name="net.osmand.plus.activities.FavoritesListActivity" android:label="@string/favourites_list_activity" />
|
||||
<activity android:name=".myplaces.FavoritesActivity" android:windowSoftInputMode="adjustPan" />
|
||||
<activity android:name="net.osmand.plus.activities.TrackActivity"/>
|
||||
<activity android:name="net.osmand.plus.activities.PluginsActivity" />
|
||||
<activity android:name="net.osmand.plus.activities.PluginActivity" />
|
||||
<activity android:name="net.osmand.plus.activities.ContributionVersionActivity" android:configChanges="keyboardHidden|orientation" android:label="@string/contribution_activity" />
|
||||
|
||||
|
||||
<activity android:name="net.osmand.plus.osmo.SettingsOsMoActivity" android:configChanges="keyboardHidden|orientation" />
|
||||
<activity android:name="net.osmand.plus.osmo.OsMoGroupsActivity">
|
||||
<activity
|
||||
android:name=".activities.SettingsActivity"
|
||||
android:configChanges="keyboardHidden|orientation"
|
||||
android:label="@string/shared_string_settings" />
|
||||
<activity
|
||||
android:name=".activities.SettingsGeneralActivity"
|
||||
android:configChanges="keyboardHidden|orientation" />
|
||||
<activity
|
||||
android:name=".activities.SettingsNavigationActivity"
|
||||
android:configChanges="keyboardHidden|orientation" />
|
||||
<activity
|
||||
android:name=".monitoring.SettingsMonitoringActivity"
|
||||
android:configChanges="keyboardHidden|orientation" />
|
||||
<activity
|
||||
android:name=".rastermaps.SettingsRasterMapsActivity"
|
||||
android:configChanges="keyboardHidden|orientation" />
|
||||
<activity android:name=".routepointsnavigation.RoutePointsActivity" />
|
||||
<activity
|
||||
android:name=".osmedit.SettingsOsmEditingActivity"
|
||||
android:configChanges="keyboardHidden|orientation" />
|
||||
<activity
|
||||
android:name=".development.SettingsDevelopmentActivity"
|
||||
android:configChanges="keyboardHidden|orientation" />
|
||||
<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>
|
||||
<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" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name="net.osmand.plus.activities.search.SearchPOIActivity" android:label="@string/searchpoi_activity" />
|
||||
<activity android:name="net.osmand.plus.activities.search.SearchAddressActivity" android:label="@string/select_address_activity" />
|
||||
<activity android:name="net.osmand.plus.activities.search.SearchCityByNameActivity" />
|
||||
<activity android:name="net.osmand.plus.activities.search.SearchRegionByNameActivity" />
|
||||
<activity android:name="net.osmand.plus.activities.search.SearchStreetByNameActivity" />
|
||||
<activity android:name="net.osmand.plus.activities.search.SearchStreet2ByNameActivity" />
|
||||
<activity android:name="net.osmand.plus.activities.search.SearchBuildingByNameActivity" />
|
||||
<activity android:name="net.osmand.plus.sherpafy.TourViewActivity" android:exported="true"
|
||||
android:launchMode= "singleInstance" android:label="Sherpafy" />
|
||||
<activity android:name="net.osmand.plus.activities.EditPOIFilterActivity" />
|
||||
|
||||
<activity android:name="net.osmand.plus.activities.search.GeoIntentActivity" android:label="@string/app_name">
|
||||
<activity
|
||||
android:name=".activities.search.SearchPOIActivity"
|
||||
android:label="@string/searchpoi_activity" />
|
||||
<activity
|
||||
android:name=".activities.search.SearchAddressActivity"
|
||||
android:label="@string/select_address_activity" />
|
||||
<activity android:name=".activities.search.SearchCityByNameActivity" />
|
||||
<activity android:name=".activities.search.SearchRegionByNameActivity" />
|
||||
<activity android:name=".activities.search.SearchStreetByNameActivity" />
|
||||
<activity android:name=".activities.search.SearchStreet2ByNameActivity" />
|
||||
<activity android:name=".activities.search.SearchBuildingByNameActivity" />
|
||||
<activity
|
||||
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>
|
||||
<data android:scheme="osmand.geo" />
|
||||
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<data android:scheme="geo" />
|
||||
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
|
@ -219,28 +372,54 @@
|
|||
<data android:host="map.wap.qq.com" />
|
||||
<data android:host="map.qq.com" />
|
||||
<data android:host="maps.apple.com" />
|
||||
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<data android:scheme="http" android:host="www.google.com" android:pathPrefix="/maps" />
|
||||
<data android:scheme="https" android:host="www.google.com" android:pathPrefix="/maps" />
|
||||
<data
|
||||
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" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<data android:scheme="http" android:host="openstreetmap.de" android:pathPrefix="/karte" />
|
||||
<data android:scheme="https" android:host="openstreetmap.de" android:pathPrefix="/karte" />
|
||||
<data
|
||||
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" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<data android:scheme="http" android:host="download.osmand.net" android:pathPrefix="/go" />
|
||||
<data android:scheme="http" android:host="download.osmand.net" android:pathPrefix="go" />
|
||||
<data
|
||||
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" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.APP_MAPS" />
|
||||
|
@ -257,26 +436,28 @@
|
|||
</intent-filter>
|
||||
-->
|
||||
</activity>
|
||||
|
||||
<activity android:name="net.osmand.plus.development.TestVoiceActivity" />
|
||||
<activity android:name="net.osmand.plus.download.DownloadActivity" android:label="" />
|
||||
<activity android:name=".development.TestVoiceActivity" />
|
||||
<activity
|
||||
android:name=".download.DownloadActivity"
|
||||
android:label="" />
|
||||
|
||||
<!-- keep android:process on a separate line !! -->
|
||||
<service
|
||||
android:process="net.osmand.plus"
|
||||
android:name=".NavigationService"
|
||||
android:label="@string/process_navigation_service"
|
||||
android:name="net.osmand.plus.NavigationService"
|
||||
android:process="net.osmand.plus"
|
||||
android:stopWithTask="false" >
|
||||
<intent-filter>
|
||||
<action android:name="net.osmand.plus.NavigationService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<receiver android:name="net.osmand.plus.OnNavigationServiceAlarmReceiver" />
|
||||
<activity android:name="net.osmand.plus.activities.PrintDialogActivity" />
|
||||
<receiver android:name=".OnNavigationServiceAlarmReceiver" />
|
||||
|
||||
<activity android:name=".activities.PrintDialogActivity" />
|
||||
|
||||
<receiver
|
||||
android:name="net.osmand.plus.DeviceAdminRecv"
|
||||
android:name=".DeviceAdminRecv"
|
||||
android:label="@string/app_name"
|
||||
android:permission="android.permission.BIND_DEVICE_ADMIN" >
|
||||
<meta-data
|
||||
|
@ -288,5 +469,9 @@
|
|||
<action android:name="android.app.action.DEVICE_ADMIN_DISABLED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<activity android:name=".activities.AppCompatPreferenceActivity" >
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package net.osmand.access;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
|
||||
// Since usual message in an AlertDialog that is set by
|
||||
// AlertDialog.Builder.setMessage() is spoken only once
|
||||
|
@ -17,7 +18,7 @@ import android.content.Context;
|
|||
// or system accessibility service is turned off this class
|
||||
// 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
|
||||
// starting from API level 11, so store it here.
|
||||
|
@ -33,14 +34,14 @@ public class AccessibleAlertBuilder extends Builder {
|
|||
// Provided setMessage() alternatives.
|
||||
|
||||
@Override
|
||||
public Builder setMessage(CharSequence msg) {
|
||||
public AlertDialog.Builder setMessage(CharSequence msg) {
|
||||
if (((OsmandApplication) context.getApplicationContext()).accessibilityExtensions())
|
||||
return setView(TextMessage.makeView(context, msg, R.layout.alert));
|
||||
return super.setMessage(msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder setMessage(int msgid) {
|
||||
public AlertDialog.Builder setMessage(int msgid) {
|
||||
if (((OsmandApplication) context.getApplicationContext()).accessibilityExtensions())
|
||||
return setView(TextMessage.makeView(context, msgid, R.layout.alert));
|
||||
return super.setMessage(msgid);
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package net.osmand.access;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.SystemClock;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
import net.osmand.Location;
|
||||
import net.osmand.data.LatLon;
|
||||
|
@ -12,10 +14,9 @@ import net.osmand.plus.OsmandSettings;
|
|||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
||||
import net.osmand.plus.access.RelativeDirectionStyle;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.SystemClock;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class NavigationInfo {
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package net.osmand.plus;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
import net.osmand.IProgress;
|
||||
import net.osmand.IndexConstants;
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
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.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
|
@ -12,19 +25,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
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 interface FavoritesUpdatedListener {
|
||||
|
|
|
@ -1,24 +1,5 @@
|
|||
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.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
@ -36,8 +17,28 @@ import android.location.LocationManager;
|
|||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
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 {
|
||||
|
||||
private static final String SIMULATED_PROVIDER = "OsmAnd";
|
||||
|
|
|
@ -1,18 +1,9 @@
|
|||
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.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.View;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
|
@ -22,6 +13,15 @@ import android.widget.SeekBar;
|
|||
import android.widget.TextView;
|
||||
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 {
|
||||
|
||||
private Thread routeAnimation;
|
||||
|
@ -53,7 +53,7 @@ public class OsmAndLocationSimulation {
|
|||
|
||||
public void startStopRouteAnimation(final Activity ma, final Runnable runnable) {
|
||||
if (!isRouteAnimating()) {
|
||||
Builder builder = new AlertDialog.Builder(ma);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(ma);
|
||||
builder.setTitle(R.string.animate_route);
|
||||
|
||||
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.AlarmManager;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Application;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
|
@ -16,6 +14,7 @@ import android.os.AsyncTask;
|
|||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.text.format.DateFormat;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
|
@ -342,7 +341,7 @@ public class OsmandApplication extends Application {
|
|||
String voiceProvider = osmandSettings.VOICE_PROVIDER.get();
|
||||
if (voiceProvider == null || OsmandSettings.VOICE_PROVIDER_NOT_USE.equals(voiceProvider)) {
|
||||
if (warningNoneProvider && voiceProvider == null) {
|
||||
Builder builder = new AccessibleAlertBuilder(uiContext);
|
||||
AlertDialog.Builder builder = new AccessibleAlertBuilder(uiContext);
|
||||
LinearLayout ll = new LinearLayout(uiContext);
|
||||
ll.setOrientation(LinearLayout.VERTICAL);
|
||||
final TextView tv = new TextView(uiContext);
|
||||
|
@ -408,7 +407,7 @@ public class OsmandApplication extends Application {
|
|||
|
||||
public synchronized void closeApplication(final Activity activity) {
|
||||
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.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
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.os.Build.VERSION;
|
||||
import android.os.Build.VERSION_CODES;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.TypedValue;
|
||||
|
@ -15,7 +11,11 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
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 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;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Filterable;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
|
@ -20,21 +23,16 @@ import net.osmand.plus.R;
|
|||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserFactory;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Filterable;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.net.URLConnection;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class ContributionVersionActivity extends OsmandListActivity {
|
||||
|
||||
|
@ -210,7 +208,7 @@ public class ContributionVersionActivity extends OsmandListActivity {
|
|||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
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,
|
||||
AndroidUtils.formatDateTime(getMyApplication(), item.date.getTime()), item.size));
|
||||
builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
package net.osmand.plus.activities;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
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.access.AccessibleToast;
|
||||
|
@ -23,18 +29,8 @@ import net.osmand.util.MapUtils;
|
|||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
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;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
public class DownloadTilesDialog {
|
||||
|
||||
|
@ -67,7 +63,7 @@ public class DownloadTilesDialog {
|
|||
final int zoom = rb.getZoom();
|
||||
|
||||
// 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);
|
||||
View view = inflater.inflate(R.layout.download_tiles, null);
|
||||
|
||||
|
|
|
@ -4,27 +4,10 @@
|
|||
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.os.Bundle;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
@ -35,9 +18,25 @@ import android.widget.AdapterView;
|
|||
import android.widget.ArrayAdapter;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ScrollView;
|
||||
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();
|
||||
View v = lv.getChildAt(0);
|
||||
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>();
|
||||
Set<String> acceptedCategories = filter.getAcceptedSubtypes(poiCategory);
|
||||
if (acceptedCategories != null) {
|
||||
|
|
|
@ -1,16 +1,39 @@
|
|||
package net.osmand.plus.activities;
|
||||
|
||||
import gnu.trove.list.array.TIntArrayList;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
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.data.FavouritePoint;
|
||||
|
@ -32,41 +55,18 @@ import net.osmand.plus.helpers.ColorDialogs;
|
|||
import net.osmand.plus.myplaces.FavoritesActivity;
|
||||
import net.osmand.util.Algorithms;
|
||||
import net.osmand.util.MapUtils;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
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;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import gnu.trove.list.array.TIntArrayList;
|
||||
|
||||
|
||||
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) {
|
||||
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);
|
||||
final View v = LayoutInflater.from(ctx).inflate(R.layout.favorite_edit_dialog,
|
||||
null, false);
|
||||
|
@ -247,7 +247,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
|
||||
private boolean deletePoint(final FavouritePoint point) {
|
||||
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.setNegativeButton(R.string.shared_string_no, null);
|
||||
builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||
|
@ -295,7 +295,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
final TargetPointsHelper targetPointsHelper = getMyApplication().getTargetPointsHelper();
|
||||
if (targetPointsHelper.getIntermediatePoints().size() > 0) {
|
||||
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.setItems(
|
||||
new String[] { act.getString(R.string.keep_intermediate_points),
|
||||
|
@ -491,7 +491,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
final EditText nameEditText = (EditText) view.findViewById(R.id.nameEditText);
|
||||
|
@ -532,7 +532,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
private void deleteFavoritesAction() {
|
||||
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.setPositiveButton(R.string.shared_string_delete, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
|
@ -615,7 +615,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
};
|
||||
|
||||
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() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
|
|
@ -1,29 +1,12 @@
|
|||
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.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnShowListener;
|
||||
import android.graphics.Color;
|
||||
import android.os.AsyncTask;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
|
@ -38,6 +21,23 @@ import android.widget.ListView;
|
|||
import android.widget.ProgressBar;
|
||||
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 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.setInverseBackgroundForced(true);
|
||||
lv.setBackgroundColor(Color.WHITE);
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package net.osmand.plus.activities;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -20,6 +19,7 @@ import android.widget.EditText;
|
|||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.londatiga.android.ActionItem;
|
||||
import net.londatiga.android.QuickAction;
|
||||
import net.osmand.IndexConstants;
|
||||
|
@ -111,7 +111,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
|
||||
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);
|
||||
final ArrayAdapter<?> listAdapter =
|
||||
adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent());
|
||||
|
@ -193,7 +193,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
}
|
||||
|
||||
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);
|
||||
View view = mapActivity.getLayoutInflater().inflate(R.layout.add_gpx_point_dialog, null);
|
||||
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);
|
||||
getMyApplication().getAppCustomization().prepareLocationMenu(mapActivity, adapter);
|
||||
|
||||
final Builder builder = new AlertDialog.Builder(mapActivity);
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity);
|
||||
final ArrayAdapter<?> listAdapter =
|
||||
adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent());
|
||||
builder.setAdapter(listAdapter, new DialogInterface.OnClickListener() {
|
||||
|
@ -410,7 +410,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
}
|
||||
|
||||
if (gpxFiles.size() > 0 && !useCurrentGPX) {
|
||||
Builder bld = new AlertDialog.Builder(mapActivity);
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(mapActivity);
|
||||
if (gpxFiles.size() == 1) {
|
||||
bld.setMessage(R.string.use_displayed_track_for_navigation);
|
||||
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) {
|
||||
Builder builder = new AccessibleAlertBuilder(mapActivity);
|
||||
AlertDialog.Builder builder = new AccessibleAlertBuilder(mapActivity);
|
||||
builder.setMessage(R.string.context_menu_item_update_map_confirm);
|
||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
||||
final OsmandMapTileView mapView = mapActivity.getMapView();
|
||||
|
@ -561,7 +561,6 @@ public class MapActivityActions implements DialogProvider {
|
|||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(int id) {
|
||||
Bundle args = dialogBundle;
|
||||
|
@ -799,7 +798,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
}
|
||||
|
||||
public AlertDialog stopNavigationActionConfirm() {
|
||||
Builder builder = new AlertDialog.Builder(mapActivity);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity);
|
||||
// Stop the navigation
|
||||
builder.setTitle(getString(R.string.cancel_route));
|
||||
builder.setMessage(getString(R.string.stop_routing_confirm));
|
||||
|
@ -814,7 +813,6 @@ public class MapActivityActions implements DialogProvider {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public void whereAmIDialog() {
|
||||
final List<String> items = new ArrayList<String>();
|
||||
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,
|
||||
final OnClickListener onShow) {
|
||||
OsmandApplication app = (OsmandApplication) activity.getApplication();
|
||||
if (app.accessibilityEnabled()) {
|
||||
Builder builder = new AlertDialog.Builder(activity);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
String[] values = qa.getItemNames();
|
||||
builder.setItems(values, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -1,20 +1,10 @@
|
|||
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.DialogInterface;
|
||||
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
||||
import android.graphics.Typeface;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.text.format.DateFormat;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -26,6 +16,16 @@ import android.widget.TextView;
|
|||
import android.widget.TimePicker;
|
||||
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 {
|
||||
|
||||
private final Context ctx;
|
||||
|
@ -160,7 +160,7 @@ public class OpeningHoursView {
|
|||
}
|
||||
|
||||
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;
|
||||
Calendar inst = Calendar.getInstance();
|
||||
|
|
|
@ -1,13 +1,25 @@
|
|||
package net.osmand.plus.activities;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
||||
import android.os.Bundle;
|
||||
import android.preference.CheckBoxPreference;
|
||||
import android.preference.EditTextPreference;
|
||||
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.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.plus.ApplicationMode;
|
||||
|
@ -18,28 +30,15 @@ import net.osmand.plus.OsmandSettings.OsmandPreference;
|
|||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.actions.AppModeDialog;
|
||||
import net.osmand.plus.views.SeekBarPreference;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.preference.CheckBoxPreference;
|
||||
import android.preference.EditTextPreference;
|
||||
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;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
|
||||
|
@ -399,7 +398,7 @@ public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
|
|||
}
|
||||
|
||||
protected void profileDialog() {
|
||||
Builder b = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder b = new AlertDialog.Builder(this);
|
||||
final Set<ApplicationMode> selected = new LinkedHashSet<ApplicationMode>();
|
||||
View v = AppModeDialog.prepareAppModeView(this, selected, false, null, true,
|
||||
new View.OnClickListener() {
|
||||
|
@ -538,7 +537,7 @@ public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
|
|||
|
||||
|
||||
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];
|
||||
for (int i = 0; i < prefs.length; i++) {
|
||||
checkedItems[i] = prefs[i].get();
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package net.osmand.plus.activities;
|
||||
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
|
@ -21,9 +19,11 @@ 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.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.osmand.IProgress;
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
|
@ -73,7 +73,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
|||
settings = getMyApplication().getSettings();
|
||||
|
||||
|
||||
|
||||
ApplicationMode[] appModes = ApplicationMode.values(settings).toArray(new ApplicationMode[0]);
|
||||
entries = new String[appModes.length];
|
||||
for (int i = 0; i < entries.length; i++) {
|
||||
|
@ -102,7 +101,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
|||
}
|
||||
|
||||
|
||||
|
||||
private void addVoicePrefs(PreferenceGroup cat) {
|
||||
if (!Version.isBlackberry((OsmandApplication) getApplication())) {
|
||||
ListPreference lp = createListPreference(
|
||||
|
@ -131,7 +129,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
|||
}
|
||||
|
||||
|
||||
|
||||
private void addLocalPrefs(PreferenceGroup screen) {
|
||||
String[] entries;
|
||||
String[] entrieValues;
|
||||
|
@ -337,7 +334,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
|||
}
|
||||
|
||||
private void showAppDirDialogV19() {
|
||||
Builder bld = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||
ChooseAppDirFragment frg = new DashChooseAppDirFragment.ChooseAppDirFragment(this, (Dialog) null);
|
||||
bld.setView(frg.initView(getLayoutInflater(), null, null));
|
||||
AlertDialog dlg = bld.show();
|
||||
|
@ -345,7 +342,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
|||
}
|
||||
|
||||
|
||||
|
||||
private void addMiscPreferences(PreferenceGroup misc) {
|
||||
if (!Version.isBlackberry(getMyApplication())) {
|
||||
applicationDir = new Preference(this);
|
||||
|
@ -388,7 +384,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
|||
}
|
||||
|
||||
|
||||
|
||||
private void updateApplicationDirTextAndSummary() {
|
||||
if (applicationDir != null) {
|
||||
String storageDir = settings.getExternalStorageDirectory().getAbsolutePath();
|
||||
|
@ -445,9 +440,8 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
|||
}
|
||||
|
||||
|
||||
|
||||
private void restartApp() {
|
||||
Builder bld = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||
bld.setMessage(R.string.restart_is_required);
|
||||
bld.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
||||
|
||||
|
@ -463,7 +457,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
|||
}
|
||||
|
||||
|
||||
|
||||
private void warnAboutChangingStorage(final String newValue) {
|
||||
String newDir = newValue != null ? newValue.trim() : newValue;
|
||||
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();
|
||||
return;
|
||||
}
|
||||
Builder builder = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setMessage(getString(R.string.application_dir_change_warning3));
|
||||
builder.setPositiveButton(R.string.shared_string_yes, new OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
package net.osmand.plus.activities;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.ComponentName;
|
||||
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.DeviceAdminRecv;
|
||||
|
@ -18,19 +27,10 @@ import net.osmand.plus.routing.RouteProvider.RouteService;
|
|||
import net.osmand.router.GeneralRouter;
|
||||
import net.osmand.router.GeneralRouter.RoutingParameter;
|
||||
import net.osmand.router.GeneralRouter.RoutingParameterType;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.ComponentName;
|
||||
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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class SettingsNavigationActivity extends SettingsBaseActivity {
|
||||
|
||||
|
@ -391,7 +391,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
|
|||
}
|
||||
|
||||
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.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) {
|
||||
Builder bld = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||
boolean[] checkedItems = new boolean[prefs.length];
|
||||
for (int i = 0; i < prefs.length; i++) {
|
||||
checkedItems[i] = prefs[i].get();
|
||||
|
|
|
@ -1,15 +1,6 @@
|
|||
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.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -18,10 +9,19 @@ import android.content.pm.PackageManager;
|
|||
import android.content.pm.ResolveInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.text.ClipboardManager;
|
||||
import android.text.Html;
|
||||
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 {
|
||||
|
||||
private Activity a;
|
||||
|
@ -113,7 +113,7 @@ public class ShareDialog {
|
|||
if(type == ACTION) {
|
||||
runnable.run();
|
||||
} else if(type == VIEW) {
|
||||
Builder bld = new AlertDialog.Builder(a);
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(a);
|
||||
bld.setTitle(title);
|
||||
bld.setMessage(content);
|
||||
bld.show();
|
||||
|
@ -131,7 +131,7 @@ public class ShareDialog {
|
|||
}
|
||||
|
||||
public void showDialog() {
|
||||
AlertDialog.Builder builder = new Builder(a);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(a);
|
||||
builder.setTitle(title);
|
||||
String[] shareStrings = new String[share.size()];
|
||||
for(int i = 0; i < shareStrings.length; i++) {
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
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.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -16,6 +10,7 @@ import android.content.pm.PackageManager.NameNotFoundException;
|
|||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
|
@ -28,6 +23,12 @@ import android.widget.ListView;
|
|||
import android.widget.TextView;
|
||||
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 enum GpsStatusApps {
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package net.osmand.plus.activities.search;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.widget.PopupMenu;
|
||||
import android.view.LayoutInflater;
|
||||
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.search.SearchActivity.SearchActivityChild;
|
||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
||||
import net.osmand.plus.dialogs.DirectionsDialogs;
|
||||
import net.osmand.plus.helpers.SearchHistoryHelper;
|
||||
import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry;
|
||||
import net.osmand.util.MapUtils;
|
||||
|
@ -80,7 +78,7 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
|||
}
|
||||
|
||||
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.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||
|
||||
|
|
|
@ -3,16 +3,37 @@
|
|||
*/
|
||||
package net.osmand.plus.activities.search;
|
||||
|
||||
import gnu.trove.set.hash.TLongHashSet;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.AsyncTask.Status;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
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.ResultMatcher;
|
||||
|
@ -43,38 +64,17 @@ import net.osmand.util.Algorithms;
|
|||
import net.osmand.util.MapUtils;
|
||||
import net.osmand.util.OpeningHoursParser;
|
||||
import net.osmand.util.OpeningHoursParser.OpeningHours;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.AsyncTask.Status;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
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 java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import gnu.trove.set.hash.TLongHashSet;
|
||||
|
||||
/**
|
||||
* Search poi activity
|
||||
|
@ -860,7 +860,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
|||
|
||||
|
||||
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.setNegativeButton(R.string.shared_string_no, null);
|
||||
builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||
|
@ -881,7 +881,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
|||
}
|
||||
|
||||
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);
|
||||
final EditText editText = new EditText(this);
|
||||
if(filter.isStandardFilter()) {
|
||||
|
|
|
@ -1,32 +1,31 @@
|
|||
package net.osmand.plus.base;
|
||||
|
||||
import java.io.File;
|
||||
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.support.v7.app.AlertDialog;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.access.AccessibleAlertBuilder;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.plus.GPXUtilities;
|
||||
import net.osmand.plus.GPXUtilities.GPXFile;
|
||||
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.TargetPointsHelper;
|
||||
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
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;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class FailSafeFuntions {
|
||||
private static boolean quitRouteRestoreDialog = false;
|
||||
|
@ -49,7 +48,7 @@ public class FailSafeFuntions {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
Builder builder = new AccessibleAlertBuilder(ma);
|
||||
AlertDialog.Builder builder = new AccessibleAlertBuilder(ma);
|
||||
final TextView tv = new TextView(ma);
|
||||
tv.setText(ma.getString(R.string.continue_follow_previous_route_auto, delay + ""));
|
||||
tv.setPadding(7, 5, 7, 5);
|
||||
|
|
|
@ -1,6 +1,37 @@
|
|||
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.FileInputStream;
|
||||
|
@ -13,37 +44,7 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
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 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;
|
||||
import gnu.trove.list.array.TIntArrayList;
|
||||
|
||||
public class DashChooseAppDirFragment {
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package net.osmand.plus.dashboard;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package net.osmand.plus.dashboard;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.widget.PopupMenu;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
|
@ -195,7 +194,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
|
|||
|
||||
protected void deletePointConfirm(final TargetPoint point, View view) {
|
||||
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
|
||||
builder.setTitle(getString(R.string.delete_target_point));
|
||||
builder.setMessage(PointDescription.getSimpleName(point, getActivity()));
|
||||
|
|
|
@ -2,8 +2,6 @@ package net.osmand.plus.development;
|
|||
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Debug;
|
||||
|
@ -13,6 +11,7 @@ import android.preference.Preference;
|
|||
import android.preference.Preference.OnPreferenceClickListener;
|
||||
import android.preference.PreferenceCategory;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.View;
|
||||
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
|
@ -207,7 +206,7 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
|
|||
}
|
||||
|
||||
protected void availableProfileDialog() {
|
||||
Builder b = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder b = new AlertDialog.Builder(this);
|
||||
final List<ApplicationMode> modes = ApplicationMode.allPossibleValues();
|
||||
modes.remove(ApplicationMode.DEFAULT);
|
||||
final Set<ApplicationMode> selected = new LinkedHashSet<ApplicationMode>(ApplicationMode.values(settings));
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package net.osmand.plus.development;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -106,7 +105,7 @@ public class TestVoiceActivity extends OsmandActionBarActivity {
|
|||
}
|
||||
k++;
|
||||
}
|
||||
Builder bld = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||
bld.setSingleChoiceItems(entrieValues, selected, new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package net.osmand.plus.dialogs;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.widget.PopupMenu;
|
||||
|
||||
import net.osmand.data.LatLon;
|
||||
|
@ -23,7 +22,7 @@ public class DirectionsDialogs {
|
|||
final OsmandApplication ctx = (OsmandApplication) act.getApplication();
|
||||
final TargetPointsHelper targetPointsHelper = ctx.getTargetPointsHelper();
|
||||
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.setItems(
|
||||
new String[] { act.getString(R.string.keep_intermediate_points),
|
||||
|
@ -51,7 +50,7 @@ public class DirectionsDialogs {
|
|||
final OsmandApplication ctx = (OsmandApplication) act.getApplication();
|
||||
final TargetPointsHelper targetPointsHelper = ctx.getTargetPointsHelper();
|
||||
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.setItems(
|
||||
new String[] { act.getString(R.string.replace_destination_point),
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package net.osmand.plus.dialogs;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -10,6 +8,7 @@ import android.content.DialogInterface.OnClickListener;
|
|||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
|
@ -98,7 +97,7 @@ public class FavoriteDialogs {
|
|||
}
|
||||
|
||||
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);
|
||||
final View v = activity.getLayoutInflater().inflate(R.layout.favorite_edit_dialog, null, false);
|
||||
final FavouritesDbHelper helper = ((OsmandApplication) activity.getApplication()).getFavorites();
|
||||
|
@ -138,7 +137,7 @@ public class FavoriteDialogs {
|
|||
point.setName(editText.getText().toString().trim());
|
||||
point.setDescription(description.getText().toString().trim());
|
||||
point.setCategory(categoryStr);
|
||||
Builder bld = FavouritesDbHelper.checkDuplicates(point, helper, activity);
|
||||
AlertDialog.Builder bld = FavouritesDbHelper.checkDuplicates(point, helper, activity);
|
||||
if(bld != null) {
|
||||
bld.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
|
@ -172,7 +171,7 @@ public class FavoriteDialogs {
|
|||
final FavouritesAdapter favouritesAdapter, final OnItemClickListener click,
|
||||
final OnDismissListener dismissListener, final Dialog[] dialogHolder, final boolean sortByDist) {
|
||||
ListView listView = new ListView(uiContext);
|
||||
Builder bld = new AlertDialog.Builder(uiContext);
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(uiContext);
|
||||
final Collator inst = Collator.getInstance();
|
||||
favouritesAdapter.sort(new Comparator<FavouritePoint>() {
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package net.osmand.plus.distancecalculator;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
|
@ -17,6 +15,7 @@ import android.graphics.Paint.Style;
|
|||
import android.graphics.Path;
|
||||
import android.graphics.PointF;
|
||||
import android.os.AsyncTask;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
|
@ -170,7 +169,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
|
|||
}
|
||||
}
|
||||
private void showDialog(final MapActivity activity) {
|
||||
Builder bld = new AlertDialog.Builder(activity);
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(activity);
|
||||
final TIntArrayList list = new TIntArrayList();
|
||||
if(distanceMeasurementMode == 0) {
|
||||
list.add(R.string.distance_measurement_start_editing);
|
||||
|
@ -257,7 +256,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
|
|||
}
|
||||
|
||||
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);
|
||||
LinearLayout ll = new LinearLayout(activity);
|
||||
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);
|
||||
pref.makeGlobal();
|
||||
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.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.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
|
@ -16,6 +15,7 @@ import android.os.AsyncTask.Status;
|
|||
import android.os.Build;
|
||||
import android.os.StatFs;
|
||||
import android.support.annotation.UiThread;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.app.NotificationCompat;
|
||||
import android.support.v7.app.NotificationCompat.Builder;
|
||||
import android.view.View;
|
||||
|
|
|
@ -1,19 +1,5 @@
|
|||
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.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
|
@ -22,12 +8,20 @@ import android.content.Intent;
|
|||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.UiThread;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
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 static final int MAXIMUM_AVAILABLE_FREE_DOWNLOADS = 5;
|
||||
protected OsmandSettings settings;
|
||||
|
@ -91,7 +85,6 @@ public class DownloadValidationManager {
|
|||
}
|
||||
|
||||
|
||||
|
||||
protected void downloadFilesWithAllChecks(FragmentActivity activity, IndexItem[] items) {
|
||||
downloadFilesCheck_1_FreeVersion(activity, items);
|
||||
}
|
||||
|
@ -132,7 +125,6 @@ public class DownloadValidationManager {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public void makeSureUserCancelDownload(Context ctx, final IndexItem item) {
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(ctx);
|
||||
bld.setTitle(ctx.getString(R.string.shared_string_cancel));
|
||||
|
@ -150,6 +142,7 @@ public class DownloadValidationManager {
|
|||
|
||||
public static class InstallPaidVersionDialogFragment extends DialogFragment {
|
||||
public static final String TAG = "InstallPaidVersionDialogFragment";
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
package net.osmand.plus.download.ui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import android.app.Dialog;
|
||||
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.download.DownloadActivity;
|
||||
import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents;
|
||||
import net.osmand.plus.download.IndexItem;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
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;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ActiveDownloadsDialogFragment extends DialogFragment implements DownloadEvents {
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package net.osmand.plus.download.ui;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
|
@ -369,7 +368,7 @@ public class ItemViewHolder {
|
|||
: LocalIndexType.VOICE_DATA;
|
||||
}
|
||||
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() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
|
|
@ -1,20 +1,40 @@
|
|||
package net.osmand.plus.download.ui;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.Collator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import android.app.Activity;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.ActionBar;
|
||||
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.PlatformUtil;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.plus.ContextMenuAdapter;
|
||||
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.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
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;
|
||||
import java.io.File;
|
||||
import java.text.Collator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
public class LocalIndexesFragment extends OsmandExpandableListFragment implements DownloadEvents {
|
||||
|
@ -170,7 +166,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
|||
}
|
||||
|
||||
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());
|
||||
basicFileOperation(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) {
|
||||
new LocalIndexOperationTask(getDownloadActivity(), listAdapter, LocalIndexOperationTask.RESTORE_OPERATION).execute(info);
|
||||
} 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() {
|
||||
@Override
|
||||
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) {
|
||||
Builder b = new AlertDialog.Builder(a);
|
||||
AlertDialog.Builder b = new AlertDialog.Builder(a);
|
||||
if (f.exists()) {
|
||||
int xt = f.getName().lastIndexOf('.');
|
||||
final String ext = xt == -1 ? "" : f.getName().substring(xt);
|
||||
|
@ -679,7 +675,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
|||
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.setPositiveButton(actionButton, listener);
|
||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package net.osmand.plus.helpers;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
@ -103,7 +102,7 @@ public class AvoidSpecificRoads {
|
|||
}
|
||||
|
||||
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);
|
||||
if (getMissingRoads().size() == 0){
|
||||
bld.setMessage(R.string.avoid_roads_msg);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package net.osmand.plus.helpers;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
@ -9,7 +8,9 @@ import android.net.Uri;
|
|||
import android.os.AsyncTask;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.provider.OpenableColumns;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.data.FavouritePoint;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package net.osmand.plus.mapcontextmenu.controllers;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
import net.osmand.binary.BinaryMapDataObject;
|
||||
import net.osmand.data.LatLon;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package net.osmand.plus.mapcontextmenu.editors;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.Button;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package net.osmand.plus.mapcontextmenu.editors;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package net.osmand.plus.mapcontextmenu.editors;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.PorterDuff;
|
||||
|
@ -9,6 +8,7 @@ import android.graphics.drawable.Drawable;
|
|||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package net.osmand.plus.monitoring;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
@ -247,7 +246,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
|||
private void controlDialog(final Activity map) {
|
||||
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();
|
||||
if(wasTrackMonitored) {
|
||||
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,
|
||||
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);
|
||||
WindowManager mgr = (WindowManager) uiCtx.getSystemService(Context.WINDOW_SERVICE);
|
||||
DisplayMetrics dm = new DisplayMetrics();
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package net.osmand.plus.myplaces;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
@ -13,6 +11,7 @@ import android.os.AsyncTask;
|
|||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.view.ActionMode;
|
||||
import android.support.v7.widget.PopupMenu;
|
||||
import android.support.v7.widget.SearchView;
|
||||
|
@ -32,6 +31,7 @@ import android.widget.ImageButton;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.plus.ContextMenuAdapter;
|
||||
|
@ -526,7 +526,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
|
|||
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(),
|
||||
selectedItems.size()));
|
||||
builder.setPositiveButton(actionButton, listener);
|
||||
|
|
|
@ -2,8 +2,6 @@ package net.osmand.plus.myplaces;
|
|||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
|
@ -11,7 +9,7 @@ import android.os.AsyncTask;
|
|||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.widget.PopupMenu;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.text.Html;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
|
@ -30,7 +28,6 @@ import android.widget.TextView;
|
|||
import net.osmand.data.FavouritePoint;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.plus.ContextMenuAdapter;
|
||||
import net.osmand.plus.FavouritesDbHelper;
|
||||
import net.osmand.plus.GPXUtilities.GPXFile;
|
||||
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.TrackActivity;
|
||||
import net.osmand.plus.base.FavoriteImageDrawable;
|
||||
import net.osmand.plus.dialogs.DirectionsDialogs;
|
||||
import net.osmand.plus.helpers.ColorDialogs;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
|
@ -206,7 +202,7 @@ public class SelectedGPXFragment extends OsmAndListFragment {
|
|||
}
|
||||
|
||||
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 List<GpxDisplayGroup> gs = filterGroups(gpxDisplayItemType);
|
||||
if (gs.size() == 0) {
|
||||
|
@ -280,7 +276,7 @@ public class SelectedGPXFragment extends OsmAndListFragment {
|
|||
ColorDialogs.setupColorSpinner(getActivity(), getGpx().getColor(0), colorSpinner, list);
|
||||
|
||||
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 TIntArrayList timeSplit = new TIntArrayList();
|
||||
if(groups.size() == 0) {
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package net.osmand.plus.openseamapsplugin;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.Intent;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
|
@ -59,7 +58,7 @@ public class NauticalMapsPlugin extends OsmandPlugin {
|
|||
app.getSettings().RENDERER.set(RendererRegistry.NAUTICAL_RENDER);
|
||||
if(!app.getResourceManager().getIndexFileNames().containsKey("World_seamarks"+
|
||||
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.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package net.osmand.plus.osmedit;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package net.osmand.plus.osmedit;
|
||||
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Canvas;
|
||||
|
@ -10,6 +8,7 @@ import android.graphics.Paint;
|
|||
import android.graphics.PointF;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.util.Xml;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
|
@ -320,7 +319,7 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
|
|||
|
||||
private Dialog createOpenBugDialog(final Bundle args) {
|
||||
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.setView(openBug);
|
||||
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) {
|
||||
Builder builder = new AlertDialog.Builder(activity);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setTitle(R.string.osb_comment_dialog_title);
|
||||
final View view = activity.getLayoutInflater().inflate(R.layout.open_bug, null);
|
||||
builder.setView(view);
|
||||
|
@ -453,7 +452,7 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
|
|||
}
|
||||
|
||||
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.setNegativeButton(R.string.shared_string_cancel, null);
|
||||
builder.setPositiveButton(R.string.osb_close_dialog_close_button, new DialogInterface.OnClickListener() {
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package net.osmand.plus.osmedit;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.Intent;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
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();
|
||||
return false;
|
||||
}
|
||||
Builder bldr = new AlertDialog.Builder(la);
|
||||
AlertDialog.Builder bldr = new AlertDialog.Builder(la);
|
||||
LayoutInflater inflater = (LayoutInflater) la.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
final View view = inflater.inflate(R.layout.send_gpx_osm, null);
|
||||
final EditText descr = (EditText) view.findViewById(R.id.memory_size);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package net.osmand.plus.osmedit;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -11,6 +10,7 @@ import android.os.Bundle;
|
|||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.view.ActionMode;
|
||||
import android.support.v7.widget.PopupMenu;
|
||||
import android.util.Xml;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package net.osmand.plus.osmedit.dialogs;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.osm.MapPoiTypes;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package net.osmand.plus.osmedit.dialogs;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.osm.MapPoiTypes;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package net.osmand.plus.osmedit.dialogs;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
|
|
|
@ -3,48 +3,8 @@
|
|||
*/
|
||||
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.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -67,6 +27,7 @@ import android.os.Bundle;
|
|||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.view.ActionMode;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.text.Editable;
|
||||
|
@ -100,6 +61,44 @@ import android.widget.Spinner;
|
|||
import android.widget.TextView;
|
||||
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
|
||||
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
|
||||
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);
|
||||
bld.setTitle(getString(R.string.osmo_leave_confirmation_msg, name));
|
||||
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) {
|
||||
Builder bld = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||
bld.setTitle(R.string.osmo_group);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (group != null){
|
||||
|
@ -658,7 +657,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
|||
setSupportProgressBarIndeterminateVisibility(true);
|
||||
signinPost(false);
|
||||
} 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());
|
||||
bld.setMessage(text);
|
||||
bld.setPositiveButton(R.string.shared_string_ok, null);
|
||||
|
@ -822,7 +821,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
|||
}
|
||||
|
||||
protected void signin() {
|
||||
Builder builder = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(R.string.osmo_sign_in);
|
||||
String message = "";
|
||||
if(app.getSettings().OSMO_USER_PWD.get() != null) {
|
||||
|
@ -850,7 +849,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
|||
signin();
|
||||
return;
|
||||
}
|
||||
final Builder builder = new AlertDialog.Builder(this);
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(R.string.osmo_create_group);
|
||||
final View v = getLayoutInflater().inflate(R.layout.osmo_create_group, getExpandableListView(), false);
|
||||
final EditText policy = (EditText) v.findViewById(R.id.Policy);
|
||||
|
@ -918,7 +917,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
|||
}
|
||||
|
||||
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 TextView labelTracker = (TextView ) v.findViewById(R.id.LabelTrackerId);
|
||||
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) {
|
||||
Builder bld = new AlertDialog.Builder(ctx);
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(ctx);
|
||||
bld.setTitle(R.string.osmo_edit_device);
|
||||
final LayoutInflater inflater = LayoutInflater.from(ctx);
|
||||
View view = inflater.inflate(R.layout.osmo_edit_device, null);
|
||||
|
@ -1526,7 +1525,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
|||
}
|
||||
|
||||
private void showHint() {
|
||||
Builder builder = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(R.string.anonymous_user);
|
||||
String message = getString(R.string.anonymous_user_hint);
|
||||
builder.setMessage(message);
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
package net.osmand.plus.osmo;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import android.app.Activity;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
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.support.v7.app.AlertDialog;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
|
@ -27,23 +35,14 @@ import org.json.JSONArray;
|
|||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
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;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
public class OsMoService implements OsMoReactor {
|
||||
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) {
|
||||
Builder bld = new AlertDialog.Builder(ga);
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(ga);
|
||||
bld.setMessage(msg);
|
||||
bld.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package net.osmand.plus.osmo;
|
||||
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.Intent;
|
||||
|
@ -11,6 +9,7 @@ import android.os.Bundle;
|
|||
import android.preference.CheckBoxPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.util.TypedValue;
|
||||
import android.widget.ScrollView;
|
||||
|
@ -119,7 +118,7 @@ public class SettingsOsMoActivity extends SettingsBaseActivity {
|
|||
final OsMoPlugin plugin = OsMoPlugin.getEnabledPlugin(OsMoPlugin.class);
|
||||
if (preference == debugPref) {
|
||||
updateDebugPref();
|
||||
Builder bld = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||
StringBuilder bs = new StringBuilder();
|
||||
List<String> hs = plugin.getService().getHistoryOfCommands();
|
||||
if(hs != null) {
|
||||
|
@ -173,7 +172,7 @@ public class SettingsOsMoActivity extends SettingsBaseActivity {
|
|||
|
||||
@Override
|
||||
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.setPositiveButton(R.string.shared_string_yes, new OnClickListener() {
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package net.osmand.plus.parkingpoint;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -2,11 +2,10 @@ package net.osmand.plus.parkingpoint;
|
|||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.text.format.DateFormat;
|
||||
import android.text.format.Time;
|
||||
import android.view.View;
|
||||
|
@ -290,7 +289,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
* Method creates confirmation dialog for deletion of a parking location.
|
||||
*/
|
||||
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.setMessage(activity.getString(R.string.osmand_parking_delete_confirm));
|
||||
confirm.setCancelable(true);
|
||||
|
@ -317,7 +316,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
*/
|
||||
private void showSetTimeLimitDialog(final MapActivity mapActivity, final Dialog choose) {
|
||||
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.setTitle(mapActivity.getString(R.string.osmand_parking_time_limit_title));
|
||||
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) {
|
||||
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.setMessage(activity.getString(R.string.osmand_parking_warning_text));
|
||||
deleteEventWarning.setNeutralButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package net.osmand.plus.rastermaps;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.AsyncTask;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemSelectedListener;
|
||||
|
@ -150,7 +149,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
|||
final MapActivityLayers layers = activity.getMapLayers();
|
||||
Map<String, String> entriesMap = settings.getTileSourceEntries();
|
||||
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];
|
||||
int i = 0;
|
||||
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();
|
||||
return;
|
||||
}
|
||||
Builder builder = new AlertDialog.Builder(activity);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
String[] names = new String[downloaded.size()];
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
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",
|
||||
"png", 17, 5, 256, 16, 32000);
|
||||
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);
|
||||
final EditText name = (EditText) view.findViewById(R.id.Name);
|
||||
final Spinner existing = (Spinner) view.findViewById(R.id.TileSourceSpinner);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package net.osmand.plus.views;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Canvas;
|
||||
|
@ -10,6 +9,7 @@ import android.graphics.PointF;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
package net.osmand.plus.views;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import android.content.Context;
|
||||
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.PointDescription;
|
||||
import net.osmand.data.QuadRect;
|
||||
|
@ -13,16 +18,9 @@ import net.osmand.plus.ContextMenuAdapter;
|
|||
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.resources.TransportIndexRepository;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
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;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider {
|
||||
private static final int startZoom = 12;
|
||||
|
@ -164,7 +162,7 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
|
|||
}
|
||||
|
||||
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.setMessage(getStopDescription(a, true));
|
||||
bs.show();
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
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.ValueHolder;
|
||||
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.mapwidgets.NextTurnInfoWidget.TurnDrawable;
|
||||
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 {
|
||||
|
||||
|
@ -125,7 +125,7 @@ public class MapInfoWidgetsFactory {
|
|||
final ValueHolder<Integer> vs = new ValueHolder<Integer>();
|
||||
vs.value = app.getSettings().SERVICE_OFF_INTERVAL.get();
|
||||
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));
|
||||
WindowManager mgr = (WindowManager) map.getSystemService(Context.WINDOW_SERVICE);
|
||||
DisplayMetrics dm = new DisplayMetrics();
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package net.osmand.plus.voice;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
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;
|
||||
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.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
|
@ -21,16 +21,11 @@ import org.apache.commons.logging.Log;
|
|||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
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;
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
||||
|
@ -161,7 +156,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
|||
{
|
||||
case TextToSpeech.LANG_MISSING_DATA:
|
||||
if (isSettingsActivity(act)) {
|
||||
Builder builder = createAlertDialog(
|
||||
AlertDialog.Builder builder = createAlertDialog(
|
||||
R.string.tts_missing_language_data_title,
|
||||
R.string.tts_missing_language_data,
|
||||
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
|
||||
//this if condition
|
||||
if (isSettingsActivity(act)) {
|
||||
Builder builder = createAlertDialog(
|
||||
AlertDialog.Builder builder = createAlertDialog(
|
||||
R.string.tts_language_not_supported_title,
|
||||
R.string.tts_language_not_supported,
|
||||
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) {
|
||||
Builder builder = new AlertDialog.Builder(ctx);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
|
||||
builder.setCancelable(true);
|
||||
builder.setNegativeButton(R.string.shared_string_no, null);
|
||||
builder.setPositiveButton(R.string.shared_string_yes, intentStarter);
|
||||
|
|
|
@ -2,7 +2,7 @@ package net.osmand.nautical;
|
|||
|
||||
import net.osmand.nauticalPlugin.R;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.ComponentName;
|
||||
import android.content.DialogInterface;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package net.osmand.parkingPlugin;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.ComponentName;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -10,6 +9,7 @@ import android.content.pm.PackageManager;
|
|||
import android.content.pm.ResolveInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
public class ParkingPluginActivity extends Activity {
|
||||
private static final String OSMAND_COMPONENT = "net.osmand"; //$NON-NLS-1$
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package net.osmand.srtmPlugin;
|
||||
|
||||
import net.osmand.srtmPlugin.paid.R;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.ComponentName;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -11,6 +9,9 @@ import android.content.pm.PackageManager;
|
|||
import android.content.pm.ResolveInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
import net.osmand.srtmPlugin.paid.R;
|
||||
|
||||
public class SRTMPluginActivity extends Activity {
|
||||
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 android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.ComponentName;
|
||||
import android.content.DialogInterface;
|
||||
|
|
Loading…
Reference in a new issue