From fcd69744821733a04ce15dee7f111576bac478d6 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 4 Mar 2020 16:12:06 +0200 Subject: [PATCH] Migration to AndroidX --- .../aidlapi/copyfile/CopyFileParams.java | 3 +- .../OsmandSettingsInfoParams.java | 3 +- .../customization/OsmandSettingsParams.java | 5 +- .../customization/SetWidgetsParams.java | 3 +- .../net/osmand/aidlapi/gpx/AGpxBitmap.java | 3 +- .../src/net/osmand/aidlapi/gpx/AGpxFile.java | 5 +- .../osmand/aidlapi/gpx/ASelectedGpxFile.java | 5 +- .../navdrawer/NavDrawerFooterParams.java | 5 +- .../navdrawer/NavDrawerHeaderParams.java | 5 +- .../aidlapi/navdrawer/NavDrawerItem.java | 5 +- .../navdrawer/SetNavDrawerItemsParams.java | 3 +- .../osmand/aidlapi/tiles/ASqliteDbFile.java | 3 +- OsmAnd-telegram/AndroidManifest.xml | 2 +- OsmAnd-telegram/build.gradle | 10 +- OsmAnd-telegram/res/layout/activity_main.xml | 8 +- .../layout/bottom_sheet_add_new_device.xml | 8 +- .../bottom_sheet_battery_optimization.xml | 8 +- .../res/layout/bottom_sheet_choose_osmand.xml | 8 +- .../res/layout/bottom_sheet_dialog.xml | 4 +- .../layout/bottom_sheet_disable_sharing.xml | 8 +- .../bottom_sheet_disconnect_telegram.xml | 8 +- .../res/layout/bottom_sheet_logout.xml | 8 +- .../res/layout/bottom_sheet_set_time.xml | 8 +- .../layout/bottom_sheet_sharing_status.xml | 8 +- .../res/layout/bottom_sheet_sort_by.xml | 8 +- .../res/layout/fragement_settings_dialog.xml | 8 +- .../res/layout/fragment_live_now_tab.xml | 10 +- .../res/layout/fragment_my_location_tab.xml | 10 +- .../layout/fragment_proxy_settings_dialog.xml | 10 +- .../res/layout/fragment_search_dialog.xml | 10 +- .../res/layout/fragment_set_time_dialog.xml | 6 +- .../res/layout/fragment_timeline_tab.xml | 8 +- .../res/layout/fragment_user_gpx_info.xml | 4 +- OsmAnd-telegram/res/layout/login_dialog.xml | 2 +- .../osmand/aidl/copyfile/CopyFileParams.java | 3 +- .../OsmandSettingsInfoParams.java | 3 +- .../customization/OsmandSettingsParams.java | 5 +- .../aidl/customization/SetWidgetsParams.java | 3 +- .../src/net/osmand/aidl/gpx/AGpxBitmap.java | 3 +- .../src/net/osmand/aidl/gpx/AGpxFile.java | 5 +- .../net/osmand/aidl/gpx/ASelectedGpxFile.java | 5 +- .../net/osmand/aidl/gpx/GpxColorParams.java | 3 +- .../aidl/navdrawer/NavDrawerFooterParams.java | 5 +- .../aidl/navdrawer/NavDrawerHeaderParams.java | 5 +- .../osmand/aidl/navdrawer/NavDrawerItem.java | 5 +- .../navdrawer/SetNavDrawerItemsParams.java | 3 +- .../net/osmand/aidl/tiles/ASqliteDbFile.java | 3 +- .../net/osmand/telegram/TelegramSettings.kt | 6 +- .../notifications/LocationNotification.kt | 4 +- .../notifications/TelegramNotification.kt | 6 +- .../telegram/ui/AddNewDeviceBottomSheet.kt | 9 +- .../osmand/telegram/ui/BaseDialogFragment.kt | 8 +- .../ui/BatteryOptimizationBottomSheet.kt | 7 +- .../telegram/ui/ChooseOsmAndBottomSheet.kt | 8 +- .../telegram/ui/DisableSharingBottomSheet.kt | 8 +- .../ui/DisconnectTelegramBottomSheet.kt | 7 +- .../osmand/telegram/ui/LiveNowTabFragment.kt | 27 +++-- .../osmand/telegram/ui/LoginDialogFragment.kt | 15 ++- .../osmand/telegram/ui/LogoutBottomSheet.kt | 8 +- .../net/osmand/telegram/ui/MainActivity.kt | 32 +++--- .../telegram/ui/MyLocationTabFragment.kt | 24 ++--- .../ui/ProxySettingsDialogFragment.kt | 13 +-- .../telegram/ui/SearchDialogFragment.kt | 22 ++-- .../osmand/telegram/ui/SetTimeBottomSheet.kt | 8 +- .../telegram/ui/SetTimeDialogFragment.kt | 20 ++-- .../telegram/ui/SettingsDialogFragment.kt | 9 +- .../telegram/ui/SharingStatusBottomSheet.kt | 10 +- .../osmand/telegram/ui/SortByBottomSheet.kt | 12 +-- .../osmand/telegram/ui/TimelineTabFragment.kt | 14 ++- .../osmand/telegram/ui/UserGpxInfoFragment.kt | 7 +- .../ui/views/EmptyStateRecyclerView.kt | 7 +- .../telegram/ui/views/LockableViewPager.kt | 3 +- .../osmand/telegram/ui/views/TextViewEx.kt | 2 +- .../net/osmand/telegram/utils/AndroidUtils.kt | 22 ++-- .../src/net/osmand/telegram/utils/UiUtils.kt | 10 +- OsmAnd/AndroidManifest.xml | 2 +- OsmAnd/build.gradle | 14 +-- .../add_gpx_point_bottom_sheet.xml | 4 +- .../layout-land/context_menu_card_dialog.xml | 4 +- .../fragment_coordinate_input_dialog.xml | 8 +- .../fragment_direction_indication_dialog.xml | 18 ++-- .../fragment_plan_route_half_screen.xml | 6 +- OsmAnd/res/layout-land/map_hud_top.xml | 2 +- .../layout-land/move_marker_bottom_sheet.xml | 4 +- .../res/layout-land/point_editor_fragment.xml | 4 +- .../res/layout-land/quick_action_widget.xml | 2 +- .../layout-land/quick_action_widget_page.xml | 2 +- OsmAnd/res/layout-v14/check_item_rel.xml | 2 +- .../first_usage_welcome_fragment.xml | 2 +- OsmAnd/res/layout/activity_livie_updates.xml | 4 +- .../layout/along_the_route_category_item.xml | 2 +- .../res/layout/auto_complete_suggestion.xml | 4 +- OsmAnd/res/layout/bottom_sheet_dialog.xml | 4 +- ...ttom_sheet_item_btn_with_icon_and_text.xml | 2 +- .../bottom_sheet_item_preference_btn.xml | 2 +- .../bottom_sheet_item_preference_switch.xml | 2 +- .../layout/bottom_sheet_item_recyclerview.xml | 4 +- .../bottom_sheet_item_toolbar_title.xml | 4 +- ...heet_item_with_descr_and_checkbox_56dp.xml | 2 +- ...om_sheet_item_with_descr_and_radio_btn.xml | 2 +- ..._sheet_item_with_descr_and_switch_56dp.xml | 2 +- .../bottom_sheet_item_with_radio_btn.xml | 2 +- .../bottom_sheet_item_with_radio_btn_left.xml | 2 +- .../layout/bottom_sheet_item_with_switch.xml | 2 +- .../bottom_sheet_item_with_switch_56dp.xml | 2 +- .../bottom_sheet_item_with_switch_no_icon.xml | 2 +- .../bottom_sheet_select_type_fragment.xml | 16 ++- OsmAnd/res/layout/change_fav_color.xml | 2 +- .../layout/close_measurement_tool_dialog.xml | 2 +- ...context_menu_card_add_mapillary_images.xml | 2 +- .../res/layout/context_menu_card_dialog.xml | 4 +- OsmAnd/res/layout/context_menu_card_image.xml | 2 +- .../layout/context_menu_card_no_images.xml | 4 +- .../layout/coordinate_input_keyboard_item.xml | 2 +- ...oordinate_input_land_keyboard_and_list.xml | 2 +- OsmAnd/res/layout/crash_title.xml | 2 +- OsmAnd/res/layout/dash_gpx_track_item.xml | 4 +- OsmAnd/res/layout/dashboard_toolbar.xml | 4 +- OsmAnd/res/layout/data_storage_list_item.xml | 4 +- .../layout/data_storage_memory_used_item.xml | 2 +- .../dialog_list_item_with_compound_button.xml | 4 +- .../dialog_live_updates_item_settings.xml | 2 +- OsmAnd/res/layout/dislike_title.xml | 2 +- OsmAnd/res/layout/download.xml | 2 +- OsmAnd/res/layout/drawer_list_item.xml | 2 +- .../layout/edit_arrangement_list_fragment.xml | 6 +- OsmAnd/res/layout/editing_tile_source.xml | 2 +- OsmAnd/res/layout/favourite_list_item.xml | 8 +- .../layout/first_usage_welcome_fragment.xml | 2 +- .../layout/first_usage_wizard_fragment.xml | 54 +++++----- ...ntext_menu_actions_bottom_sheet_dialog.xml | 8 +- .../fragment_coordinate_input_dialog.xml | 10 +- .../fragment_direction_indication_dialog.xml | 14 +-- OsmAnd/res/layout/fragment_edit_poi.xml | 16 +-- .../res/layout/fragment_edit_poi_advanced.xml | 4 +- .../res/layout/fragment_edit_poi_normal.xml | 4 +- OsmAnd/res/layout/fragment_explore_tab.xml | 2 +- OsmAnd/res/layout/fragment_help_article.xml | 2 +- OsmAnd/res/layout/fragment_import.xml | 16 +-- .../res/layout/fragment_import_duplicates.xml | 23 ++-- OsmAnd/res/layout/fragment_live_updates.xml | 4 +- .../layout/fragment_map_markers_dialog.xml | 14 +-- .../layout/fragment_map_markers_groups.xml | 2 +- .../res/layout/fragment_mapillary_filters.xml | 36 +++---- ...t_marker_add_group_bottom_sheet_dialog.xml | 2 +- .../res/layout/fragment_measurement_tool.xml | 2 +- .../layout/fragment_on_save_current_track.xml | 2 +- .../fragment_plan_route_full_screen.xml | 2 +- .../fragment_plan_route_half_screen.xml | 2 +- OsmAnd/res/layout/fragment_reports.xml | 4 +- .../layout/fragment_saved_articles_tab.xml | 2 +- .../res/layout/fragment_show_all_routes.xml | 16 +-- ...gment_snap_to_road_bottom_sheet_dialog.xml | 4 +- .../fragment_wikivoyage_article_dialog.xml | 4 +- .../fragment_wikivoyage_search_dialog.xml | 10 +- .../res/layout/global_preference_toolbar.xml | 4 +- ...global_preferences_toolbar_with_switch.xml | 4 +- OsmAnd/res/layout/gpx_item_altitude.xml | 2 +- OsmAnd/res/layout/gpx_item_general.xml | 2 +- OsmAnd/res/layout/gpx_item_list_header.xml | 2 +- OsmAnd/res/layout/gpx_item_speed.xml | 2 +- OsmAnd/res/layout/gpx_track_item.xml | 4 +- OsmAnd/res/layout/history_card_item.xml | 2 +- OsmAnd/res/layout/home_work_card.xml | 4 +- .../layout/item_header_export_expand_list.xml | 2 +- .../list_group_empty_title_with_switch.xml | 2 +- .../layout/list_group_title_with_switch.xml | 2 +- .../list_group_title_with_switch_light.xml | 2 +- OsmAnd/res/layout/list_item_header.xml | 2 +- .../res/layout/list_item_icon24_and_menu.xml | 10 +- OsmAnd/res/layout/list_item_icon_and_menu.xml | 10 +- .../layout/list_item_icon_and_menu_wide.xml | 10 +- .../layout/list_item_icon_and_right_btn.xml | 10 +- .../res/layout/list_item_icon_and_switch.xml | 6 +- OsmAnd/res/layout/list_item_progress.xml | 2 +- ...ist_item_single_line_descrition_narrow.xml | 2 +- OsmAnd/res/layout/list_item_text_button.xml | 2 +- OsmAnd/res/layout/list_menu_item_native.xml | 8 +- .../list_menu_item_native_singlechoice.xml | 2 +- OsmAnd/res/layout/main.xml | 16 ++- .../main_menu_drawer_btn_switch_profile.xml | 2 +- OsmAnd/res/layout/make_better_title.xml | 2 +- .../res/layout/map_context_menu_fragment.xml | 8 +- OsmAnd/res/layout/map_hud_top.xml | 2 +- OsmAnd/res/layout/map_marker_item_header.xml | 4 +- OsmAnd/res/layout/map_marker_item_new.xml | 16 +-- OsmAnd/res/layout/mapillary_first_dialog.xml | 16 ++- .../res/layout/maps_in_category_fragment.xml | 6 +- .../layout/markers_track_name_edit_text.xml | 6 +- .../res/layout/measure_points_list_item.xml | 12 +-- OsmAnd/res/layout/my_places_fabs.xml | 8 +- .../res/layout/no_gpx_files_list_footer.xml | 2 +- .../res/layout/osm_live_banner_list_item.xml | 20 ++-- .../osmlive_cancelled_dialog_fragment.xml | 2 +- OsmAnd/res/layout/plan_route_info.xml | 2 +- .../plan_route_toolbar_and_up_down_row.xml | 4 +- OsmAnd/res/layout/plugins_list_item.xml | 4 +- OsmAnd/res/layout/poi_filter_list_item.xml | 2 +- OsmAnd/res/layout/poi_tag_list_item.xml | 8 +- OsmAnd/res/layout/point_editor_fragment.xml | 4 +- .../popup_list_item_icon24_and_menu.xml | 10 +- OsmAnd/res/layout/powered_by_osmand_item.xml | 2 +- OsmAnd/res/layout/preference_activity.xml | 8 +- .../layout/preference_dialog_and_switch.xml | 2 +- ...preference_profile_item_with_radio_btn.xml | 2 +- OsmAnd/res/layout/preference_radio_button.xml | 2 +- OsmAnd/res/layout/preference_switch.xml | 2 +- .../layout/preference_switch_with_descr.xml | 2 +- .../res/layout/preference_toolbar_switch.xml | 2 +- ...reference_with_descr_dialog_and_switch.xml | 2 +- OsmAnd/res/layout/preferences_screen.xml | 2 +- OsmAnd/res/layout/prev_route_card.xml | 2 +- OsmAnd/res/layout/privacy_settings_layout.xml | 12 +-- .../layout/profile_data_list_item_child.xml | 2 +- OsmAnd/res/layout/profile_list_item.xml | 4 +- .../res/layout/profile_preference_toolbar.xml | 4 +- .../layout/profile_preference_toolbar_big.xml | 4 +- ...profile_preference_toolbar_with_switch.xml | 4 +- .../purchase_dialog_card_button_active_ex.xml | 2 +- .../layout/purchase_dialog_card_header.xml | 2 +- .../res/layout/purchase_dialog_card_row.xml | 4 +- .../purchase_dialog_card_selected_row.xml | 4 +- .../res/layout/purchase_dialog_fragment.xml | 2 +- OsmAnd/res/layout/quick_action_add_bug.xml | 9 +- OsmAnd/res/layout/quick_action_add_dialog.xml | 2 +- .../res/layout/quick_action_add_favorite.xml | 4 +- OsmAnd/res/layout/quick_action_add_gpx.xml | 4 +- .../layout/quick_action_add_poi_layout.xml | 10 +- .../quick_action_create_edit_dialog.xml | 15 ++- OsmAnd/res/layout/quick_action_list.xml | 10 +- OsmAnd/res/layout/quick_action_list_item.xml | 6 +- .../res/layout/quick_action_show_hide_poi.xml | 2 +- .../quick_action_start_stop_navigation.xml | 2 +- .../layout/quick_action_switchable_action.xml | 4 +- OsmAnd/res/layout/quick_action_widget.xml | 2 +- .../res/layout/quick_action_widget_page.xml | 2 +- OsmAnd/res/layout/rate_us_title.xml | 2 +- OsmAnd/res/layout/recyclerview.xml | 2 +- OsmAnd/res/layout/route_ped_info.xml | 2 +- OsmAnd/res/layout/save_gpx_dialog.xml | 2 +- OsmAnd/res/layout/search_advanced_coords.xml | 36 +++---- OsmAnd/res/layout/search_custom_poi.xml | 10 +- OsmAnd/res/layout/search_dialog_fragment.xml | 14 +-- OsmAnd/res/layout/search_favs_fragment.xml | 8 +- OsmAnd/res/layout/search_more_list_item.xml | 2 +- OsmAnd/res/layout/search_poi_filter.xml | 8 +- .../layout/select_gpx_appearance_title.xml | 6 +- OsmAnd/res/layout/send_poi_dialog.xml | 2 +- .../layout/single_choice_description_item.xml | 2 +- .../res/layout/single_choice_switch_item.xml | 4 +- OsmAnd/res/layout/split_segments_layout.xml | 8 +- .../res/layout/subcategories_dialog_title.xml | 2 +- OsmAnd/res/layout/subscribe_email_header.xml | 2 +- OsmAnd/res/layout/subscription_fragment.xml | 4 +- OsmAnd/res/layout/tab_content.xml | 6 +- OsmAnd/res/layout/track_content.xml | 4 +- OsmAnd/res/layout/warning_card.xml | 2 +- .../res/layout/wikipedia_dialog_fragment.xml | 6 +- OsmAnd/res/layout/wikivoyage_explore.xml | 14 +-- .../android/common/view/SlidingTabLayout.java | 10 +- .../CacheFragmentStatePagerAdapter.java | 7 +- .../src/net/osmand/AndroidNetworkUtils.java | 5 +- OsmAnd/src/net/osmand/AndroidUtils.java | 17 +-- OsmAnd/src/net/osmand/PicassoUtils.java | 7 +- .../osmand/SecondSplashScreenFragment.java | 5 +- .../osmand/access/AccessibilityAssistant.java | 7 +- .../osmand/access/AccessibilityPlugin.java | 3 +- .../access/AccessibilitySettingsFragment.java | 9 +- .../src/net/osmand/access/NavigationInfo.java | 3 +- OsmAnd/src/net/osmand/aidl/ConnectedApp.java | 5 +- OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java | 7 +- .../net/osmand/aidl/OsmandAidlService.java | 3 +- .../net/osmand/aidl/OsmandAidlServiceV2.java | 3 +- .../osmand/aidl/copyfile/CopyFileParams.java | 3 +- .../OsmandSettingsInfoParams.java | 3 +- .../customization/OsmandSettingsParams.java | 5 +- .../aidl/customization/SetWidgetsParams.java | 3 +- .../src/net/osmand/aidl/gpx/AGpxBitmap.java | 3 +- OsmAnd/src/net/osmand/aidl/gpx/AGpxFile.java | 5 +- .../net/osmand/aidl/gpx/ASelectedGpxFile.java | 6 +- .../net/osmand/aidl/gpx/GpxColorParams.java | 3 +- .../aidl/navdrawer/NavDrawerFooterParams.java | 5 +- .../aidl/navdrawer/NavDrawerHeaderParams.java | 5 +- .../osmand/aidl/navdrawer/NavDrawerItem.java | 5 +- .../navdrawer/SetNavDrawerItemsParams.java | 3 +- .../net/osmand/aidl/tiles/ASqliteDbFile.java | 4 +- .../src/net/osmand/data/FavouritePoint.java | 11 +- .../src/net/osmand/data/PointDescription.java | 5 +- .../src/net/osmand/plus/AppInitializer.java | 3 +- .../src/net/osmand/plus/ApplicationMode.java | 2 +- .../net/osmand/plus/ContextMenuAdapter.java | 15 +-- .../src/net/osmand/plus/ContextMenuItem.java | 15 +-- .../osmand/plus/CurrentPositionHelper.java | 6 +- OsmAnd/src/net/osmand/plus/CustomPager.java | 6 +- .../osmand/plus/DialogListItemAdapter.java | 7 +- .../net/osmand/plus/FavouritesDbHelper.java | 9 +- OsmAnd/src/net/osmand/plus/GPXDatabase.java | 4 +- OsmAnd/src/net/osmand/plus/GpxDbHelper.java | 5 +- .../net/osmand/plus/GpxSelectionHelper.java | 9 +- .../net/osmand/plus/LockableViewPager.java | 4 +- .../src/net/osmand/plus/MapMarkersHelper.java | 9 +- .../net/osmand/plus/NotificationHelper.java | 9 +- .../plus/OnDialogFragmentResultListener.java | 5 +- .../plus/OnDismissDialogFragmentListener.java | 2 +- .../osmand/plus/OsmAndAppCustomization.java | 5 +- .../osmand/plus/OsmAndLocationProvider.java | 7 +- .../osmand/plus/OsmAndLocationSimulation.java | 5 +- .../net/osmand/plus/OsmandApplication.java | 7 +- OsmAnd/src/net/osmand/plus/OsmandPlugin.java | 13 +-- .../src/net/osmand/plus/OsmandSettings.java | 13 +-- .../src/net/osmand/plus/SettingsHelper.java | 8 +- OsmAnd/src/net/osmand/plus/UiUtilities.java | 32 +++--- .../ActionBarPreferenceActivity.java | 7 +- .../activities/ActionBarProgressActivity.java | 5 +- .../AppCompatPreferenceActivity.java | 13 +-- .../ContributionVersionActivity.java | 7 +- .../plus/activities/DownloadTilesDialog.java | 3 +- .../EditFavoriteGroupDialogFragment.java | 11 +- .../activities/EditPOIFilterActivity.java | 5 +- .../activities/FavoritesListFragment.java | 40 +++---- .../activities/FavoritesSearchFragment.java | 15 +-- .../activities/FavoritesTreeFragment.java | 17 +-- .../osmand/plus/activities/HelpActivity.java | 11 +- .../activities/IntermediatePointsDialog.java | 3 +- .../plus/activities/LocalIndexHelper.java | 5 +- .../plus/activities/LocalIndexInfo.java | 6 +- .../osmand/plus/activities/MapActivity.java | 32 +++--- .../plus/activities/MapActivityActions.java | 11 +- .../plus/activities/MapActivityLayers.java | 13 +-- .../activities/NavigatePointFragment.java | 5 +- .../plus/activities/OpeningHoursView.java | 3 +- .../activities/OsmandActionBarActivity.java | 6 +- .../OsmandExpandableListActivity.java | 8 +- .../OsmandInAppPurchaseActivity.java | 11 +- .../plus/activities/OsmandListActivity.java | 10 +- .../plus/activities/PluginActivity.java | 6 +- .../plus/activities/PluginsActivity.java | 7 +- .../PrivacyAndSecurityActivity.java | 5 +- .../plus/activities/SettingsBaseActivity.java | 5 +- .../activities/SettingsGeneralActivity.java | 9 +- .../SettingsNavigationActivity.java | 7 +- .../osmand/plus/activities/TabActivity.java | 10 +- .../osmand/plus/activities/TrackActivity.java | 12 ++- .../activities/actions/AppModeDialog.java | 8 +- .../activities/actions/OsmAndDialogs.java | 9 +- .../actions/OsmandRestoreOrExitDialog.java | 5 +- .../plus/activities/actions/ShareDialog.java | 3 +- .../activities/actions/StartGPSStatus.java | 7 +- .../activities/search/SearchActivity.java | 48 +++++---- .../search/SearchAddressFragment.java | 5 +- .../search/SearchByNameAbstractActivity.java | 3 +- .../search/SearchHistoryFragment.java | 50 ++++----- .../activities/search/SearchPOIActivity.java | 84 ++++++++------- .../search/SearchPoiFilterFragment.java | 7 +- .../search/SearchRegionByNameActivity.java | 18 ++-- .../search/toolbar/SplitToolbar.java | 5 +- .../plus/audionotes/AudioNotesLayer.java | 5 +- .../audionotes/AudioVideoNoteMenuBuilder.java | 3 +- .../AudioVideoNoteMenuController.java | 5 +- ...AudioVideoNoteRecordingMenuFullScreen.java | 5 +- ...eoNoteRecordingMenuFullScreenFragment.java | 7 +- .../audionotes/AudioVideoNotesPlugin.java | 7 +- .../DashAudioVideoNotesFragment.java | 3 +- .../audionotes/MultimediaNotesFragment.java | 11 +- .../osmand/plus/audionotes/NotesFragment.java | 11 +- .../audionotes/adapters/NotesAdapter.java | 5 +- .../plus/base/BaseOsmAndDialogFragment.java | 13 +-- .../osmand/plus/base/BaseOsmAndFragment.java | 19 ++-- .../osmand/plus/base/BottomSheetDialog.java | 5 +- .../plus/base/BottomSheetDialogFragment.java | 11 +- .../osmand/plus/base/ContextMenuFragment.java | 15 +-- .../osmand/plus/base/FailSafeFuntions.java | 7 +- .../plus/base/FavoriteImageDrawable.java | 3 +- .../plus/base/MapViewTrackingUtilities.java | 4 +- .../base/MenuBottomSheetDialogFragment.java | 17 +-- .../osmand/plus/base/OsmAndListFragment.java | 3 +- .../base/OsmandExpandableListFragment.java | 5 +- .../bottomsheetmenu/BaseBottomSheetItem.java | 4 +- ...ottomSheetItemTitleWithDescrAndButton.java | 10 +- .../BottomSheetItemWithCompoundButton.java | 10 +- .../BottomSheetItemWithDescription.java | 7 +- .../HorizontalRecyclerBottomSheetItem.java | 6 +- .../SimpleBottomSheetItem.java | 7 +- .../simpleitems/DividerHalfItem.java | 3 +- .../simpleitems/DividerItem.java | 6 +- .../simpleitems/DividerStartItem.java | 3 +- .../simpleitems/SimpleDividerItem.java | 3 +- .../simpleitems/SubtitleDividerItem.java | 3 +- .../simpleitems/SubtitmeListDividerItem.java | 3 +- .../simpleitems/TitleDividerItem.java | 3 +- .../simpleitems/TitleItem.java | 4 +- .../chooseplan/ChoosePlanDialogFragment.java | 19 ++-- .../ChoosePlanFreeBannerDialogFragment.java | 3 +- ...ChoosePlanHillshadeSrtmDialogFragment.java | 3 +- .../ChoosePlanSeaDepthMapsDialogFragment.java | 3 +- .../chooseplan/OsmLiveCancelledDialog.java | 13 +-- .../plus/dashboard/DashBaseFragment.java | 10 +- .../dashboard/DashChooseAppDirFragment.java | 14 +-- .../plus/dashboard/DashErrorFragment.java | 6 +- .../plus/dashboard/DashFavoritesFragment.java | 5 +- .../dashboard/DashNavigationFragment.java | 11 +- .../plus/dashboard/DashPluginsFragment.java | 5 +- .../plus/dashboard/DashRecentsFragment.java | 3 +- .../plus/dashboard/DashSearchFragment.java | 5 +- .../plus/dashboard/DashWaypointsFragment.java | 7 +- .../osmand/plus/dashboard/DashboardOnMap.java | 15 +-- .../dashboard/tools/DashFragmentData.java | 2 +- .../DashboardSettingsDialogFragment.java | 12 +-- .../tools/NumberPickerDialogFragment.java | 7 +- .../dashboard/tools/TransactionBuilder.java | 5 +- .../development/DashSimulateFragment.java | 3 +- .../DevelopmentSettingsFragment.java | 3 +- .../plus/development/LogcatActivity.java | 9 +- .../plus/development/TestVoiceActivity.java | 7 +- .../AddWaypointBottomSheetDialogFragment.java | 5 +- .../osmand/plus/dialogs/ConfigureMapMenu.java | 19 ++-- .../CrashBottomSheetDialogFragment.java | 6 +- .../plus/dialogs/DirectionsDialogs.java | 7 +- ...islikeOsmAndBottomSheetDialogFragment.java | 7 +- .../osmand/plus/dialogs/FavoriteDialogs.java | 8 +- .../dialogs/HelpArticleDialogFragment.java | 7 +- .../dialogs/PluginDisabledBottomSheet.java | 5 +- .../PluginInstalledBottomSheetDialog.java | 5 +- .../plus/dialogs/ProgressDialogFragment.java | 5 +- .../osmand/plus/dialogs/RasterMapMenu.java | 5 +- .../RateUsBottomSheetDialogFragment.java | 8 +- ...lectMapStyleBottomSheetDialogFragment.java | 9 +- .../SelectMapViewQuickActionsBottomSheet.java | 17 +-- ...endAnalyticsBottomSheetDialogFragment.java | 11 +- .../plus/dialogs/WhatsNewDialogFragment.java | 7 +- .../plus/dialogs/XMasDialogFragment.java | 7 +- .../plus/download/DownloadActivity.java | 23 ++-- .../plus/download/DownloadIndexesThread.java | 5 +- .../plus/download/DownloadResources.java | 4 +- .../download/DownloadValidationManager.java | 10 +- .../net/osmand/plus/download/IndexItem.java | 14 +-- .../ui/ActiveDownloadsDialogFragment.java | 7 +- .../ui/DataStoragePlaceDialogFragment.java | 5 +- .../ui/DownloadMapToolbarController.java | 6 +- .../ui/DownloadResourceGroupFragment.java | 9 +- .../plus/download/ui/ItemViewHolder.java | 7 +- .../download/ui/LocalIndexesFragment.java | 100 +++++++++--------- .../download/ui/SearchDialogFragment.java | 11 +- .../download/ui/UpdatesIndexFragment.java | 42 ++++---- .../firstusage/FirstUsageWelcomeFragment.java | 9 +- .../firstusage/FirstUsageWizardFragment.java | 17 ++- .../osmand/plus/helpers/AndroidUiHelper.java | 6 +- .../plus/helpers/AvoidSpecificRoads.java | 9 +- .../osmand/plus/helpers/DiscountHelper.java | 7 +- .../plus/helpers/ExternalApiHelper.java | 13 +-- .../net/osmand/plus/helpers/GpxUiHelper.java | 15 +-- .../net/osmand/plus/helpers/ImportHelper.java | 11 +- .../net/osmand/plus/helpers/LockHelper.java | 5 +- .../plus/helpers/WaypointDialogHelper.java | 3 +- .../plus/inapp/InAppPurchaseHelper.java | 5 +- .../net/osmand/plus/inapp/InAppPurchases.java | 7 +- .../plus/inapp/util/BillingManager.java | 5 +- .../liveupdates/CountrySelectionFragment.java | 5 +- .../plus/liveupdates/LiveUpdatesFragment.java | 21 ++-- .../plus/liveupdates/LiveUpdatesHelper.java | 3 +- .../LiveUpdatesSettingsDialogFragment.java | 10 +- .../plus/liveupdates/OsmLiveActivity.java | 14 +-- .../PerformLiveUpdateAsyncTask.java | 3 +- .../plus/liveupdates/ReportsFragment.java | 7 +- .../liveupdates/SubscriptionFragment.java | 9 +- .../plus/liveupdates/UsersReportFragment.java | 18 ++-- ...ionalActionsBottomSheetDialogFragment.java | 7 +- .../mapcontextmenu/BaseMenuController.java | 5 +- .../plus/mapcontextmenu/MapContextMenu.java | 7 +- .../MapContextMenuFragment.java | 13 +-- .../plus/mapcontextmenu/MenuBuilder.java | 13 +-- .../plus/mapcontextmenu/MenuController.java | 16 +-- .../mapcontextmenu/MenuTitleController.java | 3 +- .../TransportStopRouteAdapter.java | 7 +- .../builders/AmenityMenuBuilder.java | 7 +- .../builders/FavouritePointMenuBuilder.java | 3 +- .../builders/GpxItemMenuBuilder.java | 5 +- .../builders/MapDataMenuBuilder.java | 3 +- .../builders/WptPtMenuBuilder.java | 7 +- .../builders/cards/AbstractCard.java | 9 +- .../builders/cards/CardsRowBuilder.java | 5 +- .../builders/cards/ImageCard.java | 7 +- .../builders/cards/NoImagesCard.java | 5 +- .../cards/dialogs/ContextMenuCardDialog.java | 3 +- .../ContextMenuCardDialogFragment.java | 15 +-- .../controllers/AMapPointMenuController.java | 5 +- .../controllers/AmenityMenuController.java | 3 +- .../FavouritePointMenuController.java | 5 +- .../controllers/GpxItemMenuController.java | 3 +- .../controllers/HistoryMenuController.java | 3 +- .../ImpassibleRoadsMenuController.java | 5 +- .../controllers/MapDataMenuController.java | 6 +- .../controllers/MapMarkerMenuController.java | 9 +- .../controllers/MyLocationMenuController.java | 4 +- .../PointDescriptionMenuController.java | 3 +- .../RenderedObjectMenuController.java | 2 +- .../TargetPointMenuController.java | 3 +- .../controllers/TransportRouteController.java | 3 +- .../controllers/TransportStopController.java | 6 +- .../controllers/WptPtMenuController.java | 5 +- .../editors/EditCategoryDialogFragment.java | 11 +- .../editors/FavoritePointEditor.java | 2 +- .../editors/FavoritePointEditorFragment.java | 9 +- .../editors/MapMarkerEditor.java | 2 +- .../editors/MapMarkerEditorFragment.java | 5 +- .../mapcontextmenu/editors/PointEditor.java | 7 +- .../editors/PointEditorFragment.java | 13 +-- .../mapcontextmenu/editors/RtePtEditor.java | 2 +- .../editors/RtePtEditorFragment.java | 2 +- .../editors/SelectCategoryDialogFragment.java | 17 ++- .../mapcontextmenu/editors/WptPtEditor.java | 6 +- .../editors/WptPtEditorFragment.java | 9 +- .../other/DestinationReachedMenu.java | 2 - .../other/DestinationReachedMenuFragment.java | 9 +- .../other/FavouritesAdapter.java | 17 +-- .../FavouritesBottomSheetMenuFragment.java | 11 +- .../other/MapMultiSelectionMenu.java | 6 +- .../other/MapMultiSelectionMenuFragment.java | 8 +- .../other/MultiSelectionArrayAdapter.java | 9 +- .../other/RoutePreferencesMenu.java | 9 +- .../plus/mapcontextmenu/other/ShareMenu.java | 7 +- .../other/TrackDetailsMenu.java | 7 +- .../other/TrackDetailsMenuFragment.java | 11 +- .../MapillaryAutoCompleteAdapter.java | 7 +- .../mapillary/MapillaryFiltersFragment.java | 9 +- .../plus/mapillary/MapillaryImageDialog.java | 7 +- .../MapillaryInstallDialogFragment.java | 7 +- .../mapillary/MapillaryMenuController.java | 3 +- .../plus/mapillary/MapillaryPlugin.java | 9 +- .../plus/mapillary/MapillaryVectorLayer.java | 3 +- ...ouritesGroupBottomSheetDialogFragment.java | 3 +- .../AddGroupBottomSheetDialogFragment.java | 6 +- ...dTracksGroupBottomSheetDialogFragment.java | 7 +- .../CoordinateInputDialogFragment.java | 36 ++++--- .../DirectionIndicationDialogFragment.java | 9 +- .../MapMarkerSelectionFragment.java | 3 +- .../mapmarkers/MapMarkersActiveFragment.java | 18 ++-- .../plus/mapmarkers/MapMarkersDbHelper.java | 2 +- .../mapmarkers/MapMarkersDialogFragment.java | 24 +++-- .../mapmarkers/MapMarkersGroupsFragment.java | 19 ++-- .../mapmarkers/MapMarkersHistoryFragment.java | 17 +-- .../OptionsBottomSheetDialogFragment.java | 5 +- .../plus/mapmarkers/PlanRouteFragment.java | 28 ++--- .../SaveAsTrackBottomSheetDialogFragment.java | 12 ++- ...ptCategoriesBottomSheetDialogFragment.java | 3 +- .../adapters/CoordinateInputAdapter.java | 13 +-- .../adapters/FavouritesGroupsAdapter.java | 3 +- .../mapmarkers/adapters/GroupsAdapter.java | 5 +- .../MapMarkerCategoriesViewHolder.java | 6 +- .../adapters/MapMarkerHeaderViewHolder.java | 6 +- .../adapters/MapMarkerItemViewHolder.java | 3 +- .../adapters/MapMarkersActiveAdapter.java | 16 +-- .../MapMarkersGroupHeaderViewHolder.java | 3 +- .../adapters/MapMarkersGroupViewHolder.java | 3 +- .../adapters/MapMarkersGroupsAdapter.java | 16 +-- .../adapters/MapMarkersHistoryAdapter.java | 13 +-- .../MapMarkersItemTouchHelperCallback.java | 7 +- .../adapters/MapMarkersListAdapter.java | 11 +- .../MapMarkersShowHideHistoryViewHolder.java | 3 +- .../adapters/TracksGroupsAdapter.java | 5 +- .../MeasurementEditingContext.java | 3 +- .../MeasurementToolFragment.java | 25 ++--- .../measurementtool/RecyclerViewFragment.java | 9 +- ...electedPointBottomSheetDialogFragment.java | 5 +- .../SnapToRoadBottomSheetDialogFragment.java | 10 +- .../adapter/MeasurementToolAdapter.java | 9 +- .../command/MeasurementCommandManager.java | 2 +- .../MonitoringSettingsFragment.java | 5 +- .../OnSaveCurrentTrackFragment.java | 13 +-- .../monitoring/OsmandMonitoringPlugin.java | 11 +- .../SettingsMonitoringActivity.java | 5 +- .../plus/myplaces/AvailableGPXFragment.java | 17 +-- .../EditTrackGroupDialogFragment.java | 12 +-- .../plus/myplaces/FavoritesActivity.java | 12 +-- .../GpxDescriptionDialogFragment.java | 12 ++- .../myplaces/SplitSegmentDialogFragment.java | 13 +-- .../TrackActivityFragmentAdapter.java | 15 +-- .../plus/myplaces/TrackBitmapDrawer.java | 9 +- .../plus/myplaces/TrackPointFragment.java | 28 ++--- .../plus/myplaces/TrackSegmentFragment.java | 17 +-- .../notifications/DownloadNotification.java | 3 +- .../plus/notifications/ErrorNotification.java | 3 +- .../plus/notifications/GpxNotification.java | 7 +- .../notifications/NavigationNotification.java | 7 +- .../notifications/OsmandNotification.java | 9 +- .../openseamapsplugin/NauticalMapsPlugin.java | 5 +- .../plus/osmedit/AdvancedEditPoiFragment.java | 5 +- .../plus/osmedit/BasicEditPoiFragment.java | 7 +- .../plus/osmedit/DashOsmEditsFragment.java | 3 +- .../plus/osmedit/EditPOIMenuBuilder.java | 4 +- .../plus/osmedit/EditPOIMenuController.java | 5 +- .../net/osmand/plus/osmedit/EditPoiData.java | 2 +- .../plus/osmedit/EditPoiDialogFragment.java | 31 +++--- .../osmand/plus/osmedit/EditPoiViewPager.java | 3 +- .../plus/osmedit/OpenstreetmapUtil.java | 2 +- .../plus/osmedit/OsmBugMenuController.java | 3 +- .../net/osmand/plus/osmedit/OsmBugsLayer.java | 3 +- .../plus/osmedit/OsmEditingFragment.java | 7 +- .../osmand/plus/osmedit/OsmEditingPlugin.java | 7 +- .../osmand/plus/osmedit/OsmEditsAdapter.java | 6 +- .../osmand/plus/osmedit/OsmEditsFragment.java | 15 +-- .../osmand/plus/osmedit/OsmEditsLayer.java | 5 +- .../osmedit/OsmEditsUploadListenerHelper.java | 15 +-- .../net/osmand/plus/osmedit/OsmNotesMenu.java | 5 +- .../OpeningHoursDaysDialogFragment.java | 7 +- .../OpeningHoursHoursDialogFragment.java | 7 +- .../dialogs/PoiSubTypeDialogFragment.java | 7 +- .../dialogs/PoiTypeDialogFragment.java | 7 +- .../dialogs/SendPoiDialogFragment.java | 9 +- .../parkingpoint/DashParkingFragment.java | 3 +- .../ParkingPositionMenuController.java | 3 +- .../parkingpoint/ParkingPositionPlugin.java | 5 +- .../net/osmand/plus/poi/PoiFiltersHelper.java | 2 +- .../src/net/osmand/plus/poi/PoiUIFilter.java | 3 +- .../plus/poi/RearrangePoiFiltersFragment.java | 19 ++-- .../profiles/AbstractProfileMenuAdapter.java | 4 +- .../AppModesBottomSheetDialogFragment.java | 5 +- .../plus/profiles/AppProfileArrayAdapter.java | 9 +- .../profiles/ConfigureProfileMenuAdapter.java | 11 +- .../plus/profiles/EditProfilesFragment.java | 17 +-- .../osmand/plus/profiles/LocationIcon.java | 2 +- .../osmand/plus/profiles/NavigationIcon.java | 2 +- .../profiles/ProfileAbstractViewHolder.java | 3 +- .../plus/profiles/ProfileDataObject.java | 4 +- .../plus/profiles/ProfileIconColors.java | 4 +- .../osmand/plus/profiles/ProfileIcons.java | 6 +- ...lectAppModesBottomSheetDialogFragment.java | 9 +- .../SelectCopyAppModeBottomSheet.java | 7 +- .../SelectCopyProfilesMenuAdapter.java | 9 +- ...electProfileBottomSheetDialogFragment.java | 9 +- .../profiles/SelectProfileMenuAdapter.java | 13 +-- .../quickaction/AddQuickActionDialog.java | 11 +- .../quickaction/CreateEditActionDialog.java | 11 +- .../osmand/plus/quickaction/QuickAction.java | 5 +- .../plus/quickaction/QuickActionFactory.java | 4 +- .../quickaction/QuickActionListFragment.java | 24 +++-- .../plus/quickaction/QuickActionsWidget.java | 17 +-- .../plus/quickaction/SwitchableAction.java | 13 +-- .../quickaction/actions/AddOSMBugAction.java | 3 +- .../quickaction/actions/AddPOIAction.java | 5 +- .../quickaction/actions/FavoriteAction.java | 5 +- .../plus/quickaction/actions/GPXAction.java | 3 +- .../quickaction/actions/MapOverlayAction.java | 7 +- .../quickaction/actions/MapSourceAction.java | 7 +- .../quickaction/actions/MapStyleAction.java | 5 +- .../actions/MapUnderlayAction.java | 7 +- .../actions/NavStartStopAction.java | 4 +- .../actions/ShowHidePoiAction.java | 5 +- .../rastermaps/OsmandRasterMapsPlugin.java | 11 +- .../osmand/plus/render/RendererRegistry.java | 6 +- .../AmenityIndexRepositoryBinary.java | 2 +- .../resources/RegionAddressRepository.java | 10 +- .../RegionAddressRepositoryBinary.java | 4 +- .../plus/resources/ResourceManager.java | 5 +- .../TransportIndexRepositoryBinary.java | 16 +-- .../AddPointBottomSheetDialog.java | 11 +- .../AvoidRoadsBottomSheetDialogFragment.java | 11 +- .../ChooseRouteFragment.java | 19 ++-- .../MapRouteInfoMenu.java | 27 ++--- .../MapRouteInfoMenuFragment.java | 7 +- .../RouteDetailsFragment.java | 9 +- .../RouteOptionsBottomSheet.java | 11 +- .../RoutingOptionsHelper.java | 11 +- .../ShowAlongTheRouteBottomSheet.java | 9 +- .../WaypointsFragment.java | 13 +-- .../routepreparationmenu/cards/BaseCard.java | 15 +-- .../cards/HistoryCard.java | 5 +- .../cards/HomeWorkCard.java | 2 - .../cards/LongDistanceWarningCard.java | 2 +- .../cards/MapMarkersCard.java | 5 +- .../cards/PedestrianRouteCard.java | 3 +- .../cards/PublicTransportBetaWarningCard.java | 3 +- .../cards/PublicTransportCard.java | 7 +- ...cTransportNotFoundSettingsWarningCard.java | 2 +- .../PublicTransportNotFoundWarningCard.java | 2 +- .../cards/RouteDirectionsCard.java | 5 +- .../cards/RouteInfoCard.java | 9 +- .../cards/RouteStatisticCard.java | 5 +- .../cards/TracksCard.java | 7 +- .../cards/WarningCard.java | 3 +- .../plus/routing/RouteCalculationResult.java | 4 +- .../plus/routing/RouteDirectionInfo.java | 2 +- .../plus/routing/TransportRoutingHelper.java | 5 +- .../QuickSearchCoordinatesFragment.java | 25 ++--- .../search/QuickSearchCustomPoiFragment.java | 21 ++-- .../search/QuickSearchDialogFragment.java | 33 +++--- .../osmand/plus/search/QuickSearchHelper.java | 7 +- .../plus/search/QuickSearchListAdapter.java | 8 +- .../search/QuickSearchPoiFilterFragment.java | 18 ++-- .../listitems/QuickSearchButtonListItem.java | 3 +- .../listitems/QuickSearchMoreListItem.java | 2 +- .../plus/settings/BaseSettingsFragment.java | 58 +++++----- .../settings/ConfigureProfileFragment.java | 25 ++--- .../settings/CoordinatesFormatFragment.java | 13 +-- .../plus/settings/DataStorageFragment.java | 21 ++-- .../plus/settings/DataStorageMenuItem.java | 3 +- ...alogsAndNotificationsSettingsFragment.java | 5 +- .../settings/DuplicatesSettingsAdapter.java | 6 +- .../settings/ExportImportSettingsAdapter.java | 7 +- .../settings/ExportProfileBottomSheet.java | 11 +- .../GeneralProfileSettingsFragment.java | 17 +-- .../plus/settings/GlobalSettingsFragment.java | 9 +- .../settings/ImportDuplicatesFragment.java | 19 ++-- .../plus/settings/ImportSettingsFragment.java | 14 +-- .../plus/settings/LiveMonitoringFragment.java | 9 +- .../plus/settings/MainSettingsFragment.java | 16 +-- .../settings/MapDuringNavigationFragment.java | 2 +- .../plus/settings/NavigationFragment.java | 5 +- .../settings/ProfileAppearanceFragment.java | 17 +-- .../plus/settings/ProxySettingsFragment.java | 7 +- .../settings/RouteParametersFragment.java | 13 ++- .../plus/settings/ScreenAlertsFragment.java | 11 +- .../plus/settings/TurnScreenOnFragment.java | 9 +- .../settings/VehicleParametersFragment.java | 5 +- .../plus/settings/VoiceAnnouncesFragment.java | 13 +-- .../BasePreferenceBottomSheet.java | 11 +- .../BooleanPreferenceBottomSheet.java | 9 +- .../ChangeDataStorageBottomSheet.java | 7 +- .../ChangeGeneralProfilesPrefBottomSheet.java | 9 +- .../EditTextPreferenceBottomSheet.java | 9 +- .../MultiSelectPreferencesBottomSheet.java | 9 +- .../bottomsheets/OsmLoginDataBottomSheet.java | 11 +- .../ResetProfilePrefsBottomSheet.java | 9 +- .../bottomsheets/SelectFolderBottomSheet.java | 7 +- .../SingleSelectPreferenceBottomSheet.java | 9 +- .../preferences/EditTextPreferenceEx.java | 3 +- .../preferences/ListPreferenceEx.java | 5 +- .../MultiSelectBooleanPreference.java | 5 +- .../preferences/SwitchPreferenceEx.java | 3 +- .../plus/skimapsplugin/SkiMapsPlugin.java | 6 +- .../osmand/plus/srtmplugin/SRTMPlugin.java | 8 +- .../net/osmand/plus/views/AidlMapLayer.java | 5 +- .../plus/views/AnimateDraggingMapThread.java | 3 +- .../osmand/plus/views/ContextMenuLayer.java | 10 +- .../plus/views/DownloadedRegionsLayer.java | 3 +- .../osmand/plus/views/FavouritesLayer.java | 9 +- .../src/net/osmand/plus/views/GPXLayer.java | 9 +- .../plus/views/ImpassableRoadsLayer.java | 5 +- .../osmand/plus/views/MapControlsLayer.java | 13 +-- .../net/osmand/plus/views/MapInfoLayer.java | 24 ++++- .../osmand/plus/views/MapMarkersLayer.java | 12 ++- .../plus/views/MapQuickActionLayer.java | 9 +- .../net/osmand/plus/views/OsmandMapLayer.java | 5 +- .../net/osmand/plus/views/POIMapLayer.java | 5 +- .../osmand/plus/views/PointLocationLayer.java | 5 +- .../plus/views/PointNavigationLayer.java | 7 +- .../src/net/osmand/plus/views/Renderable.java | 3 +- .../src/net/osmand/plus/views/RouteLayer.java | 7 +- .../osmand/plus/views/RulerControlLayer.java | 5 +- .../plus/views/TransportStopsLayer.java | 3 +- .../net/osmand/plus/views/TurnPathHelper.java | 3 +- .../controls/DelayAutoCompleteTextView.java | 2 +- .../plus/views/controls/DynamicListView.java | 5 +- .../views/controls/PagerSlidingTabStrip.java | 17 +-- .../ReorderItemTouchHelperCallback.java | 4 +- .../SwipeDismissListViewTouchListener.java | 7 +- .../controls/WrapContentHeightViewPager.java | 5 +- .../mapwidgets/MapInfoWidgetsFactory.java | 19 ++-- .../views/mapwidgets/MapWidgetRegistry.java | 7 +- .../views/mapwidgets/NextTurnInfoWidget.java | 5 +- .../mapwidgets/RouteInfoWidgetsFactory.java | 6 +- .../voice/AbstractPrologCommandPlayer.java | 6 +- .../plus/voice/TTSCommandPlayerImpl.java | 3 +- .../net/osmand/plus/widgets/EditTextEx.java | 3 +- .../plus/widgets/EmptyStateRecyclerView.java | 5 +- .../osmand/plus/widgets/IconPopupMenu.java | 11 +- .../plus/widgets/InterceptorFrameLayout.java | 3 +- .../plus/widgets/OsmandTextFieldBoxes.java | 3 +- .../net/osmand/plus/widgets/TextViewEx.java | 3 +- .../tools/ExtendedBottomSheetBehavior.java | 24 +++-- .../tools/SwipeDismissTouchListener.java | 5 +- .../WikiArticleBaseDialogFragment.java | 5 +- .../plus/wikipedia/WikiArticleHelper.java | 7 +- .../WikipediaArticleWikiLinkFragment.java | 5 +- .../wikipedia/WikipediaDialogFragment.java | 19 ++-- ...pediaOptionsBottomSheetDialogFragment.java | 5 +- .../wikipedia/WikipediaWebViewClient.java | 3 +- .../wikivoyage/WikiBaseDialogFragment.java | 21 ++-- .../WikivoyageShowPicturesDialogFragment.java | 9 +- .../wikivoyage/WikivoyageWebViewClient.java | 11 +- .../WikivoyageWelcomeDialogFragment.java | 9 +- .../WikivoyageArticleContentsFragment.java | 5 +- .../WikivoyageArticleDialogFragment.java | 17 +-- .../WikivoyageArticleNavigationFragment.java | 12 +-- .../WikivoyageArticleWikiLinkFragment.java | 7 +- .../plus/wikivoyage/data/TravelArticle.java | 16 +-- .../plus/wikivoyage/data/TravelDbHelper.java | 9 +- .../data/TravelLocalDataHelper.java | 4 +- .../wikivoyage/data/WikivoyageJsonParser.java | 3 +- .../wikivoyage/explore/ExploreRvAdapter.java | 7 +- .../explore/ExploreTabFragment.java | 11 +- .../explore/SavedArticlesRvAdapter.java | 12 +-- .../explore/SavedArticlesTabFragment.java | 13 +-- .../explore/WikivoyageExploreActivity.java | 24 +++-- ...oyageOptionsBottomSheetDialogFragment.java | 5 +- .../travelcards/ArticleTravelCard.java | 7 +- .../explore/travelcards/BaseTravelCard.java | 13 +-- .../explore/travelcards/HeaderTravelCard.java | 5 +- .../travelcards/OpenBetaTravelCard.java | 7 +- .../travelcards/StartEditingTravelCard.java | 7 +- .../travelcards/TravelDownloadUpdateCard.java | 12 ++- .../travelcards/TravelNeededMapsCard.java | 7 +- .../menu/WikivoyageWptPtMenuBuilder.java | 3 +- .../menu/WikivoyageWptPtMenuController.java | 4 +- .../search/SearchRecyclerViewAdapter.java | 9 +- .../WikivoyageSearchDialogFragment.java | 13 +-- OsmAnd/src/net/osmand/view/ComplexButton.java | 5 +- .../net/osmand/view/ThreeStateCheckbox.java | 3 +- OsmAndCore-sample/build.gradle | 6 +- .../res/layout/search_dialog_fragment.xml | 8 +- .../samples/android/sample1/IconsCache.java | 11 +- .../sample1/InstallOsmandAppDialog.java | 9 +- .../samples/android/sample1/MainActivity.java | 15 +-- .../android/sample1/OsmandResources.java | 7 +- .../android/sample1/SampleApplication.java | 3 +- .../sample1/SampleLocationProvider.java | 6 +- .../samples/android/sample1/SampleUtils.java | 5 +- .../sample1/data/PointDescription.java | 5 +- .../mapcontextmenu/ContextMenuHelper.java | 13 +-- .../mapcontextmenu/MapContextMenu.java | 7 +- .../MapContextMenuFragment.java | 7 +- .../mapcontextmenu/MapMultiSelectionMenu.java | 4 +- .../MapMultiSelectionMenuFragment.java | 5 +- .../sample1/mapcontextmenu/MenuBuilder.java | 5 +- .../mapcontextmenu/MenuController.java | 4 +- .../builders/AmenityMenuBuilder.java | 9 +- .../search/QuickSearchDialogFragment.java | 15 +-- .../search/QuickSearchListFragment.java | 3 +- gradle.properties | 2 + plugins/Osmand-Nautical/build.gradle | 4 +- plugins/Osmand-Nautical/res/layout/main.xml | 2 +- plugins/Osmand-ParkingPlugin/build.gradle | 4 +- .../Osmand-ParkingPlugin/res/layout/main.xml | 2 +- plugins/Osmand-SRTMPlugin/build.gradle | 4 +- plugins/Osmand-SRTMPlugin/res/layout/main.xml | 2 +- plugins/Osmand-Skimaps/build.gradle | 4 +- plugins/Osmand-Skimaps/res/layout/main.xml | 2 +- 837 files changed, 3514 insertions(+), 3058 deletions(-) diff --git a/OsmAnd-api/src/net/osmand/aidlapi/copyfile/CopyFileParams.java b/OsmAnd-api/src/net/osmand/aidlapi/copyfile/CopyFileParams.java index 2b18172717..1118a17f5c 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/copyfile/CopyFileParams.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/copyfile/CopyFileParams.java @@ -2,7 +2,8 @@ package net.osmand.aidlapi.copyfile; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.aidlapi.AidlParams; diff --git a/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsInfoParams.java b/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsInfoParams.java index c7cf7e16c5..af92549dfb 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsInfoParams.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsInfoParams.java @@ -2,7 +2,8 @@ package net.osmand.aidlapi.customization; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.aidlapi.AidlParams; diff --git a/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsParams.java b/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsParams.java index dead6bbd2f..1d843c9552 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsParams.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsParams.java @@ -2,8 +2,9 @@ package net.osmand.aidlapi.customization; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.aidlapi.AidlParams; diff --git a/OsmAnd-api/src/net/osmand/aidlapi/customization/SetWidgetsParams.java b/OsmAnd-api/src/net/osmand/aidlapi/customization/SetWidgetsParams.java index ed9755710a..706b356b33 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/customization/SetWidgetsParams.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/customization/SetWidgetsParams.java @@ -2,7 +2,8 @@ package net.osmand.aidlapi.customization; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.Nullable; + +import androidx.annotation.Nullable; import net.osmand.aidlapi.AidlParams; diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.java index 6ba3f8ea4b..fd0d527c49 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.java @@ -3,7 +3,8 @@ package net.osmand.aidlapi.gpx; import android.graphics.Bitmap; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.aidlapi.AidlParams; diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.java index e293875f10..36a2e6b5c5 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.java @@ -2,8 +2,9 @@ package net.osmand.aidlapi.gpx; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.aidlapi.AidlParams; diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/ASelectedGpxFile.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ASelectedGpxFile.java index fc7e60cedb..7e1fa5bdd7 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/gpx/ASelectedGpxFile.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ASelectedGpxFile.java @@ -2,8 +2,9 @@ package net.osmand.aidlapi.gpx; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.aidlapi.AidlParams; diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerFooterParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerFooterParams.java index 667016c5e0..6898cf51cf 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerFooterParams.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerFooterParams.java @@ -2,8 +2,9 @@ package net.osmand.aidlapi.navdrawer; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.aidlapi.AidlParams; diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerHeaderParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerHeaderParams.java index 3ea2d45eaf..a1aa64f94d 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerHeaderParams.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerHeaderParams.java @@ -2,8 +2,9 @@ package net.osmand.aidlapi.navdrawer; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.aidlapi.AidlParams; diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerItem.java b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerItem.java index e865a540f8..3edb4720de 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerItem.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerItem.java @@ -2,8 +2,9 @@ package net.osmand.aidlapi.navdrawer; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.aidlapi.AidlParams; diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/SetNavDrawerItemsParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/SetNavDrawerItemsParams.java index 9609b558ae..947931b05c 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/SetNavDrawerItemsParams.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/SetNavDrawerItemsParams.java @@ -2,7 +2,8 @@ package net.osmand.aidlapi.navdrawer; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.aidlapi.AidlParams; diff --git a/OsmAnd-api/src/net/osmand/aidlapi/tiles/ASqliteDbFile.java b/OsmAnd-api/src/net/osmand/aidlapi/tiles/ASqliteDbFile.java index 1ea8c70e60..66ef0aff24 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/tiles/ASqliteDbFile.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/tiles/ASqliteDbFile.java @@ -2,7 +2,8 @@ package net.osmand.aidlapi.tiles; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.aidlapi.AidlParams; diff --git a/OsmAnd-telegram/AndroidManifest.xml b/OsmAnd-telegram/AndroidManifest.xml index 09d7472e5a..7b2a96c236 100644 --- a/OsmAnd-telegram/AndroidManifest.xml +++ b/OsmAnd-telegram/AndroidManifest.xml @@ -66,7 +66,7 @@ diff --git a/OsmAnd-telegram/build.gradle b/OsmAnd-telegram/build.gradle index 1dada0438a..78df6e3f08 100644 --- a/OsmAnd-telegram/build.gradle +++ b/OsmAnd-telegram/build.gradle @@ -142,12 +142,12 @@ dependencies { implementation( "org.jetbrains.kotlin:kotlin-stdlib:1.2.71") { exclude group: 'org.jetbrains', module: 'annotations' } - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support:design:28.0.0' - implementation 'com.android.support:customtabs:28.0.0' - implementation 'com.android.support:support-annotations:28.0.0' + implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'com.google.android.material:material:1.0.0' + implementation 'androidx.browser:browser:1.0.0' + implementation 'androidx.annotation:annotation:1.0.0' implementation 'commons-logging:commons-logging-api:1.1' - implementation 'com.android.support:recyclerview-v7:28.0.0' + implementation 'androidx.recyclerview:recyclerview:1.0.0' implementation 'com.vividsolutions:jts-core:1.14.0' implementation("com.github.HITGIF:TextFieldBoxes:1.4.4") { exclude group: 'com.android.support' diff --git a/OsmAnd-telegram/res/layout/activity_main.xml b/OsmAnd-telegram/res/layout/activity_main.xml index dea3e9ba59..79803a0ef4 100644 --- a/OsmAnd-telegram/res/layout/activity_main.xml +++ b/OsmAnd-telegram/res/layout/activity_main.xml @@ -8,7 +8,7 @@ android:orientation="vertical" tools:context=".ui.MainActivity"> - - - + - - - - + - + - - - + - + - - - + - + - - + diff --git a/OsmAnd-telegram/res/layout/bottom_sheet_disable_sharing.xml b/OsmAnd-telegram/res/layout/bottom_sheet_disable_sharing.xml index b27c2a5b11..dbfb7c4a7e 100644 --- a/OsmAnd-telegram/res/layout/bottom_sheet_disable_sharing.xml +++ b/OsmAnd-telegram/res/layout/bottom_sheet_disable_sharing.xml @@ -8,12 +8,12 @@ android:orientation="vertical" tools:layout_gravity="bottom"> - - - + - + - - - + - + - - - + - + - - - + - + - - - + - + - - - + - + - - @@ -30,9 +30,9 @@ android:textSize="@dimen/title_text_size" app:typeface="@string/font_roboto_mono_bold"/> - + - + - - + - - - + - - - + - - + diff --git a/OsmAnd-telegram/res/layout/fragment_proxy_settings_dialog.xml b/OsmAnd-telegram/res/layout/fragment_proxy_settings_dialog.xml index fef50ebba8..b9d7945c55 100644 --- a/OsmAnd-telegram/res/layout/fragment_proxy_settings_dialog.xml +++ b/OsmAnd-telegram/res/layout/fragment_proxy_settings_dialog.xml @@ -12,13 +12,13 @@ android:layout_height="match_parent" android:orientation="vertical"> - - @@ -34,7 +34,7 @@ android:textSize="@dimen/title_text_size" app:typeface="@string/font_roboto_mono_bold" /> - + - + - - - @@ -49,9 +49,9 @@ - + - + - - @@ -81,14 +81,14 @@ - + - - - + - @@ -158,6 +158,6 @@ - + diff --git a/OsmAnd-telegram/res/layout/fragment_user_gpx_info.xml b/OsmAnd-telegram/res/layout/fragment_user_gpx_info.xml index 1adc2e849e..709b0327b8 100644 --- a/OsmAnd-telegram/res/layout/fragment_user_gpx_info.xml +++ b/OsmAnd-telegram/res/layout/fragment_user_gpx_info.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd-telegram/res/layout/login_dialog.xml b/OsmAnd-telegram/res/layout/login_dialog.xml index c1d4558168..5cf864e1bc 100644 --- a/OsmAnd-telegram/res/layout/login_dialog.xml +++ b/OsmAnd-telegram/res/layout/login_dialog.xml @@ -96,7 +96,7 @@ android:minHeight="@dimen/action_bar_height" android:orientation="horizontal"> - = 23 -> setStyle(DialogFragment.STYLE_NO_FRAME, R.style.AppTheme_NoActionbar_Transparent) - Build.VERSION.SDK_INT >= 19 -> setStyle(DialogFragment.STYLE_NO_FRAME, R.style.AppTheme_NoActionbar_Translucent) - else -> setStyle(DialogFragment.STYLE_NO_FRAME, R.style.AppTheme_NoActionbar) + Build.VERSION.SDK_INT >= 23 -> setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_FRAME, R.style.AppTheme_NoActionbar_Transparent) + Build.VERSION.SDK_INT >= 19 -> setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_FRAME, R.style.AppTheme_NoActionbar_Translucent) + else -> setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_FRAME, R.style.AppTheme_NoActionbar) } } } \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/BatteryOptimizationBottomSheet.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/BatteryOptimizationBottomSheet.kt index 67b2100b73..d03578899e 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/BatteryOptimizationBottomSheet.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/BatteryOptimizationBottomSheet.kt @@ -6,13 +6,12 @@ import android.os.Build import android.os.Bundle import android.os.PowerManager import android.provider.Settings -import android.support.design.widget.BottomSheetBehavior -import android.support.v4.app.DialogFragment -import android.support.v4.app.FragmentManager import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView +import androidx.fragment.app.DialogFragment +import com.google.android.material.bottomsheet.BottomSheetBehavior import net.osmand.PlatformUtil import net.osmand.telegram.R import net.osmand.telegram.TelegramApplication @@ -79,7 +78,7 @@ class BatteryOptimizationBottomSheet : DialogFragment() { private const val TAG = "BatteryOptimizationBottomSheet" - fun showInstance(fm: FragmentManager): Boolean { + fun showInstance(fm: androidx.fragment.app.FragmentManager): Boolean { return try { BatteryOptimizationBottomSheet().show(fm, TAG) true diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/ChooseOsmAndBottomSheet.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/ChooseOsmAndBottomSheet.kt index 5130d027e1..26fd0f2377 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/ChooseOsmAndBottomSheet.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/ChooseOsmAndBottomSheet.kt @@ -1,15 +1,13 @@ package net.osmand.telegram.ui import android.os.Bundle -import android.support.design.widget.BottomSheetBehavior -import android.support.v4.app.DialogFragment -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView +import androidx.fragment.app.DialogFragment +import com.google.android.material.bottomsheet.BottomSheetBehavior import net.osmand.telegram.R import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramSettings @@ -77,7 +75,7 @@ class ChooseOsmAndBottomSheet : DialogFragment() { private const val TAG = "ChooseOsmAndBottomSheet" - fun showInstance(fm: FragmentManager, target: Fragment): Boolean { + fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment): Boolean { return try { ChooseOsmAndBottomSheet().apply { setTargetFragment(target, OSMAND_CHOSEN_REQUEST_CODE) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/DisableSharingBottomSheet.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/DisableSharingBottomSheet.kt index b2fd72dfe1..428e78f7e9 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/DisableSharingBottomSheet.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/DisableSharingBottomSheet.kt @@ -3,15 +3,13 @@ package net.osmand.telegram.ui import android.graphics.ColorMatrix import android.graphics.ColorMatrixColorFilter import android.os.Bundle -import android.support.design.widget.BottomSheetBehavior -import android.support.v4.app.DialogFragment -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView +import androidx.fragment.app.DialogFragment +import com.google.android.material.bottomsheet.BottomSheetBehavior import net.osmand.telegram.R import net.osmand.telegram.TelegramApplication import net.osmand.telegram.helpers.TelegramUiHelper @@ -86,7 +84,7 @@ class DisableSharingBottomSheet : DialogFragment() { private const val TAG = "DisableSharingBottomSheet" private const val CHATS_COUNT_KEY = "chats_count" - fun showInstance(fm: FragmentManager, target: Fragment, chatsCount: Int): Boolean { + fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment, chatsCount: Int): Boolean { return try { DisableSharingBottomSheet().apply { arguments = Bundle().apply { putInt(CHATS_COUNT_KEY, chatsCount) } diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/DisconnectTelegramBottomSheet.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/DisconnectTelegramBottomSheet.kt index 63e1bc5851..acd4dd991f 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/DisconnectTelegramBottomSheet.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/DisconnectTelegramBottomSheet.kt @@ -1,13 +1,12 @@ package net.osmand.telegram.ui import android.os.Bundle -import android.support.design.widget.BottomSheetBehavior -import android.support.v4.app.DialogFragment -import android.support.v4.app.FragmentManager import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView +import androidx.fragment.app.DialogFragment +import com.google.android.material.bottomsheet.BottomSheetBehavior import net.osmand.telegram.R import net.osmand.telegram.ui.views.BottomSheetDialog @@ -48,7 +47,7 @@ class DisconnectTelegramBottomSheet : DialogFragment() { private const val TAG = "DisconnectTelegramBottomSheet" - fun showInstance(fm: FragmentManager): Boolean { + fun showInstance(fm: androidx.fragment.app.FragmentManager): Boolean { return try { DisconnectTelegramBottomSheet().show(fm, TAG) true diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt index 930769a207..f3391246b4 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt @@ -3,11 +3,6 @@ package net.osmand.telegram.ui import android.content.Intent import android.graphics.Color import android.os.Bundle -import android.support.v4.app.Fragment -import android.support.v4.widget.SwipeRefreshLayout -import android.support.v7.widget.LinearLayoutManager -import android.support.v7.widget.ListPopupWindow -import android.support.v7.widget.RecyclerView import android.view.Gravity import android.view.LayoutInflater import android.view.View @@ -17,6 +12,10 @@ import android.widget.ArrayAdapter import android.widget.ImageView import android.widget.LinearLayout import android.widget.TextView +import androidx.appcompat.widget.ListPopupWindow +import androidx.fragment.app.Fragment +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView import net.osmand.Location import net.osmand.data.LatLon import net.osmand.telegram.R @@ -72,16 +71,16 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage AndroidUtils.addStatusBarPadding19v(context!!, appBarLayout) adapter = LiveNowListAdapter() - mainView.findViewById(R.id.recycler_view).apply { + mainView.findViewById(R.id.recycler_view).apply { layoutManager = LinearLayoutManager(context) adapter = this@LiveNowTabFragment.adapter - addOnScrollListener(object : RecyclerView.OnScrollListener() { - override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { + addOnScrollListener(object : androidx.recyclerview.widget.RecyclerView.OnScrollListener() { + override fun onScrollStateChanged(recyclerView: androidx.recyclerview.widget.RecyclerView, newState: Int) { super.onScrollStateChanged(recyclerView, newState) - locationUiUpdateAllowed = newState == RecyclerView.SCROLL_STATE_IDLE + locationUiUpdateAllowed = newState == androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE when (newState) { - RecyclerView.SCROLL_STATE_DRAGGING -> animateOpenOsmAndBtn(false) - RecyclerView.SCROLL_STATE_IDLE -> animateOpenOsmAndBtn(true) + androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_DRAGGING -> animateOpenOsmAndBtn(false) + androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE -> animateOpenOsmAndBtn(true) } } }) @@ -98,7 +97,7 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage } } - mainView.findViewById(R.id.swipe_refresh).apply { + mainView.findViewById(R.id.swipe_refresh).apply { setOnRefreshListener { app.shareLocationHelper.checkNetworkType() app.telegramHelper.scanChatsHistory() @@ -398,7 +397,7 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage ) } - inner class LiveNowListAdapter : RecyclerView.Adapter() { + inner class LiveNowListAdapter : androidx.recyclerview.widget.RecyclerView.Adapter() { private val menuList = listOf(getString(R.string.shared_string_off), getString(R.string.shared_string_all)) @@ -603,7 +602,7 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage } } - abstract inner class BaseViewHolder(view: View) : RecyclerView.ViewHolder(view) { + abstract inner class BaseViewHolder(view: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(view) { val icon: ImageView? = view.findViewById(R.id.icon) val title: TextView? = view.findViewById(R.id.title) val locationViewContainer: View? = view.findViewById(R.id.location_view_container) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/LoginDialogFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/LoginDialogFragment.kt index f5de2e8e2e..cbd88d9ce7 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/LoginDialogFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/LoginDialogFragment.kt @@ -8,10 +8,6 @@ import android.graphics.Rect import android.net.Uri import android.os.Build import android.os.Bundle -import android.support.annotation.StringRes -import android.support.v4.app.FragmentManager -import android.support.v4.content.ContextCompat -import android.support.v7.widget.AppCompatImageView import android.text.* import android.text.method.LinkMovementMethod import android.text.style.ClickableSpan @@ -24,6 +20,9 @@ import android.view.ViewGroup import android.view.WindowManager import android.view.inputmethod.EditorInfo import android.widget.* +import androidx.annotation.StringRes +import androidx.appcompat.widget.AppCompatImageView +import androidx.core.content.ContextCompat import net.osmand.PlatformUtil import net.osmand.telegram.R import net.osmand.telegram.utils.AndroidNetworkUtils @@ -57,12 +56,12 @@ class LoginDialogFragment : BaseDialogFragment() { private var countryPhoneCode: String = "+" - fun showWelcomeDialog(fragmentManager: FragmentManager) { + fun showWelcomeDialog(fragmentManager: androidx.fragment.app.FragmentManager) { welcomeDialogShown = true showDialog(fragmentManager, welcomeDialog = true) } - fun showDialog(fragmentManager: FragmentManager, loginDialogType: LoginDialogType? = null, welcomeDialog: Boolean = false, privacyPolicyAgreed: Boolean = false) { + fun showDialog(fragmentManager: androidx.fragment.app.FragmentManager, loginDialogType: LoginDialogType? = null, welcomeDialog: Boolean = false, privacyPolicyAgreed: Boolean = false) { try { /* @@ -95,13 +94,13 @@ class LoginDialogFragment : BaseDialogFragment() { } } - fun dismiss(fragmentManager: FragmentManager) { + fun dismiss(fragmentManager: androidx.fragment.app.FragmentManager) { val loginDialogFragment = getFragment(fragmentManager) loginDialogFragment?.dismissedManually = true loginDialogFragment?.dismissAllowingStateLoss() } - private fun getFragment(fragmentManager: FragmentManager): LoginDialogFragment? { + private fun getFragment(fragmentManager: androidx.fragment.app.FragmentManager): LoginDialogFragment? { return fragmentManager.findFragmentByTag(TAG) as LoginDialogFragment? } } diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/LogoutBottomSheet.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/LogoutBottomSheet.kt index 0f6c2b7864..c1bfb3a4e2 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/LogoutBottomSheet.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/LogoutBottomSheet.kt @@ -1,14 +1,12 @@ package net.osmand.telegram.ui import android.os.Bundle -import android.support.design.widget.BottomSheetBehavior -import android.support.v4.app.DialogFragment -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView +import androidx.fragment.app.DialogFragment +import com.google.android.material.bottomsheet.BottomSheetBehavior import net.osmand.telegram.R import net.osmand.telegram.ui.views.BottomSheetDialog @@ -61,7 +59,7 @@ class LogoutBottomSheet : DialogFragment() { private const val TAG = "DisableSharingBottomSheet" - fun showInstance(fm: FragmentManager, target: Fragment): Boolean { + fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment): Boolean { return try { LogoutBottomSheet().apply { setTargetFragment(target, LOGOUT_REQUEST_CODE) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt index 14c064d92b..38d48d6f13 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt @@ -5,21 +5,16 @@ import android.content.Intent import android.content.pm.PackageManager import android.os.Build import android.os.Bundle -import android.support.design.widget.BottomNavigationView -import android.support.design.widget.CoordinatorLayout -import android.support.design.widget.Snackbar -import android.support.v4.app.DialogFragment -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager -import android.support.v4.app.FragmentPagerAdapter -import android.support.v4.view.PagerAdapter -import android.support.v4.view.ViewPager -import android.support.v7.app.AlertDialog -import android.support.v7.app.AppCompatActivity -import android.support.v7.widget.ListPopupWindow import android.view.Gravity import android.view.View import android.widget.* +import androidx.appcompat.app.AlertDialog +import androidx.appcompat.app.AppCompatActivity +import androidx.appcompat.widget.ListPopupWindow +import androidx.fragment.app.DialogFragment +import androidx.fragment.app.FragmentPagerAdapter +import com.google.android.material.bottomnavigation.BottomNavigationView +import com.google.android.material.snackbar.Snackbar import net.osmand.PlatformUtil import net.osmand.telegram.R import net.osmand.telegram.TelegramApplication @@ -35,7 +30,6 @@ import net.osmand.telegram.utils.OsmandApiUtils import org.drinkless.td.libcore.telegram.TdApi import java.io.File import java.lang.ref.WeakReference -import java.time.MonthDay import java.util.* import kotlin.collections.ArrayList @@ -69,8 +63,8 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene private lateinit var buttonsBar: LinearLayout private lateinit var bottomNav: BottomNavigationView - private lateinit var coordinatorLayout: CoordinatorLayout - private lateinit var viewPager: ViewPager + private lateinit var coordinatorLayout: androidx.coordinatorlayout.widget.CoordinatorLayout + private lateinit var viewPager: androidx.viewpager.widget.ViewPager override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -163,7 +157,7 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene } } - override fun onAttachFragment(fragment: Fragment?) { + override fun onAttachFragment(fragment: androidx.fragment.app.Fragment?) { if (fragment is TelegramListener) { listeners.add(WeakReference(fragment)) } @@ -521,16 +515,16 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene } } - class ViewPagerAdapter(fm: FragmentManager) : FragmentPagerAdapter(fm) { + class ViewPagerAdapter(fm: androidx.fragment.app.FragmentManager) : FragmentPagerAdapter(fm) { - private val fragments = listOf(MyLocationTabFragment(), LiveNowTabFragment(), TimelineTabFragment()) + private val fragments = listOf(MyLocationTabFragment(), LiveNowTabFragment(), TimelineTabFragment()) override fun getItem(position: Int) = fragments[position] override fun getCount() = fragments.size override fun getItemPosition(`object`: Any): Int { - return PagerAdapter.POSITION_NONE + return androidx.viewpager.widget.PagerAdapter.POSITION_NONE } } } diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt index fab7f1db77..fee5d83151 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt @@ -10,11 +10,6 @@ import android.graphics.drawable.GradientDrawable import android.os.Build import android.os.Bundle import android.os.Handler -import android.support.design.widget.AppBarLayout -import android.support.v4.app.Fragment -import android.support.v4.content.ContextCompat -import android.support.v7.widget.LinearLayoutManager -import android.support.v7.widget.RecyclerView import android.text.SpannableString import android.text.SpannableStringBuilder import android.text.style.ForegroundColorSpan @@ -23,6 +18,11 @@ import android.util.TypedValue import android.view.* import android.view.animation.LinearInterpolator import android.widget.* +import androidx.core.content.ContextCompat +import androidx.fragment.app.Fragment +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView +import com.google.android.material.appbar.AppBarLayout import net.osmand.PlatformUtil import net.osmand.telegram.* import net.osmand.telegram.helpers.LocationMessages @@ -206,15 +206,15 @@ class MyLocationTabFragment : Fragment(), TelegramListener { .setImageDrawable(app.uiUtils.getThemedIcon(R.drawable.ic_action_search_dark)) } - mainView.findViewById(R.id.recycler_view).apply { + mainView.findViewById(R.id.recycler_view).apply { layoutManager = LinearLayoutManager(context) adapter = this@MyLocationTabFragment.adapter - addOnScrollListener(object : RecyclerView.OnScrollListener() { - override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { + addOnScrollListener(object : androidx.recyclerview.widget.RecyclerView.OnScrollListener() { + override fun onScrollStateChanged(recyclerView: androidx.recyclerview.widget.RecyclerView, newState: Int) { super.onScrollStateChanged(recyclerView, newState) when (newState) { - RecyclerView.SCROLL_STATE_DRAGGING -> animateStartSharingBtn(false) - RecyclerView.SCROLL_STATE_IDLE -> animateStartSharingBtn(true) + androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_DRAGGING -> animateStartSharingBtn(false) + androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE -> animateStartSharingBtn(true) } } }) @@ -614,7 +614,7 @@ class MyLocationTabFragment : Fragment(), TelegramListener { } inner class MyLocationListAdapter : - RecyclerView.Adapter() { + androidx.recyclerview.widget.RecyclerView.Adapter() { var items = mutableListOf() set(value) { field = value @@ -921,7 +921,7 @@ class MyLocationTabFragment : Fragment(), TelegramListener { override fun getItemCount() = items.size - abstract inner class BaseViewHolder(view: View) : RecyclerView.ViewHolder(view) { + abstract inner class BaseViewHolder(view: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(view) { val icon: ImageView? = view.findViewById(R.id.icon) val title: TextView? = view.findViewById(R.id.title) val description: TextView? = view.findViewById(R.id.description) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/ProxySettingsDialogFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/ProxySettingsDialogFragment.kt index 1587845f9f..496901cd75 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/ProxySettingsDialogFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/ProxySettingsDialogFragment.kt @@ -2,10 +2,6 @@ package net.osmand.telegram.ui import android.os.Build import android.os.Bundle -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager -import android.support.v4.content.ContextCompat -import android.support.v7.widget.Toolbar import android.text.Editable import android.text.TextWatcher import android.view.LayoutInflater @@ -13,11 +9,10 @@ import android.view.View import android.view.ViewGroup import android.view.WindowManager import android.widget.* +import androidx.appcompat.widget.Toolbar +import androidx.core.content.ContextCompat import net.osmand.telegram.R -import net.osmand.telegram.TelegramSettings.ProxyType -import net.osmand.telegram.TelegramSettings.ProxyPref -import net.osmand.telegram.TelegramSettings.ProxyMTProtoPref -import net.osmand.telegram.TelegramSettings.ProxySOCKS5Pref +import net.osmand.telegram.TelegramSettings.* class ProxySettingsDialogFragment : BaseDialogFragment() { @@ -202,7 +197,7 @@ class ProxySettingsDialogFragment : BaseDialogFragment() { private const val TAG = "ProxySettingsDialogFragment" const val PROXY_PREFERENCES_UPDATED_REQUEST_CODE = 6 - fun showInstance(fm: FragmentManager, target: Fragment): Boolean { + fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment): Boolean { return try { ProxySettingsDialogFragment().apply { setTargetFragment(target, PROXY_PREFERENCES_UPDATED_REQUEST_CODE) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/SearchDialogFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/SearchDialogFragment.kt index 1c64c2e2b2..8568065cd1 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/SearchDialogFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/SearchDialogFragment.kt @@ -4,18 +4,16 @@ import android.annotation.SuppressLint import android.content.Intent import android.os.Build import android.os.Bundle -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager -import android.support.v4.content.ContextCompat -import android.support.v7.widget.LinearLayoutManager -import android.support.v7.widget.RecyclerView -import android.support.v7.widget.Toolbar import android.text.Editable import android.text.TextWatcher import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.* +import androidx.appcompat.widget.Toolbar +import androidx.core.content.ContextCompat +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView import net.osmand.Location import net.osmand.PlatformUtil import net.osmand.data.LatLon @@ -105,10 +103,10 @@ class SearchDialogFragment : BaseDialogFragment(), TelegramHelper.TelegramSearch layoutManager = LinearLayoutManager(context) adapter = this@SearchDialogFragment.adapter setEmptyView(emptyView) - addOnScrollListener(object : RecyclerView.OnScrollListener() { - override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { + addOnScrollListener(object : androidx.recyclerview.widget.RecyclerView.OnScrollListener() { + override fun onScrollStateChanged(recyclerView: androidx.recyclerview.widget.RecyclerView, newState: Int) { super.onScrollStateChanged(recyclerView, newState) - val scrolling = newState != RecyclerView.SCROLL_STATE_IDLE + val scrolling = newState != androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE locationUiUpdateAllowed = !scrolling if (scrolling) { hideKeyboard() @@ -352,7 +350,7 @@ class SearchDialogFragment : BaseDialogFragment(), TelegramHelper.TelegramSearch outState.putLongArray(SELECTED_USERS_KEY, selectedUsers.toLongArray()) } - inner class SearchAdapter : RecyclerView.Adapter() { + inner class SearchAdapter : androidx.recyclerview.widget.RecyclerView.Adapter() { var items = mutableListOf() set(value) { @@ -513,7 +511,7 @@ class SearchDialogFragment : BaseDialogFragment(), TelegramHelper.TelegramSearch override fun getItemCount() = items.size - inner class ChatViewHolder(view: View) : RecyclerView.ViewHolder(view) { + inner class ChatViewHolder(view: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(view) { val icon: ImageView? = view.findViewById(R.id.icon) val title: TextView? = view.findViewById(R.id.title) val locationViewContainer: View? = view.findViewById(R.id.location_view_container) @@ -575,7 +573,7 @@ class SearchDialogFragment : BaseDialogFragment(), TelegramHelper.TelegramSearch const val SEARCH_ITEMS_REQUEST_CODE = 3 const val CLEAR_SELECTED_ITEMS_REQUEST_CODE = 4 - fun showInstance(fm: FragmentManager, target: Fragment?, selectedChats: Set, selectedUsers: Set): Boolean { + fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment?, selectedChats: Set, selectedUsers: Set): Boolean { return try { SearchDialogFragment().apply { arguments = Bundle().apply { diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeBottomSheet.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeBottomSheet.kt index 6c603ebd0e..48a5608bb2 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeBottomSheet.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeBottomSheet.kt @@ -4,14 +4,12 @@ import android.app.DatePickerDialog import android.app.TimePickerDialog import android.content.Intent import android.os.Bundle -import android.support.design.widget.BottomSheetBehavior -import android.support.v4.app.DialogFragment -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView +import androidx.fragment.app.DialogFragment +import com.google.android.material.bottomsheet.BottomSheetBehavior import net.osmand.telegram.R import net.osmand.telegram.TelegramApplication import net.osmand.telegram.ui.views.BottomSheetDialog @@ -167,7 +165,7 @@ class SetTimeBottomSheet : DialogFragment() { private const val TAG = "SetTimeBottomSheet" - fun showInstance(fm: FragmentManager, target: Fragment, start: Long, end: Long): Boolean { + fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment, start: Long, end: Long): Boolean { return try { SetTimeBottomSheet().apply { arguments = Bundle().apply { diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt index 78a65ed7c5..95636cf4f4 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt @@ -2,15 +2,13 @@ package net.osmand.telegram.ui import android.app.TimePickerDialog import android.os.Bundle -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager -import android.support.v7.widget.LinearLayoutManager -import android.support.v7.widget.RecyclerView import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView import net.osmand.Location import net.osmand.data.LatLon import net.osmand.telegram.R @@ -65,13 +63,13 @@ class SetTimeDialogFragment : BaseDialogFragment(), TelegramLocationListener, Te updateTimeForAllRow() - view.findViewById(R.id.recycler_view).apply { + view.findViewById(R.id.recycler_view).apply { layoutManager = LinearLayoutManager(context) adapter = this@SetTimeDialogFragment.adapter - addOnScrollListener(object : RecyclerView.OnScrollListener() { - override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { + addOnScrollListener(object : androidx.recyclerview.widget.RecyclerView.OnScrollListener() { + override fun onScrollStateChanged(recyclerView: androidx.recyclerview.widget.RecyclerView, newState: Int) { super.onScrollStateChanged(recyclerView, newState) - locationUiUpdateAllowed = newState == RecyclerView.SCROLL_STATE_IDLE + locationUiUpdateAllowed = newState == androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE } }) } @@ -289,7 +287,7 @@ class SetTimeDialogFragment : BaseDialogFragment(), TelegramLocationListener, Te adapter.items = items } - inner class SetTimeListAdapter : RecyclerView.Adapter() { + inner class SetTimeListAdapter : androidx.recyclerview.widget.RecyclerView.Adapter() { var items: List = emptyList() set(value) { @@ -384,7 +382,7 @@ class SetTimeDialogFragment : BaseDialogFragment(), TelegramLocationListener, Te override fun getItemCount() = items.size - inner class ChatViewHolder(val view: View) : RecyclerView.ViewHolder(view) { + inner class ChatViewHolder(val view: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(view) { val icon: ImageView? = view.findViewById(R.id.icon) val title: TextView? = view.findViewById(R.id.title) val directionIcon: ImageView? = view.findViewById(R.id.direction_icon) @@ -408,7 +406,7 @@ class SetTimeDialogFragment : BaseDialogFragment(), TelegramLocationListener, Te private const val DEFAULT_VISIBLE_TIME_SECONDS = 60 * 60L // 1 hour private const val NO_VALUE = -1L - fun showInstance(fm: FragmentManager, chatIds: Set, usersIds: Set, target: Fragment): Boolean { + fun showInstance(fm: androidx.fragment.app.FragmentManager, chatIds: Set, usersIds: Set, target: androidx.fragment.app.Fragment): Boolean { return try { val chats = mutableListOf() for (id in chatIds) { diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/SettingsDialogFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/SettingsDialogFragment.kt index 0b492bbcae..8bc539ee20 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/SettingsDialogFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/SettingsDialogFragment.kt @@ -4,10 +4,6 @@ import android.content.Intent import android.graphics.drawable.Drawable import android.os.Build import android.os.Bundle -import android.support.v4.app.FragmentManager -import android.support.v4.content.ContextCompat -import android.support.v7.widget.ListPopupWindow -import android.support.v7.widget.Toolbar import android.text.SpannableStringBuilder import android.text.style.ForegroundColorSpan import android.view.Gravity @@ -15,6 +11,9 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.* +import androidx.appcompat.widget.ListPopupWindow +import androidx.appcompat.widget.Toolbar +import androidx.core.content.ContextCompat import net.osmand.telegram.R import net.osmand.telegram.TelegramSettings import net.osmand.telegram.TelegramSettings.ListPreference @@ -402,7 +401,7 @@ class SettingsDialogFragment : BaseDialogFragment() { private const val TAG = "SettingsDialogFragment" - fun showInstance(fm: FragmentManager): Boolean { + fun showInstance(fm: androidx.fragment.app.FragmentManager): Boolean { return try { SettingsDialogFragment().show(fm, TAG) true diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/SharingStatusBottomSheet.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/SharingStatusBottomSheet.kt index 0dfdb2abbb..ef080fe40d 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/SharingStatusBottomSheet.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/SharingStatusBottomSheet.kt @@ -1,16 +1,14 @@ package net.osmand.telegram.ui import android.os.Bundle -import android.support.design.widget.BottomSheetBehavior -import android.support.v4.app.DialogFragment -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager -import android.support.v4.content.ContextCompat import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView +import androidx.core.content.ContextCompat +import androidx.fragment.app.DialogFragment +import com.google.android.material.bottomsheet.BottomSheetBehavior import net.osmand.telegram.R import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramSettings @@ -108,7 +106,7 @@ class SharingStatusBottomSheet : DialogFragment() { companion object { const val SHARING_STATUS_REQUEST_CODE = 5 private const val TAG = "SharingStatusBottomSheet" - fun showInstance(fm: FragmentManager, target: Fragment): Boolean { + fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment): Boolean { return try { SharingStatusBottomSheet().apply { setTargetFragment(target, SHARING_STATUS_REQUEST_CODE) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/SortByBottomSheet.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/SortByBottomSheet.kt index 228ade466e..9951295d3a 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/SortByBottomSheet.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/SortByBottomSheet.kt @@ -1,16 +1,14 @@ package net.osmand.telegram.ui import android.os.Bundle -import android.support.design.widget.BottomSheetBehavior -import android.support.v4.app.DialogFragment -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager -import android.support.v4.content.ContextCompat import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView +import androidx.core.content.ContextCompat +import androidx.fragment.app.DialogFragment +import com.google.android.material.bottomsheet.BottomSheetBehavior import net.osmand.telegram.R import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramSettings @@ -87,8 +85,8 @@ class SortByBottomSheet : DialogFragment() { private const val TAG = "SortByBottomSheet" fun showInstance( - fm: FragmentManager, - target: Fragment + fm: androidx.fragment.app.FragmentManager, + target: androidx.fragment.app.Fragment ): Boolean { return try { SortByBottomSheet().apply { diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/TimelineTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/TimelineTabFragment.kt index 0e943c69f9..71fb5ba47b 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/TimelineTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/TimelineTabFragment.kt @@ -7,11 +7,6 @@ import android.graphics.drawable.Drawable import android.os.Build import android.os.Bundle import android.os.Handler -import android.support.annotation.DrawableRes -import android.support.v4.app.Fragment -import android.support.v4.widget.SwipeRefreshLayout -import android.support.v7.widget.LinearLayoutManager -import android.support.v7.widget.RecyclerView import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -19,6 +14,9 @@ import android.widget.ImageView import android.widget.LinearLayout import android.widget.Switch import android.widget.TextView +import androidx.annotation.DrawableRes +import androidx.fragment.app.Fragment +import androidx.recyclerview.widget.LinearLayoutManager import net.osmand.telegram.R import net.osmand.telegram.TelegramApplication import net.osmand.telegram.helpers.LocationMessages @@ -110,7 +108,7 @@ class TimelineTabFragment : Fragment() { } } - mainView.findViewById(R.id.swipe_refresh).apply { + mainView.findViewById(R.id.swipe_refresh).apply { setOnRefreshListener { updateList() isRefreshing = false @@ -224,7 +222,7 @@ class TimelineTabFragment : Fragment() { return list } - inner class LiveNowListAdapter : RecyclerView.Adapter() { + inner class LiveNowListAdapter : androidx.recyclerview.widget.RecyclerView.Adapter() { var items: List = emptyList() set(value) { @@ -298,7 +296,7 @@ class TimelineTabFragment : Fragment() { override fun getItemCount() = items.size - inner class BaseViewHolder(view: View) : RecyclerView.ViewHolder(view) { + inner class BaseViewHolder(view: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(view) { val icon: ImageView? = view.findViewById(R.id.icon) val title: TextView? = view.findViewById(R.id.title) val description: TextView? = view.findViewById(R.id.description) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/UserGpxInfoFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/UserGpxInfoFragment.kt index 2e8d6d381c..6351ad4902 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/UserGpxInfoFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/UserGpxInfoFragment.kt @@ -7,9 +7,6 @@ import android.graphics.drawable.BitmapDrawable import android.graphics.drawable.Drawable import android.graphics.drawable.LayerDrawable import android.os.* -import android.support.design.widget.Snackbar -import android.support.v4.app.FragmentManager -import android.support.v4.content.ContextCompat import android.text.SpannableString import android.text.Spanned import android.text.style.ForegroundColorSpan @@ -22,6 +19,8 @@ import android.widget.ImageView import android.widget.LinearLayout import android.widget.TextView import android.widget.Toast +import androidx.core.content.ContextCompat +import com.google.android.material.snackbar.Snackbar import net.osmand.GPXUtilities import net.osmand.PlatformUtil import net.osmand.aidl.gpx.AGpxBitmap @@ -490,7 +489,7 @@ class UserGpxInfoFragment : BaseDialogFragment() { private const val UPDATE_TRACK_INTERVAL_MS = 30 * 1000L // 30 sec private const val TRACK_UPDATE_MSG_ID = 1001 - fun showInstance(fm: FragmentManager, userId: Int, chatId: Long, deviceName: String, start: Long, end: Long): Boolean { + fun showInstance(fm: androidx.fragment.app.FragmentManager, userId: Int, chatId: Long, deviceName: String, start: Long, end: Long): Boolean { return try { val fragment = UserGpxInfoFragment().apply { arguments = Bundle().apply { diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/views/EmptyStateRecyclerView.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/views/EmptyStateRecyclerView.kt index 4903284533..6ef871c6a9 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/views/EmptyStateRecyclerView.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/views/EmptyStateRecyclerView.kt @@ -1,15 +1,14 @@ package net.osmand.telegram.ui.views import android.content.Context -import android.support.v7.widget.RecyclerView import android.util.AttributeSet import android.view.View -class EmptyStateRecyclerView : RecyclerView { +class EmptyStateRecyclerView : androidx.recyclerview.widget.RecyclerView { private var emptyView: View? = null - private val emptyStateObserver = object : RecyclerView.AdapterDataObserver() { + private val emptyStateObserver = object : androidx.recyclerview.widget.RecyclerView.AdapterDataObserver() { override fun onChanged() { checkIfEmpty() } @@ -33,7 +32,7 @@ class EmptyStateRecyclerView : RecyclerView { defStyle ) - override fun setAdapter(adapter: RecyclerView.Adapter<*>?) { + override fun setAdapter(adapter: androidx.recyclerview.widget.RecyclerView.Adapter<*>?) { val oldAdapter = getAdapter() oldAdapter?.unregisterAdapterDataObserver(emptyStateObserver) super.setAdapter(adapter) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/views/LockableViewPager.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/views/LockableViewPager.kt index d3404dd36f..1cbe874d15 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/views/LockableViewPager.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/views/LockableViewPager.kt @@ -1,11 +1,10 @@ package net.osmand.telegram.ui.views import android.content.Context -import android.support.v4.view.ViewPager import android.util.AttributeSet import android.view.MotionEvent -class LockableViewPager : ViewPager { +class LockableViewPager : androidx.viewpager.widget.ViewPager { var swipeLocked: Boolean = false constructor(context: Context) : super(context) {} diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/views/TextViewEx.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/views/TextViewEx.kt index 6d4998208b..52a87e81ee 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/views/TextViewEx.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/views/TextViewEx.kt @@ -2,8 +2,8 @@ package net.osmand.telegram.ui.views import android.content.Context import android.content.res.TypedArray -import android.support.v7.widget.AppCompatTextView import android.util.AttributeSet +import androidx.appcompat.widget.AppCompatTextView import net.osmand.telegram.R import net.osmand.telegram.helpers.FontCache diff --git a/OsmAnd-telegram/src/net/osmand/telegram/utils/AndroidUtils.kt b/OsmAnd-telegram/src/net/osmand/telegram/utils/AndroidUtils.kt index a30a58dbe7..25c6de8c09 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/utils/AndroidUtils.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/utils/AndroidUtils.kt @@ -14,21 +14,19 @@ import android.graphics.drawable.Drawable import android.graphics.drawable.StateListDrawable import android.net.Uri import android.os.Build -import android.support.annotation.AttrRes -import android.support.annotation.ColorInt -import android.support.annotation.ColorRes -import android.support.design.widget.Snackbar -import android.support.v4.app.ActivityCompat -import android.support.v4.app.DialogFragment -import android.support.v4.app.FragmentManager -import android.support.v4.content.ContextCompat -import android.support.v4.content.FileProvider import android.util.TypedValue import android.util.TypedValue.COMPLEX_UNIT_DIP import android.view.View import android.view.WindowManager import android.view.inputmethod.InputMethodManager import android.widget.TextView +import androidx.annotation.AttrRes +import androidx.annotation.ColorInt +import androidx.annotation.ColorRes +import androidx.core.app.ActivityCompat +import androidx.core.content.ContextCompat +import androidx.core.content.FileProvider +import com.google.android.material.snackbar.Snackbar import net.osmand.telegram.R import java.io.File @@ -62,9 +60,9 @@ object AndroidUtils { } } - fun dismissAllDialogs(fm: FragmentManager) { + fun dismissAllDialogs(fm: androidx.fragment.app.FragmentManager) { for (fragment in fm.fragments) { - if (fragment is DialogFragment) { + if (fragment is androidx.fragment.app.DialogFragment) { fragment.dismissAllowingStateLoss() } dismissAllDialogs(fragment.childFragmentManager) @@ -169,7 +167,7 @@ object AndroidUtils { fun setSnackbarTextColor(snackbar: Snackbar, @ColorRes colorId: Int) { val view = snackbar.view - val tv = view.findViewById(android.support.design.R.id.snackbar_action) as TextView + val tv = view.findViewById(com.google.android.material.R.id.snackbar_action) as TextView tv.setTextColor(ContextCompat.getColor(view.context, colorId)) } diff --git a/OsmAnd-telegram/src/net/osmand/telegram/utils/UiUtils.kt b/OsmAnd-telegram/src/net/osmand/telegram/utils/UiUtils.kt index 111d8ca2fb..a4f0c8db2f 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/utils/UiUtils.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/utils/UiUtils.kt @@ -7,15 +7,15 @@ import android.graphics.drawable.LayerDrawable import android.hardware.Sensor import android.hardware.SensorManager import android.os.AsyncTask -import android.support.annotation.ColorInt -import android.support.annotation.ColorRes -import android.support.annotation.DrawableRes -import android.support.v4.content.ContextCompat -import android.support.v4.graphics.drawable.DrawableCompat import android.view.Surface import android.view.WindowManager import android.widget.ImageView import android.widget.TextView +import androidx.annotation.ColorInt +import androidx.annotation.ColorRes +import androidx.annotation.DrawableRes +import androidx.core.content.ContextCompat +import androidx.core.graphics.drawable.DrawableCompat import net.osmand.Location import net.osmand.PlatformUtil import net.osmand.data.LatLon diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml index 78f39d682e..bb1715f495 100644 --- a/OsmAnd/AndroidManifest.xml +++ b/OsmAnd/AndroidManifest.xml @@ -67,7 +67,7 @@ diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index ad11a4448f..7e29f7397b 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -455,13 +455,13 @@ task appStart(type: Exec) { dependencies { implementation project(path: ':OsmAnd-java', configuration: 'android') implementation project(':OsmAnd-api') - implementation 'com.android.support:multidex:1.0.1' - implementation 'com.android.support:gridlayout-v7:28.0.0' - implementation 'com.android.support:cardview-v7:28.0.0' - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support:design:28.0.0' - implementation 'com.android.support:customtabs:28.0.0' - implementation 'com.android.support:preference-v7:28.0.0' + implementation 'androidx.multidex:multidex:2.0.0' + implementation 'androidx.gridlayout:gridlayout:1.0.0' + implementation 'androidx.cardview:cardview:1.0.0' + implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'com.google.android.material:material:1.0.0' + implementation 'androidx.browser:browser:1.0.0' + implementation 'androidx.preference:preference:1.0.0' implementation fileTree(include: ['gnu-trove-osmand.jar', 'icu4j-49_1_patched.jar'], dir: 'libs') implementation group: 'commons-logging', name: 'commons-logging', version: '1.2' diff --git a/OsmAnd/res/layout-land/add_gpx_point_bottom_sheet.xml b/OsmAnd/res/layout-land/add_gpx_point_bottom_sheet.xml index 0b7372049b..e45238b1a9 100644 --- a/OsmAnd/res/layout-land/add_gpx_point_bottom_sheet.xml +++ b/OsmAnd/res/layout-land/add_gpx_point_bottom_sheet.xml @@ -51,7 +51,7 @@ - - - - - - - + - + - - - + - + - - - - - - - + - diff --git a/OsmAnd/res/layout-land/map_hud_top.xml b/OsmAnd/res/layout-land/map_hud_top.xml index 25dcf8284c..15a838d411 100644 --- a/OsmAnd/res/layout-land/map_hud_top.xml +++ b/OsmAnd/res/layout-land/map_hud_top.xml @@ -634,7 +634,7 @@ android:visibility="gone" osmand:typeface="@string/font_roboto_medium"/> - - - - - + - diff --git a/OsmAnd/res/layout-land/quick_action_widget_page.xml b/OsmAnd/res/layout-land/quick_action_widget_page.xml index 167de7cdd6..dab54fdf97 100644 --- a/OsmAnd/res/layout-land/quick_action_widget_page.xml +++ b/OsmAnd/res/layout-land/quick_action_widget_page.xml @@ -1,6 +1,6 @@ - - - - - diff --git a/OsmAnd/res/layout/along_the_route_category_item.xml b/OsmAnd/res/layout/along_the_route_category_item.xml index b1b99f7837..f98bc9369e 100644 --- a/OsmAnd/res/layout/along_the_route_category_item.xml +++ b/OsmAnd/res/layout/along_the_route_category_item.xml @@ -42,7 +42,7 @@ android:layout_marginEnd="@dimen/bottom_sheet_divider_margin_start" android:layout_marginStart="@dimen/bottom_sheet_divider_margin_start" /> - - - - @@ -15,4 +15,4 @@ android:layout_height="wrap_content" android:layout_gravity="center_horizontal|bottom"/> - + diff --git a/OsmAnd/res/layout/bottom_sheet_item_btn_with_icon_and_text.xml b/OsmAnd/res/layout/bottom_sheet_item_btn_with_icon_and_text.xml index f82328a8c5..64e41e6502 100644 --- a/OsmAnd/res/layout/bottom_sheet_item_btn_with_icon_and_text.xml +++ b/OsmAnd/res/layout/bottom_sheet_item_btn_with_icon_and_text.xml @@ -8,7 +8,7 @@ android:gravity="center_vertical" android:orientation="horizontal"> - - - - diff --git a/OsmAnd/res/layout/bottom_sheet_item_toolbar_title.xml b/OsmAnd/res/layout/bottom_sheet_item_toolbar_title.xml index 98fdf1267a..dfc6c95148 100644 --- a/OsmAnd/res/layout/bottom_sheet_item_toolbar_title.xml +++ b/OsmAnd/res/layout/bottom_sheet_item_toolbar_title.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd/res/layout/bottom_sheet_item_with_descr_and_checkbox_56dp.xml b/OsmAnd/res/layout/bottom_sheet_item_with_descr_and_checkbox_56dp.xml index c901d698a9..ca466192a4 100644 --- a/OsmAnd/res/layout/bottom_sheet_item_with_descr_and_checkbox_56dp.xml +++ b/OsmAnd/res/layout/bottom_sheet_item_with_descr_and_checkbox_56dp.xml @@ -47,7 +47,7 @@ tools:text="Some description"/> - - - - - - - - - + - - + - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd/res/layout/data_storage_list_item.xml b/OsmAnd/res/layout/data_storage_list_item.xml index b772180b86..a6f02ba53d 100644 --- a/OsmAnd/res/layout/data_storage_list_item.xml +++ b/OsmAnd/res/layout/data_storage_list_item.xml @@ -19,7 +19,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - + - - - + - - - + - - - - + - - - - - + - - - - - + - + - - - + - + - - - + - - - - - - - - - + - - + - - + - - + diff --git a/OsmAnd/res/layout/fragment_edit_poi_normal.xml b/OsmAnd/res/layout/fragment_edit_poi_normal.xml index 3a1a686017..a0df9c280d 100644 --- a/OsmAnd/res/layout/fragment_edit_poi_normal.xml +++ b/OsmAnd/res/layout/fragment_edit_poi_normal.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd/res/layout/fragment_explore_tab.xml b/OsmAnd/res/layout/fragment_explore_tab.xml index 0d82ee83b9..b85efc7813 100644 --- a/OsmAnd/res/layout/fragment_explore_tab.xml +++ b/OsmAnd/res/layout/fragment_explore_tab.xml @@ -6,7 +6,7 @@ android:gravity="center" android:orientation="vertical"> - - - - - - - + - + - + - + diff --git a/OsmAnd/res/layout/fragment_import_duplicates.xml b/OsmAnd/res/layout/fragment_import_duplicates.xml index 9f8dad5f48..dc1fdf7d8f 100644 --- a/OsmAnd/res/layout/fragment_import_duplicates.xml +++ b/OsmAnd/res/layout/fragment_import_duplicates.xml @@ -1,12 +1,11 @@ - - - - + - - - - + - + - + - + diff --git a/OsmAnd/res/layout/fragment_live_updates.xml b/OsmAnd/res/layout/fragment_live_updates.xml index 51ebe5291b..3992373c27 100644 --- a/OsmAnd/res/layout/fragment_live_updates.xml +++ b/OsmAnd/res/layout/fragment_live_updates.xml @@ -4,7 +4,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - @@ -21,7 +21,7 @@ android:orientation="vertical" tools:context=".liveupdates.LiveUpdatesFragment" /> - + - - - + - + - @@ -73,7 +73,7 @@ android:id="@+id/map_markers_view_pager" android:layout_width="match_parent" android:layout_height="match_parent"/> - + @@ -85,7 +85,7 @@ - - - - - - - - - - - - - - - - + - - + - - - - diff --git a/OsmAnd/res/layout/fragment_on_save_current_track.xml b/OsmAnd/res/layout/fragment_on_save_current_track.xml index 499ee4779c..bc333b7c7a 100644 --- a/OsmAnd/res/layout/fragment_on_save_current_track.xml +++ b/OsmAnd/res/layout/fragment_on_save_current_track.xml @@ -51,7 +51,7 @@ android:textColor="?android:textColorPrimary" android:textSize="@dimen/default_list_text_size" /> - - diff --git a/OsmAnd/res/layout/fragment_plan_route_half_screen.xml b/OsmAnd/res/layout/fragment_plan_route_half_screen.xml index 4dd4171e8e..05f779b756 100644 --- a/OsmAnd/res/layout/fragment_plan_route_half_screen.xml +++ b/OsmAnd/res/layout/fragment_plan_route_half_screen.xml @@ -34,7 +34,7 @@ android:layout_height="@dimen/measurement_tool_points_list_container_height" tools:background="@color/activity_background_color_dark"> - diff --git a/OsmAnd/res/layout/fragment_reports.xml b/OsmAnd/res/layout/fragment_reports.xml index c7adbef0e0..03371c2c17 100644 --- a/OsmAnd/res/layout/fragment_reports.xml +++ b/OsmAnd/res/layout/fragment_reports.xml @@ -390,7 +390,7 @@ - - + \ No newline at end of file diff --git a/OsmAnd/res/layout/fragment_saved_articles_tab.xml b/OsmAnd/res/layout/fragment_saved_articles_tab.xml index b73a2581dd..a0a89c117d 100644 --- a/OsmAnd/res/layout/fragment_saved_articles_tab.xml +++ b/OsmAnd/res/layout/fragment_saved_articles_tab.xml @@ -6,7 +6,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml index 6efafc9f19..5585371ba6 100644 --- a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml +++ b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml @@ -9,7 +9,7 @@ android:background="?attr/wikivoyage_bg_color" android:orientation="vertical"> - - + - - - + - + - - - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd/res/layout/global_preferences_toolbar_with_switch.xml b/OsmAnd/res/layout/global_preferences_toolbar_with_switch.xml index b41c7e83c7..2f9ff6d274 100644 --- a/OsmAnd/res/layout/global_preferences_toolbar_with_switch.xml +++ b/OsmAnd/res/layout/global_preferences_toolbar_with_switch.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd/res/layout/gpx_item_altitude.xml b/OsmAnd/res/layout/gpx_item_altitude.xml index 07ad4c767e..ac2c321993 100644 --- a/OsmAnd/res/layout/gpx_item_altitude.xml +++ b/OsmAnd/res/layout/gpx_item_altitude.xml @@ -41,7 +41,7 @@ android:paddingStart="@dimen/content_padding" android:paddingEnd="@dimen/content_padding" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd/res/layout/main_menu_drawer_btn_switch_profile.xml b/OsmAnd/res/layout/main_menu_drawer_btn_switch_profile.xml index c2eba2ae01..a704846e1b 100644 --- a/OsmAnd/res/layout/main_menu_drawer_btn_switch_profile.xml +++ b/OsmAnd/res/layout/main_menu_drawer_btn_switch_profile.xml @@ -70,7 +70,7 @@ - - - - - + - + - - - - - - - - - - - - + - - diff --git a/OsmAnd/res/layout/maps_in_category_fragment.xml b/OsmAnd/res/layout/maps_in_category_fragment.xml index e3eca44713..5032381b0c 100644 --- a/OsmAnd/res/layout/maps_in_category_fragment.xml +++ b/OsmAnd/res/layout/maps_in_category_fragment.xml @@ -5,11 +5,11 @@ android:layout_height="match_parent" android:orientation="vertical"> - - - + - - - + \ No newline at end of file diff --git a/OsmAnd/res/layout/measure_points_list_item.xml b/OsmAnd/res/layout/measure_points_list_item.xml index 76553abc28..112275a5b7 100644 --- a/OsmAnd/res/layout/measure_points_list_item.xml +++ b/OsmAnd/res/layout/measure_points_list_item.xml @@ -11,7 +11,7 @@ android:layout_height="match_parent" android:background="?attr/selectableItemBackground"> - - - - - - - - - - - - + - - - - - + - - - - - + - @@ -37,7 +37,7 @@ android:layout_height="wrap_content" android:hint="@string/hint_value"/> - + - - + - - - - - - - - - + - + - - - - - - - - diff --git a/OsmAnd/res/layout/prev_route_card.xml b/OsmAnd/res/layout/prev_route_card.xml index 3866561738..5d8b272a15 100644 --- a/OsmAnd/res/layout/prev_route_card.xml +++ b/OsmAnd/res/layout/prev_route_card.xml @@ -60,7 +60,7 @@ android:gravity="center_vertical" android:orientation="horizontal"> - - - - + - + - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd/res/layout/profile_preference_toolbar_big.xml b/OsmAnd/res/layout/profile_preference_toolbar_big.xml index 86af1d04cd..3fd74b4ab4 100644 --- a/OsmAnd/res/layout/profile_preference_toolbar_big.xml +++ b/OsmAnd/res/layout/profile_preference_toolbar_big.xml @@ -1,4 +1,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd/res/layout/profile_preference_toolbar_with_switch.xml b/OsmAnd/res/layout/profile_preference_toolbar_with_switch.xml index d0e2d824a4..f825535ef3 100644 --- a/OsmAnd/res/layout/profile_preference_toolbar_with_switch.xml +++ b/OsmAnd/res/layout/profile_preference_toolbar_with_switch.xml @@ -1,4 +1,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd/res/layout/purchase_dialog_card_button_active_ex.xml b/OsmAnd/res/layout/purchase_dialog_card_button_active_ex.xml index c186531c92..c2966dec32 100644 --- a/OsmAnd/res/layout/purchase_dialog_card_button_active_ex.xml +++ b/OsmAnd/res/layout/purchase_dialog_card_button_active_ex.xml @@ -67,7 +67,7 @@ - - - - - - - + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> - - - - - - - - - - + - + diff --git a/OsmAnd/res/layout/quick_action_create_edit_dialog.xml b/OsmAnd/res/layout/quick_action_create_edit_dialog.xml index d11894979a..f1232c7d75 100644 --- a/OsmAnd/res/layout/quick_action_create_edit_dialog.xml +++ b/OsmAnd/res/layout/quick_action_create_edit_dialog.xml @@ -1,10 +1,9 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> @@ -24,7 +23,7 @@ - - - - - - + - - - - - - - - - - diff --git a/OsmAnd/res/layout/quick_action_widget_page.xml b/OsmAnd/res/layout/quick_action_widget_page.xml index 83060900da..665d17056e 100644 --- a/OsmAnd/res/layout/quick_action_widget_page.xml +++ b/OsmAnd/res/layout/quick_action_widget_page.xml @@ -1,6 +1,6 @@ - - - - - - - - + - + - - + - - + - - + - - + - - + - - + - - + - - - + - + - - - - + - - + - - + - - - + - + - - - - + - + - - - - diff --git a/OsmAnd/res/layout/single_choice_description_item.xml b/OsmAnd/res/layout/single_choice_description_item.xml index eda4a06622..1261a70df3 100644 --- a/OsmAnd/res/layout/single_choice_description_item.xml +++ b/OsmAnd/res/layout/single_choice_description_item.xml @@ -14,7 +14,7 @@ android:layout_width="wrap_content" android:visibility="gone"/> - - - diff --git a/OsmAnd/res/layout/split_segments_layout.xml b/OsmAnd/res/layout/split_segments_layout.xml index f9b898652f..f1d6af44ab 100644 --- a/OsmAnd/res/layout/split_segments_layout.xml +++ b/OsmAnd/res/layout/split_segments_layout.xml @@ -7,11 +7,11 @@ android:layout_height="match_parent" android:orientation="vertical"> - - - + - + - diff --git a/OsmAnd/res/layout/subscribe_email_header.xml b/OsmAnd/res/layout/subscribe_email_header.xml index 00028f65a5..f638dd1cd5 100644 --- a/OsmAnd/res/layout/subscribe_email_header.xml +++ b/OsmAnd/res/layout/subscribe_email_header.xml @@ -31,7 +31,7 @@ android:layout_marginStart="@dimen/list_content_padding" android:layout_marginEnd="@dimen/list_content_padding"> - - - - @@ -17,14 +17,14 @@ android:layout_height="@dimen/list_item_height" android:background="?attr/colorPrimary"/> - + - diff --git a/OsmAnd/res/layout/track_content.xml b/OsmAnd/res/layout/track_content.xml index 131d9bbd11..34256ac4d6 100644 --- a/OsmAnd/res/layout/track_content.xml +++ b/OsmAnd/res/layout/track_content.xml @@ -7,7 +7,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - @@ -31,7 +31,7 @@ - - - - - + - - - + - + - @@ -136,11 +136,11 @@ android:layout_width="match_parent" android:layout_height="match_parent"/> - + - * To use the component, simply add it to your view hierarchy. Then in your - * {@link android.app.Activity} or {@link android.support.v4.app.Fragment} call + * {@link android.app.Activity} or {@link Fragment} call * {@link #setViewPager(ViewPager)} providing it the ViewPager this layout is being used for. *

* The colors can be customized in two ways. The first and simplest is to provide an array of colors diff --git a/OsmAnd/src/com/github/ksoichiro/android/observablescrollview/CacheFragmentStatePagerAdapter.java b/OsmAnd/src/com/github/ksoichiro/android/observablescrollview/CacheFragmentStatePagerAdapter.java index f0057410cb..cade4e117e 100644 --- a/OsmAnd/src/com/github/ksoichiro/android/observablescrollview/CacheFragmentStatePagerAdapter.java +++ b/OsmAnd/src/com/github/ksoichiro/android/observablescrollview/CacheFragmentStatePagerAdapter.java @@ -18,12 +18,13 @@ package com.github.ksoichiro.android.observablescrollview; import android.os.Bundle; import android.os.Parcelable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentStatePagerAdapter; import android.util.SparseArray; import android.view.ViewGroup; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentStatePagerAdapter; + /** * FragmentStatePagerAdapter that caches each pages. * FragmentStatePagerAdapter is also originally caches pages, diff --git a/OsmAnd/src/net/osmand/AndroidNetworkUtils.java b/OsmAnd/src/net/osmand/AndroidNetworkUtils.java index 5d4d251686..dc639ed48c 100644 --- a/OsmAnd/src/net/osmand/AndroidNetworkUtils.java +++ b/OsmAnd/src/net/osmand/AndroidNetworkUtils.java @@ -3,8 +3,9 @@ package net.osmand; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.osm.io.NetworkUtils; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/AndroidUtils.java b/OsmAnd/src/net/osmand/AndroidUtils.java index 8633f61abf..3825bdb912 100644 --- a/OsmAnd/src/net/osmand/AndroidUtils.java +++ b/OsmAnd/src/net/osmand/AndroidUtils.java @@ -24,14 +24,6 @@ import android.os.Build; import android.os.IBinder; import android.os.PowerManager; import android.os.StatFs; -import android.support.annotation.AttrRes; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v4.content.FileProvider; -import android.support.v4.text.TextUtilsCompat; -import android.support.v4.view.ViewCompat; import android.text.Spannable; import android.text.SpannableString; import android.text.SpannableStringBuilder; @@ -54,6 +46,15 @@ import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.TextView; +import androidx.annotation.AttrRes; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.core.content.FileProvider; +import androidx.core.text.TextUtilsCompat; +import androidx.core.view.ViewCompat; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.util.Algorithms; diff --git a/OsmAnd/src/net/osmand/PicassoUtils.java b/OsmAnd/src/net/osmand/PicassoUtils.java index 1389c2dcfe..dfd77ef59d 100644 --- a/OsmAnd/src/net/osmand/PicassoUtils.java +++ b/OsmAnd/src/net/osmand/PicassoUtils.java @@ -2,20 +2,23 @@ package net.osmand; import android.content.Context; import android.os.StatFs; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import com.squareup.picasso.LruCache; import com.squareup.picasso.OkHttp3Downloader; import com.squareup.picasso.Picasso; +import net.osmand.plus.OsmandApplication; + import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; -import net.osmand.plus.OsmandApplication; import okhttp3.Cache; import okhttp3.OkHttpClient; + import static android.os.Build.VERSION.SDK_INT; import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR2; diff --git a/OsmAnd/src/net/osmand/SecondSplashScreenFragment.java b/OsmAnd/src/net/osmand/SecondSplashScreenFragment.java index dc56191fd0..527c1f6f60 100644 --- a/OsmAnd/src/net/osmand/SecondSplashScreenFragment.java +++ b/OsmAnd/src/net/osmand/SecondSplashScreenFragment.java @@ -4,14 +4,15 @@ import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentActivity; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/access/AccessibilityAssistant.java b/OsmAnd/src/net/osmand/access/AccessibilityAssistant.java index a7d6c9701e..377403b07f 100644 --- a/OsmAnd/src/net/osmand/access/AccessibilityAssistant.java +++ b/OsmAnd/src/net/osmand/access/AccessibilityAssistant.java @@ -2,9 +2,6 @@ package net.osmand.access; import android.app.Activity; import android.os.Build; -import android.support.v4.view.AccessibilityDelegateCompat; -import android.support.v4.view.ViewCompat; -import android.support.v4.view.ViewPager.OnPageChangeListener; import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; @@ -13,6 +10,10 @@ import android.widget.Button; import android.widget.ImageButton; import android.widget.ImageView; +import androidx.core.view.AccessibilityDelegateCompat; +import androidx.core.view.ViewCompat; +import androidx.viewpager.widget.ViewPager.OnPageChangeListener; + import net.osmand.plus.OsmandApplication; public class AccessibilityAssistant extends AccessibilityDelegateCompat implements OnPageChangeListener { diff --git a/OsmAnd/src/net/osmand/access/AccessibilityPlugin.java b/OsmAnd/src/net/osmand/access/AccessibilityPlugin.java index 6f3472d425..3336895bad 100644 --- a/OsmAnd/src/net/osmand/access/AccessibilityPlugin.java +++ b/OsmAnd/src/net/osmand/access/AccessibilityPlugin.java @@ -3,7 +3,8 @@ package net.osmand.access; import android.app.Activity; import android.media.AudioManager; import android.media.SoundPool; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; diff --git a/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java b/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java index 7156fa6d75..198c3c4b51 100644 --- a/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java +++ b/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java @@ -7,16 +7,17 @@ import android.graphics.drawable.LayerDrawable; import android.os.Build; import android.os.Bundle; import android.provider.Settings; -import android.support.v4.app.FragmentManager; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; -import android.support.v7.preference.PreferenceViewHolder; import android.view.View; import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener; import android.widget.ImageView; import android.widget.LinearLayout; +import androidx.fragment.app.FragmentManager; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; +import androidx.preference.PreferenceViewHolder; + import net.osmand.AndroidUtils; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandPlugin; diff --git a/OsmAnd/src/net/osmand/access/NavigationInfo.java b/OsmAnd/src/net/osmand/access/NavigationInfo.java index 84b7aa1157..c21dcbfb3c 100644 --- a/OsmAnd/src/net/osmand/access/NavigationInfo.java +++ b/OsmAnd/src/net/osmand/access/NavigationInfo.java @@ -5,7 +5,8 @@ import android.content.Context; import android.content.DialogInterface; import android.os.SystemClock; import android.os.Vibrator; -import android.support.v7.app.AlertDialog; + +import androidx.appcompat.app.AlertDialog; import net.osmand.Location; import net.osmand.data.LatLon; diff --git a/OsmAnd/src/net/osmand/aidl/ConnectedApp.java b/OsmAnd/src/net/osmand/aidl/ConnectedApp.java index 74166b9ec9..ce25221fc8 100644 --- a/OsmAnd/src/net/osmand/aidl/ConnectedApp.java +++ b/OsmAnd/src/net/osmand/aidl/ConnectedApp.java @@ -4,12 +4,13 @@ import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.View; import android.widget.ArrayAdapter; import android.widget.CompoundButton; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.AndroidUtils; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java index 6eda756137..9e7f2feb10 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java @@ -15,9 +15,10 @@ import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.os.ParcelFileDescriptor; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.AlertDialog; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlService.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlService.java index 977f20d96e..6fc69f9328 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlService.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlService.java @@ -8,7 +8,8 @@ import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; import android.os.RemoteException; -import android.support.annotation.Nullable; + +import androidx.annotation.Nullable; import net.osmand.PlatformUtil; import net.osmand.aidl.OsmandAidlApi.GpxBitmapCreatedCallback; diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlServiceV2.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlServiceV2.java index 37b773891c..21b80c229d 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlServiceV2.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlServiceV2.java @@ -8,7 +8,8 @@ import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; import android.os.RemoteException; -import android.support.annotation.Nullable; + +import androidx.annotation.Nullable; import net.osmand.PlatformUtil; import net.osmand.aidl.OsmandAidlApi.GpxBitmapCreatedCallback; diff --git a/OsmAnd/src/net/osmand/aidl/copyfile/CopyFileParams.java b/OsmAnd/src/net/osmand/aidl/copyfile/CopyFileParams.java index e795d5b7b7..78d0da37a8 100644 --- a/OsmAnd/src/net/osmand/aidl/copyfile/CopyFileParams.java +++ b/OsmAnd/src/net/osmand/aidl/copyfile/CopyFileParams.java @@ -2,7 +2,8 @@ package net.osmand.aidl.copyfile; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; public class CopyFileParams implements Parcelable { private String fileName; diff --git a/OsmAnd/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.java b/OsmAnd/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.java index ba4285af1d..58ab2cb68b 100644 --- a/OsmAnd/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.java +++ b/OsmAnd/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.java @@ -3,7 +3,8 @@ package net.osmand.aidl.customization; import android.annotation.SuppressLint; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; public class OsmandSettingsInfoParams implements Parcelable { diff --git a/OsmAnd/src/net/osmand/aidl/customization/OsmandSettingsParams.java b/OsmAnd/src/net/osmand/aidl/customization/OsmandSettingsParams.java index bff8c68018..e55f5bd3b3 100644 --- a/OsmAnd/src/net/osmand/aidl/customization/OsmandSettingsParams.java +++ b/OsmAnd/src/net/osmand/aidl/customization/OsmandSettingsParams.java @@ -4,8 +4,9 @@ import android.annotation.SuppressLint; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public class OsmandSettingsParams implements Parcelable { diff --git a/OsmAnd/src/net/osmand/aidl/customization/SetWidgetsParams.java b/OsmAnd/src/net/osmand/aidl/customization/SetWidgetsParams.java index d9343b920e..e578aec32d 100644 --- a/OsmAnd/src/net/osmand/aidl/customization/SetWidgetsParams.java +++ b/OsmAnd/src/net/osmand/aidl/customization/SetWidgetsParams.java @@ -2,7 +2,8 @@ package net.osmand.aidl.customization; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.Nullable; + +import androidx.annotation.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/OsmAnd/src/net/osmand/aidl/gpx/AGpxBitmap.java b/OsmAnd/src/net/osmand/aidl/gpx/AGpxBitmap.java index f4bdef433d..723a46b953 100644 --- a/OsmAnd/src/net/osmand/aidl/gpx/AGpxBitmap.java +++ b/OsmAnd/src/net/osmand/aidl/gpx/AGpxBitmap.java @@ -3,7 +3,8 @@ package net.osmand.aidl.gpx; import android.graphics.Bitmap; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; public class AGpxBitmap implements Parcelable { diff --git a/OsmAnd/src/net/osmand/aidl/gpx/AGpxFile.java b/OsmAnd/src/net/osmand/aidl/gpx/AGpxFile.java index 028c0a628a..99bacf5f8c 100644 --- a/OsmAnd/src/net/osmand/aidl/gpx/AGpxFile.java +++ b/OsmAnd/src/net/osmand/aidl/gpx/AGpxFile.java @@ -2,8 +2,9 @@ package net.osmand.aidl.gpx; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public class AGpxFile implements Parcelable { diff --git a/OsmAnd/src/net/osmand/aidl/gpx/ASelectedGpxFile.java b/OsmAnd/src/net/osmand/aidl/gpx/ASelectedGpxFile.java index 4a26cc5a5a..549e0494e1 100644 --- a/OsmAnd/src/net/osmand/aidl/gpx/ASelectedGpxFile.java +++ b/OsmAnd/src/net/osmand/aidl/gpx/ASelectedGpxFile.java @@ -2,11 +2,9 @@ package net.osmand.aidl.gpx; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.text.TextUtils; -import java.io.File; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public class ASelectedGpxFile implements Parcelable { diff --git a/OsmAnd/src/net/osmand/aidl/gpx/GpxColorParams.java b/OsmAnd/src/net/osmand/aidl/gpx/GpxColorParams.java index cd039ec0cc..f55ef9ac7f 100644 --- a/OsmAnd/src/net/osmand/aidl/gpx/GpxColorParams.java +++ b/OsmAnd/src/net/osmand/aidl/gpx/GpxColorParams.java @@ -2,7 +2,8 @@ package net.osmand.aidl.gpx; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; public class GpxColorParams implements Parcelable { diff --git a/OsmAnd/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.java b/OsmAnd/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.java index 9bfd70193f..5aaddcdfb6 100644 --- a/OsmAnd/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.java +++ b/OsmAnd/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.java @@ -2,8 +2,9 @@ package net.osmand.aidl.navdrawer; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public class NavDrawerFooterParams implements Parcelable { diff --git a/OsmAnd/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.java b/OsmAnd/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.java index c88950fd10..d618b9891c 100644 --- a/OsmAnd/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.java +++ b/OsmAnd/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.java @@ -2,8 +2,9 @@ package net.osmand.aidl.navdrawer; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public class NavDrawerHeaderParams implements Parcelable { diff --git a/OsmAnd/src/net/osmand/aidl/navdrawer/NavDrawerItem.java b/OsmAnd/src/net/osmand/aidl/navdrawer/NavDrawerItem.java index aedc585b65..2364a24a0c 100644 --- a/OsmAnd/src/net/osmand/aidl/navdrawer/NavDrawerItem.java +++ b/OsmAnd/src/net/osmand/aidl/navdrawer/NavDrawerItem.java @@ -2,8 +2,9 @@ package net.osmand.aidl.navdrawer; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public class NavDrawerItem implements Parcelable { diff --git a/OsmAnd/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.java b/OsmAnd/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.java index 783a76eb7b..e50fc710ff 100644 --- a/OsmAnd/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.java +++ b/OsmAnd/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.java @@ -2,7 +2,8 @@ package net.osmand.aidl.navdrawer; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import java.util.ArrayList; import java.util.List; diff --git a/OsmAnd/src/net/osmand/aidl/tiles/ASqliteDbFile.java b/OsmAnd/src/net/osmand/aidl/tiles/ASqliteDbFile.java index aaaf944ec9..1d9d84511c 100644 --- a/OsmAnd/src/net/osmand/aidl/tiles/ASqliteDbFile.java +++ b/OsmAnd/src/net/osmand/aidl/tiles/ASqliteDbFile.java @@ -2,8 +2,8 @@ package net.osmand.aidl.tiles; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.util.Log; + +import androidx.annotation.NonNull; public class ASqliteDbFile implements Parcelable { diff --git a/OsmAnd/src/net/osmand/data/FavouritePoint.java b/OsmAnd/src/net/osmand/data/FavouritePoint.java index 4d70bd663b..b7254121c9 100644 --- a/OsmAnd/src/net/osmand/data/FavouritePoint.java +++ b/OsmAnd/src/net/osmand/data/FavouritePoint.java @@ -1,17 +1,18 @@ package net.osmand.data; -import java.io.Serializable; - import android.content.Context; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; + +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; import net.osmand.GPXUtilities.WptPt; import net.osmand.plus.FavouritesDbHelper; import net.osmand.plus.R; import net.osmand.util.Algorithms; +import java.io.Serializable; + public class FavouritePoint implements Serializable, LocationPoint { private static final long serialVersionUID = 729654300829771466L; diff --git a/OsmAnd/src/net/osmand/data/PointDescription.java b/OsmAnd/src/net/osmand/data/PointDescription.java index a1ce8b5758..5f8b838c8a 100644 --- a/OsmAnd/src/net/osmand/data/PointDescription.java +++ b/OsmAnd/src/net/osmand/data/PointDescription.java @@ -1,8 +1,9 @@ package net.osmand.data; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.google.openlocationcode.OpenLocationCode; diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java index 9d609b2bb7..ca4f35aeab 100644 --- a/OsmAnd/src/net/osmand/plus/AppInitializer.java +++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java @@ -13,7 +13,8 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.os.AsyncTask; import android.os.Build; -import android.support.v7.app.AlertDialog; + +import androidx.appcompat.app.AlertDialog; import net.osmand.IProgress; import net.osmand.IndexConstants; diff --git a/OsmAnd/src/net/osmand/plus/ApplicationMode.java b/OsmAnd/src/net/osmand/plus/ApplicationMode.java index ea73bba0f1..c94f9dec9b 100644 --- a/OsmAnd/src/net/osmand/plus/ApplicationMode.java +++ b/OsmAnd/src/net/osmand/plus/ApplicationMode.java @@ -1,6 +1,6 @@ package net.osmand.plus; -import android.support.annotation.DrawableRes; +import androidx.annotation.DrawableRes; import com.google.gson.Gson; import com.google.gson.GsonBuilder; diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java index de7b4e7b07..4fda02b9cf 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java @@ -7,13 +7,6 @@ import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.net.Uri; import android.os.Build; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.IdRes; -import android.support.annotation.LayoutRes; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.AppCompatImageView; import android.text.TextUtils; import android.view.ContextThemeWrapper; import android.view.View; @@ -26,6 +19,14 @@ import android.widget.ProgressBar; import android.widget.SeekBar; import android.widget.TextView; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.IdRes; +import androidx.annotation.LayoutRes; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.activities.HelpActivity; diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java index f29a5ee808..0e5b89ab5c 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java @@ -1,13 +1,14 @@ package net.osmand.plus; import android.content.Context; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.LayoutRes; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v4.content.ContextCompat; + +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.LayoutRes; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.core.content.ContextCompat; public class ContextMenuItem { public static final int INVALID_ID = -1; diff --git a/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java b/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java index 7e8370f261..3147dc1def 100644 --- a/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java +++ b/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java @@ -1,8 +1,8 @@ package net.osmand.plus; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.util.LongSparseArray; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.collection.LongSparseArray; import net.osmand.Location; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/CustomPager.java b/OsmAnd/src/net/osmand/plus/CustomPager.java index 363e1d185d..f89b6a2252 100644 --- a/OsmAnd/src/net/osmand/plus/CustomPager.java +++ b/OsmAnd/src/net/osmand/plus/CustomPager.java @@ -1,11 +1,13 @@ package net.osmand.plus; -import net.osmand.plus.views.OsmAndMapSurfaceView; import android.content.Context; -import android.support.v4.view.ViewPager; import android.util.AttributeSet; import android.view.View; +import androidx.viewpager.widget.ViewPager; + +import net.osmand.plus.views.OsmAndMapSurfaceView; + public class CustomPager extends ViewPager { public CustomPager(Context context, AttributeSet attrs) { diff --git a/OsmAnd/src/net/osmand/plus/DialogListItemAdapter.java b/OsmAnd/src/net/osmand/plus/DialogListItemAdapter.java index b4be2f4955..61b941238b 100644 --- a/OsmAnd/src/net/osmand/plus/DialogListItemAdapter.java +++ b/OsmAnd/src/net/osmand/plus/DialogListItemAdapter.java @@ -1,8 +1,5 @@ package net.osmand.plus; -import android.support.annotation.ColorInt; -import android.support.v7.app.AlertDialog; -import android.support.v7.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -10,6 +7,10 @@ import android.widget.BaseAdapter; import android.widget.CompoundButton; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ContextThemeWrapper; + public class DialogListItemAdapter extends BaseAdapter { public static final int INVALID_ID = -1; diff --git a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java index c3c74e4bc5..5e050a601f 100644 --- a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java +++ b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java @@ -1,10 +1,11 @@ package net.osmand.plus; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.core.content.ContextCompat; import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; diff --git a/OsmAnd/src/net/osmand/plus/GPXDatabase.java b/OsmAnd/src/net/osmand/plus/GPXDatabase.java index 623bbfb2b9..94b1a993b6 100644 --- a/OsmAnd/src/net/osmand/plus/GPXDatabase.java +++ b/OsmAnd/src/net/osmand/plus/GPXDatabase.java @@ -1,7 +1,7 @@ package net.osmand.plus; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.GPXUtilities.GPXTrackAnalysis; import net.osmand.IndexConstants; diff --git a/OsmAnd/src/net/osmand/plus/GpxDbHelper.java b/OsmAnd/src/net/osmand/plus/GpxDbHelper.java index 07b122b986..41f19a020b 100644 --- a/OsmAnd/src/net/osmand/plus/GpxDbHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxDbHelper.java @@ -2,8 +2,9 @@ package net.osmand.plus; import android.annotation.SuppressLint; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index 98e58756d5..ccbbbaad7a 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -4,9 +4,10 @@ import android.annotation.SuppressLint; import android.graphics.Bitmap; import android.graphics.Matrix; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; @@ -35,8 +36,8 @@ import org.json.JSONObject; import java.io.File; import java.util.ArrayList; import java.util.Collection; -import java.util.HashSet; import java.util.Collections; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; diff --git a/OsmAnd/src/net/osmand/plus/LockableViewPager.java b/OsmAnd/src/net/osmand/plus/LockableViewPager.java index 408c6a8cc1..6dad12399c 100644 --- a/OsmAnd/src/net/osmand/plus/LockableViewPager.java +++ b/OsmAnd/src/net/osmand/plus/LockableViewPager.java @@ -1,10 +1,10 @@ package net.osmand.plus; import android.content.Context; -import android.support.v4.view.ViewPager; import android.util.AttributeSet; import android.view.MotionEvent; -import android.view.View; + +import androidx.viewpager.widget.ViewPager; public class LockableViewPager extends ViewPager { private static final int POS_Y_UNLOCKED = -1; diff --git a/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java b/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java index c134b09dde..e27707b5e8 100644 --- a/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java +++ b/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java @@ -2,10 +2,11 @@ package net.osmand.plus; import android.content.Context; import android.os.AsyncTask; -import android.support.annotation.IntDef; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; + +import androidx.annotation.IntDef; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; import net.osmand.AndroidUtils; import net.osmand.GPXUtilities; diff --git a/OsmAnd/src/net/osmand/plus/NotificationHelper.java b/OsmAnd/src/net/osmand/plus/NotificationHelper.java index 931107e4b0..bfa49b8d64 100644 --- a/OsmAnd/src/net/osmand/plus/NotificationHelper.java +++ b/OsmAnd/src/net/osmand/plus/NotificationHelper.java @@ -5,10 +5,11 @@ import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.NotificationCompat.Builder; -import android.support.v4.app.NotificationManagerCompat; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.app.NotificationCompat.Builder; +import androidx.core.app.NotificationManagerCompat; import net.osmand.plus.notifications.DownloadNotification; import net.osmand.plus.notifications.ErrorNotification; diff --git a/OsmAnd/src/net/osmand/plus/OnDialogFragmentResultListener.java b/OsmAnd/src/net/osmand/plus/OnDialogFragmentResultListener.java index 2c19c5c7fc..bdc709c8f3 100644 --- a/OsmAnd/src/net/osmand/plus/OnDialogFragmentResultListener.java +++ b/OsmAnd/src/net/osmand/plus/OnDialogFragmentResultListener.java @@ -1,8 +1,9 @@ package net.osmand.plus; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public interface OnDialogFragmentResultListener { void onDialogFragmentResult(@NonNull String tag, int resultCode, @Nullable Bundle data); diff --git a/OsmAnd/src/net/osmand/plus/OnDismissDialogFragmentListener.java b/OsmAnd/src/net/osmand/plus/OnDismissDialogFragmentListener.java index 1853907a4c..295ff169cf 100644 --- a/OsmAnd/src/net/osmand/plus/OnDismissDialogFragmentListener.java +++ b/OsmAnd/src/net/osmand/plus/OnDismissDialogFragmentListener.java @@ -1,6 +1,6 @@ package net.osmand.plus; -import android.support.v4.app.DialogFragment; +import androidx.fragment.app.DialogFragment; public interface OnDismissDialogFragmentListener { void onDismissDialogFragment(DialogFragment dialogFragment); diff --git a/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java b/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java index 1a4e4e2058..7bf7dd9628 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java @@ -8,11 +8,12 @@ import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; import android.widget.ArrayAdapter; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.AndroidUtils; import net.osmand.IProgress; import net.osmand.IndexConstants; diff --git a/OsmAnd/src/net/osmand/plus/OsmAndLocationProvider.java b/OsmAnd/src/net/osmand/plus/OsmAndLocationProvider.java index 743b79f472..0aa2b84e3c 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndLocationProvider.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndLocationProvider.java @@ -23,11 +23,12 @@ import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.os.Bundle; import android.provider.Settings; -import android.support.annotation.Nullable; -import android.support.v4.app.ActivityCompat; -import android.support.v7.app.AlertDialog; import android.util.Log; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.core.app.ActivityCompat; + import net.osmand.GeoidAltitudeCorrection; import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; diff --git a/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java b/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java index 1a7c69a1ae..15b45e9b1b 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java @@ -3,13 +3,14 @@ package net.osmand.plus; import android.app.Activity; import android.content.DialogInterface; -import android.support.v7.app.AlertDialog; -import android.support.v7.view.ContextThemeWrapper; import android.view.View; import android.widget.SeekBar; import android.widget.TextView; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ContextThemeWrapper; + import net.osmand.CallbackWithObject; import net.osmand.GPXUtilities; import net.osmand.Location; diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 361f05dc7f..5f21112797 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -19,14 +19,15 @@ import android.os.Build; import android.os.Handler; import android.os.Message; import android.provider.Settings; -import android.support.multidex.MultiDex; -import android.support.multidex.MultiDexApplication; -import android.support.v7.app.AlertDialog; import android.text.format.DateFormat; import android.view.View; import android.view.accessibility.AccessibilityManager; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; +import androidx.multidex.MultiDex; +import androidx.multidex.MultiDexApplication; + import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/OsmandPlugin.java b/OsmAnd/src/net/osmand/plus/OsmandPlugin.java index 5cd53c72db..f102c63a58 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandPlugin.java +++ b/OsmAnd/src/net/osmand/plus/OsmandPlugin.java @@ -7,14 +7,15 @@ import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Build; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; import android.view.View; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.IProgress; import net.osmand.Location; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 692bc82177..2dc0c9a7fb 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -12,12 +12,13 @@ import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Build; import android.os.Environment; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v4.util.Pair; -import android.support.v7.preference.PreferenceDataStore; + +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.core.util.Pair; +import androidx.preference.PreferenceDataStore; import com.google.gson.Gson; import com.google.gson.GsonBuilder; diff --git a/OsmAnd/src/net/osmand/plus/SettingsHelper.java b/OsmAnd/src/net/osmand/plus/SettingsHelper.java index de63be3c15..30e0bac376 100644 --- a/OsmAnd/src/net/osmand/plus/SettingsHelper.java +++ b/OsmAnd/src/net/osmand/plus/SettingsHelper.java @@ -5,9 +5,10 @@ import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.AlertDialog; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; @@ -50,7 +51,6 @@ import java.io.OutputStream; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; diff --git a/OsmAnd/src/net/osmand/plus/UiUtilities.java b/OsmAnd/src/net/osmand/plus/UiUtilities.java index fde5357591..2586f6e85e 100644 --- a/OsmAnd/src/net/osmand/plus/UiUtilities.java +++ b/OsmAnd/src/net/osmand/plus/UiUtilities.java @@ -11,18 +11,6 @@ import android.graphics.drawable.RippleDrawable; import android.hardware.Sensor; import android.hardware.SensorManager; import android.os.Build; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; -import android.support.design.widget.Snackbar; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.drawable.DrawableCompat; -import android.support.v4.view.ViewCompat; -import android.support.v4.widget.TintableCompoundButton; -import android.support.v7.view.ContextThemeWrapper; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -32,14 +20,26 @@ import android.widget.ImageView; import android.widget.SeekBar; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; +import androidx.core.view.ViewCompat; +import androidx.core.widget.TintableCompoundButton; + +import com.google.android.material.snackbar.Snackbar; + import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.data.LatLon; import net.osmand.plus.views.DirectionDrawable; import net.osmand.plus.widgets.TextViewEx; -import java.util.Locale; - import gnu.trove.map.hash.TLongObjectHashMap; public class UiUtilities { @@ -360,8 +360,8 @@ public class UiUtilities { } View view = snackbar.getView(); Context ctx = view.getContext(); - TextView tvMessage = (TextView) view.findViewById(android.support.design.R.id.snackbar_text); - TextView tvAction = (TextView) view.findViewById(android.support.design.R.id.snackbar_action); + TextView tvMessage = (TextView) view.findViewById(com.google.android.material.R.id.snackbar_text); + TextView tvAction = (TextView) view.findViewById(com.google.android.material.R.id.snackbar_action); if (messageColor == null) { messageColor = nightMode ? R.color.text_color_primary_dark : R.color.text_color_primary_light; } diff --git a/OsmAnd/src/net/osmand/plus/activities/ActionBarPreferenceActivity.java b/OsmAnd/src/net/osmand/plus/activities/ActionBarPreferenceActivity.java index 8e22c8704a..84e1e2e99b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/ActionBarPreferenceActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/ActionBarPreferenceActivity.java @@ -4,16 +4,17 @@ import android.app.Activity; import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.os.Bundle; -import android.support.v4.view.ViewCompat; -import android.support.v7.widget.Toolbar; import android.util.TypedValue; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.Spinner; - import android.widget.TextView; + +import androidx.appcompat.widget.Toolbar; +import androidx.core.view.ViewCompat; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/activities/ActionBarProgressActivity.java b/OsmAnd/src/net/osmand/plus/activities/ActionBarProgressActivity.java index 96e0f14010..c9aa0a505c 100644 --- a/OsmAnd/src/net/osmand/plus/activities/ActionBarProgressActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/ActionBarProgressActivity.java @@ -1,13 +1,14 @@ package net.osmand.plus.activities; import android.os.Bundle; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.Toolbar; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.ProgressBar; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; + import net.osmand.AndroidUtils; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/activities/AppCompatPreferenceActivity.java b/OsmAnd/src/net/osmand/plus/activities/AppCompatPreferenceActivity.java index 91d2b688e5..84b60b56e8 100644 --- a/OsmAnd/src/net/osmand/plus/activities/AppCompatPreferenceActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/AppCompatPreferenceActivity.java @@ -14,18 +14,19 @@ * limitations under the License. */ package net.osmand.plus.activities; -import android.app.FragmentManager; + 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; + +import androidx.annotation.LayoutRes; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatDelegate; +import androidx.appcompat.widget.Toolbar; /** * A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls * to be used with AppCompat. diff --git a/OsmAnd/src/net/osmand/plus/activities/ContributionVersionActivity.java b/OsmAnd/src/net/osmand/plus/activities/ContributionVersionActivity.java index 7dde1b05c7..f1d28dfa2b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/ContributionVersionActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/ContributionVersionActivity.java @@ -6,8 +6,6 @@ import android.content.Intent; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.v4.content.FileProvider; -import android.support.v7.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -16,9 +14,12 @@ import android.widget.ArrayAdapter; import android.widget.Filterable; import android.widget.TextView; import android.widget.Toast; + +import androidx.appcompat.app.AlertDialog; +import androidx.core.content.FileProvider; + import net.osmand.AndroidUtils; import net.osmand.osm.io.NetworkUtils; -import net.osmand.plus.BuildConfig; import net.osmand.plus.R; import net.osmand.plus.Version; diff --git a/OsmAnd/src/net/osmand/plus/activities/DownloadTilesDialog.java b/OsmAnd/src/net/osmand/plus/activities/DownloadTilesDialog.java index 2ae1a58de7..47d4487538 100644 --- a/OsmAnd/src/net/osmand/plus/activities/DownloadTilesDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/DownloadTilesDialog.java @@ -3,13 +3,14 @@ package net.osmand.plus.activities; 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 androidx.appcompat.app.AlertDialog; + import net.osmand.PlatformUtil; import net.osmand.data.QuadRect; import net.osmand.data.RotatedTileBox; diff --git a/OsmAnd/src/net/osmand/plus/activities/EditFavoriteGroupDialogFragment.java b/OsmAnd/src/net/osmand/plus/activities/EditFavoriteGroupDialogFragment.java index b5ee90a157..9f5b316b07 100644 --- a/OsmAnd/src/net/osmand/plus/activities/EditFavoriteGroupDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/EditFavoriteGroupDialogFragment.java @@ -4,11 +4,6 @@ import android.app.Activity; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.ListPopupWindow; import android.view.ContextThemeWrapper; import android.view.Gravity; import android.view.LayoutInflater; @@ -22,6 +17,12 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.ListPopupWindow; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.plus.FavouritesDbHelper; import net.osmand.plus.FavouritesDbHelper.FavoriteGroup; diff --git a/OsmAnd/src/net/osmand/plus/activities/EditPOIFilterActivity.java b/OsmAnd/src/net/osmand/plus/activities/EditPOIFilterActivity.java index bad87840e6..5daa64977f 100644 --- a/OsmAnd/src/net/osmand/plus/activities/EditPOIFilterActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/EditPOIFilterActivity.java @@ -6,8 +6,6 @@ package net.osmand.plus.activities; 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; @@ -20,6 +18,9 @@ import android.widget.CheckBox; import android.widget.ListView; import android.widget.TextView; +import androidx.appcompat.app.AlertDialog; +import androidx.core.view.MenuItemCompat; + import net.osmand.osm.PoiCategory; import net.osmand.osm.PoiType; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesListFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesListFragment.java index 045cb85233..ae48f7cca7 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavoritesListFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesListFragment.java @@ -3,9 +3,23 @@ */ package net.osmand.plus.activities; -import java.text.Collator; -import java.util.Comparator; -import java.util.List; +import android.app.Activity; +import android.content.Intent; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.CheckBox; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.TextView; + +import androidx.core.view.ViewCompat; +import androidx.fragment.app.FragmentActivity; import net.osmand.Location; import net.osmand.data.FavouritePoint; @@ -21,22 +35,10 @@ import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild; import net.osmand.plus.base.FavoriteImageDrawable; import net.osmand.plus.base.OsmAndListFragment; import net.osmand.util.MapUtils; -import android.app.Activity; -import android.content.Intent; -import android.support.v4.app.FragmentActivity; -import android.support.v4.view.ViewCompat; -import android.view.LayoutInflater; -import android.view.Menu; -import android.view.MenuInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.AdapterView; -import android.widget.ArrayAdapter; -import android.widget.CheckBox; -import android.widget.ImageButton; -import android.widget.ImageView; -import android.widget.ListView; -import android.widget.TextView; + +import java.text.Collator; +import java.util.Comparator; +import java.util.List; public class FavoritesListFragment extends OsmAndListFragment implements SearchActivityChild, OsmAndCompassListener { diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesSearchFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesSearchFragment.java index c34b5af973..8d05681ecb 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavoritesSearchFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesSearchFragment.java @@ -8,13 +8,6 @@ import android.content.DialogInterface; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.ViewCompat; -import android.support.v7.widget.Toolbar; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; @@ -33,6 +26,14 @@ import android.widget.ListView; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.core.view.ViewCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentActivity; + import net.osmand.AndroidUtils; import net.osmand.access.AccessibilityAssistant; import net.osmand.data.FavouritePoint; diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java index abb2ce2a38..6b9a0b5d90 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java @@ -1,8 +1,5 @@ package net.osmand.plus.activities; -import static net.osmand.plus.myplaces.FavoritesActivity.FAV_TAB; -import static net.osmand.plus.myplaces.FavoritesActivity.TAB_ID; - import android.content.Context; import android.content.DialogInterface; import android.content.Intent; @@ -13,11 +10,6 @@ import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.MenuItemCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.view.ActionMode; import android.text.Html; import android.view.LayoutInflater; import android.view.Menu; @@ -34,6 +26,12 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ActionMode; +import androidx.core.content.ContextCompat; +import androidx.core.view.MenuItemCompat; + import net.osmand.AndroidUtils; import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; @@ -67,6 +65,9 @@ import java.util.List; import java.util.Map; import java.util.Set; +import static net.osmand.plus.myplaces.FavoritesActivity.FAV_TAB; +import static net.osmand.plus.myplaces.FavoritesActivity.TAB_ID; + public class FavoritesTreeFragment extends OsmandExpandableListFragment implements FavoritesFragmentStateHolder { diff --git a/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java b/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java index 68be42eb44..f16f9bc9f0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java @@ -5,17 +5,18 @@ import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.DrawableRes; -import android.support.annotation.IdRes; -import android.support.annotation.StringRes; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; +import androidx.annotation.DrawableRes; +import androidx.annotation.IdRes; +import androidx.annotation.StringRes; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; + import net.osmand.AndroidUtils; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; diff --git a/OsmAnd/src/net/osmand/plus/activities/IntermediatePointsDialog.java b/OsmAnd/src/net/osmand/plus/activities/IntermediatePointsDialog.java index 3075ec1ce9..7e07c40b51 100644 --- a/OsmAnd/src/net/osmand/plus/activities/IntermediatePointsDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/IntermediatePointsDialog.java @@ -6,7 +6,6 @@ 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; @@ -21,6 +20,8 @@ import android.widget.ListView; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.appcompat.app.AlertDialog; + import net.osmand.Location; import net.osmand.TspAnt; import net.osmand.data.LatLon; diff --git a/OsmAnd/src/net/osmand/plus/activities/LocalIndexHelper.java b/OsmAnd/src/net/osmand/plus/activities/LocalIndexHelper.java index c59dab87fe..7c64e3a669 100644 --- a/OsmAnd/src/net/osmand/plus/activities/LocalIndexHelper.java +++ b/OsmAnd/src/net/osmand/plus/activities/LocalIndexHelper.java @@ -2,8 +2,9 @@ package net.osmand.plus.activities; import android.content.Context; -import android.support.annotation.DrawableRes; -import android.support.annotation.StringRes; + +import androidx.annotation.DrawableRes; +import androidx.annotation.StringRes; import net.osmand.IndexConstants; import net.osmand.map.ITileSource; diff --git a/OsmAnd/src/net/osmand/plus/activities/LocalIndexInfo.java b/OsmAnd/src/net/osmand/plus/activities/LocalIndexInfo.java index 1025de07cf..0550c5aa16 100644 --- a/OsmAnd/src/net/osmand/plus/activities/LocalIndexInfo.java +++ b/OsmAnd/src/net/osmand/plus/activities/LocalIndexInfo.java @@ -1,12 +1,12 @@ package net.osmand.plus.activities; -import java.io.File; +import androidx.annotation.NonNull; import net.osmand.GPXUtilities.GPXFile; import net.osmand.plus.OsmandApplication; import net.osmand.plus.activities.LocalIndexHelper.LocalIndexType; -import android.os.Parcel; -import android.support.annotation.NonNull; + +import java.io.File; public class LocalIndexInfo { diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 4025e127d5..48726c6d7c 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -19,19 +19,6 @@ import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.os.Message; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.ActivityCompat; -import android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentManager.BackStackEntry; -import android.support.v4.content.ContextCompat; -import android.support.v4.widget.DrawerLayout; -import android.support.v7.app.AlertDialog; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceFragmentCompat; import android.util.DisplayMetrics; import android.view.Gravity; import android.view.KeyEvent; @@ -40,13 +27,25 @@ import android.view.View; import android.view.ViewStub; import android.view.Window; import android.view.WindowManager; -import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.core.app.ActivityCompat; +import androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback; +import androidx.core.content.ContextCompat; +import androidx.drawerlayout.widget.DrawerLayout; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentManager.BackStackEntry; +import androidx.preference.Preference; +import androidx.preference.PreferenceFragmentCompat; + import net.osmand.AndroidUtils; -import net.osmand.CallbackWithObject; import net.osmand.Location; import net.osmand.PlatformUtil; import net.osmand.SecondSplashScreenFragment; @@ -84,7 +83,6 @@ 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.UiUtilities; import net.osmand.plus.Version; import net.osmand.plus.activities.search.SearchActivity; import net.osmand.plus.base.BaseOsmAndFragment; @@ -115,7 +113,6 @@ import net.osmand.plus.mapcontextmenu.MapContextMenu; import net.osmand.plus.mapcontextmenu.MenuController.MenuState; import net.osmand.plus.mapcontextmenu.builders.cards.dialogs.ContextMenuCardDialogFragment; import net.osmand.plus.mapcontextmenu.other.DestinationReachedMenu; -import net.osmand.plus.mapcontextmenu.other.RoutePreferencesMenu; import net.osmand.plus.mapcontextmenu.other.TrackDetailsMenu; import net.osmand.plus.mapmarkers.MapMarkersDialogFragment; import net.osmand.plus.mapmarkers.PlanRouteFragment; @@ -128,7 +125,6 @@ import net.osmand.plus.resources.ResourceManager; import net.osmand.plus.routepreparationmenu.ChooseRouteFragment; import net.osmand.plus.routepreparationmenu.MapRouteInfoMenu; import net.osmand.plus.routepreparationmenu.MapRouteInfoMenuFragment; -import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper; import net.osmand.plus.routing.IRouteInformationListener; import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.routing.RoutingHelper.RouteCalculationProgressCallback; diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 7338700698..10463946b8 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -8,11 +8,6 @@ import android.content.Intent; import android.graphics.Bitmap; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; import android.view.View; import android.view.WindowManager; import android.widget.AdapterView; @@ -22,6 +17,12 @@ import android.widget.ImageView; import android.widget.ListView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index c8486a1eb6..84e1afd445 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -3,10 +3,6 @@ package net.osmand.plus.activities; import android.content.DialogInterface; import android.graphics.drawable.Drawable; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.view.ContextThemeWrapper; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; @@ -14,15 +10,20 @@ import android.widget.Button; import android.widget.ListView; import android.widget.Toast; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.core.content.ContextCompat; + import net.osmand.CallbackWithObject; +import net.osmand.GPXUtilities.GPXFile; +import net.osmand.GPXUtilities.WptPt; import net.osmand.ResultMatcher; import net.osmand.StateChangedListener; import net.osmand.map.ITileSource; import net.osmand.map.TileSourceManager.TileSourceTemplate; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; -import net.osmand.GPXUtilities.GPXFile; -import net.osmand.GPXUtilities.WptPt; import net.osmand.plus.DialogListItemAdapter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; diff --git a/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java b/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java index e66b0738bc..1fa7cc88b0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java @@ -3,8 +3,6 @@ package net.osmand.plus.activities; import android.content.Intent; import android.location.Location; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.view.MenuItemCompat; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; @@ -20,6 +18,9 @@ import android.widget.EditText; import android.widget.Spinner; import android.widget.TextView; +import androidx.core.view.MenuItemCompat; +import androidx.fragment.app.Fragment; + import com.jwetherell.openmap.common.LatLonPoint; import com.jwetherell.openmap.common.UTMPoint; diff --git a/OsmAnd/src/net/osmand/plus/activities/OpeningHoursView.java b/OsmAnd/src/net/osmand/plus/activities/OpeningHoursView.java index cd6dddec3d..7a4e709443 100644 --- a/OsmAnd/src/net/osmand/plus/activities/OpeningHoursView.java +++ b/OsmAnd/src/net/osmand/plus/activities/OpeningHoursView.java @@ -4,7 +4,6 @@ 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; @@ -16,6 +15,8 @@ import android.widget.TextView; import android.widget.TimePicker; import android.widget.TimePicker.OnTimeChangedListener; +import androidx.appcompat.app.AlertDialog; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.util.OpeningHoursParser.BasicOpeningHourRule; diff --git a/OsmAnd/src/net/osmand/plus/activities/OsmandActionBarActivity.java b/OsmAnd/src/net/osmand/plus/activities/OsmandActionBarActivity.java index 820b57795d..d1892a6bb4 100644 --- a/OsmAnd/src/net/osmand/plus/activities/OsmandActionBarActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/OsmandActionBarActivity.java @@ -1,14 +1,12 @@ package net.osmand.plus.activities; import android.annotation.SuppressLint; -import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; import android.view.View; import android.view.ViewGroup; +import androidx.appcompat.app.ActionBar; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/activities/OsmandExpandableListActivity.java b/OsmAnd/src/net/osmand/plus/activities/OsmandExpandableListActivity.java index 0b40c946ad..c1548e4add 100644 --- a/OsmAnd/src/net/osmand/plus/activities/OsmandExpandableListActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/OsmandExpandableListActivity.java @@ -1,18 +1,20 @@ package net.osmand.plus.activities; -import net.osmand.plus.OsmandApplication; -import net.osmand.plus.R; import android.app.ActionBar; import android.graphics.Shader.TileMode; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.v4.view.MenuItemCompat; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ExpandableListView; +import androidx.core.view.MenuItemCompat; + +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.R; + public abstract class OsmandExpandableListActivity extends ActionBarProgressActivity { diff --git a/OsmAnd/src/net/osmand/plus/activities/OsmandInAppPurchaseActivity.java b/OsmAnd/src/net/osmand/plus/activities/OsmandInAppPurchaseActivity.java index 04aba266fd..76293f870d 100644 --- a/OsmAnd/src/net/osmand/plus/activities/OsmandInAppPurchaseActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/OsmandInAppPurchaseActivity.java @@ -6,13 +6,14 @@ import android.content.ActivityNotFoundException; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v7.app.AppCompatActivity; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; diff --git a/OsmAnd/src/net/osmand/plus/activities/OsmandListActivity.java b/OsmAnd/src/net/osmand/plus/activities/OsmandListActivity.java index eac8723e84..c601f735a6 100644 --- a/OsmAnd/src/net/osmand/plus/activities/OsmandListActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/OsmandListActivity.java @@ -1,11 +1,7 @@ package net.osmand.plus.activities; -import net.osmand.AndroidUtils; -import net.osmand.plus.OsmandApplication; -import net.osmand.plus.R; import android.app.ActionBar; import android.os.Bundle; -import android.support.v4.view.MenuItemCompat; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -14,6 +10,12 @@ import android.widget.HeaderViewListAdapter; import android.widget.ListAdapter; import android.widget.ListView; +import androidx.core.view.MenuItemCompat; + +import net.osmand.AndroidUtils; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.R; + public abstract class OsmandListActivity extends ActionBarProgressActivity implements AdapterView.OnItemClickListener { diff --git a/OsmAnd/src/net/osmand/plus/activities/PluginActivity.java b/OsmAnd/src/net/osmand/plus/activities/PluginActivity.java index 9956b2493c..8a0213f601 100644 --- a/OsmAnd/src/net/osmand/plus/activities/PluginActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/PluginActivity.java @@ -7,8 +7,6 @@ import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; import android.util.Log; import android.view.MenuItem; import android.view.View; @@ -16,6 +14,10 @@ import android.widget.Button; import android.widget.CompoundButton; import android.widget.ImageView; import android.widget.TextView; + +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/activities/PluginsActivity.java b/OsmAnd/src/net/osmand/plus/activities/PluginsActivity.java index 69aa72e5d9..8fea70c2fa 100644 --- a/OsmAnd/src/net/osmand/plus/activities/PluginsActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/PluginsActivity.java @@ -4,9 +4,6 @@ import android.app.Activity; import android.content.Intent; import android.content.res.TypedArray; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v7.widget.PopupMenu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; @@ -16,6 +13,10 @@ import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.PopupMenu; +import androidx.fragment.app.Fragment; + import net.osmand.AndroidUtils; import net.osmand.aidl.ConnectedApp; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/activities/PrivacyAndSecurityActivity.java b/OsmAnd/src/net/osmand/plus/activities/PrivacyAndSecurityActivity.java index ce8e1da09c..bb3c651cdb 100644 --- a/OsmAnd/src/net/osmand/plus/activities/PrivacyAndSecurityActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/PrivacyAndSecurityActivity.java @@ -2,13 +2,14 @@ package net.osmand.plus.activities; import android.app.Activity; import android.os.Bundle; -import android.support.v7.widget.SwitchCompat; -import android.support.v7.widget.Toolbar; import android.util.TypedValue; import android.view.MenuItem; import android.view.View; import android.widget.CompoundButton; +import androidx.appcompat.widget.SwitchCompat; +import androidx.appcompat.widget.Toolbar; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java index 797fe4eede..5b6074a2ef 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java @@ -14,12 +14,13 @@ 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.support.v7.app.AlertDialog.Builder; import android.view.MenuItem; import android.view.View; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AlertDialog.Builder; + import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java index 47e01150f7..233f9fe725 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java @@ -19,10 +19,6 @@ import android.preference.Preference.OnPreferenceChangeListener; import android.preference.Preference.OnPreferenceClickListener; import android.preference.PreferenceGroup; import android.preference.PreferenceScreen; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.AppCompatCheckedTextView; import android.util.Pair; import android.view.LayoutInflater; import android.view.View; @@ -33,6 +29,11 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.AppCompatCheckedTextView; +import androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback; + import net.osmand.IProgress; import net.osmand.IndexConstants; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index f17128fba4..ddc69f48c8 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -16,9 +16,6 @@ import android.preference.Preference; import android.preference.PreferenceCategory; import android.preference.PreferenceGroup; import android.preference.PreferenceScreen; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; @@ -29,6 +26,10 @@ import android.widget.SeekBar.OnSeekBarChangeListener; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.core.content.ContextCompat; + import net.osmand.plus.ApplicationMode; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; diff --git a/OsmAnd/src/net/osmand/plus/activities/TabActivity.java b/OsmAnd/src/net/osmand/plus/activities/TabActivity.java index f806a96433..9dcd547b1e 100644 --- a/OsmAnd/src/net/osmand/plus/activities/TabActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/TabActivity.java @@ -1,9 +1,9 @@ package net.osmand.plus.activities; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentStatePagerAdapter; -import android.support.v4.view.ViewPager; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentStatePagerAdapter; +import androidx.viewpager.widget.ViewPager; import java.util.List; @@ -44,7 +44,7 @@ public class TabActivity extends ActionBarProgressActivity { } /** - * Return the {@link android.support.v4.app.Fragment} to be displayed at {@code position}. + * Return the {@link Fragment} to be displayed at {@code position}. *

*/ @Override diff --git a/OsmAnd/src/net/osmand/plus/activities/TrackActivity.java b/OsmAnd/src/net/osmand/plus/activities/TrackActivity.java index b5f519161c..522c334bb3 100644 --- a/OsmAnd/src/net/osmand/plus/activities/TrackActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/TrackActivity.java @@ -5,17 +5,19 @@ import android.content.Intent; import android.content.res.ColorStateList; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.BottomNavigationView; -import android.support.v4.app.Fragment; -import android.support.v7.app.ActionBar; import android.util.DisplayMetrics; import android.util.Log; import android.view.MenuItem; import android.view.View; import android.view.WindowManager; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.fragment.app.Fragment; + +import com.google.android.material.bottomnavigation.BottomNavigationView; + import net.osmand.AndroidUtils; import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; diff --git a/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java b/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java index 8b927c5658..01e47530af 100644 --- a/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java @@ -4,8 +4,6 @@ import android.app.Activity; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Build.VERSION_CODES; -import android.support.annotation.LayoutRes; -import android.support.v4.content.ContextCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -15,6 +13,9 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams; +import androidx.annotation.LayoutRes; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; @@ -22,10 +23,11 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; +import org.apache.commons.logging.Log; + import java.util.ArrayList; import java.util.List; import java.util.Set; -import org.apache.commons.logging.Log; public class AppModeDialog { diff --git a/OsmAnd/src/net/osmand/plus/activities/actions/OsmAndDialogs.java b/OsmAnd/src/net/osmand/plus/activities/actions/OsmAndDialogs.java index 8f299ced53..75337741d3 100644 --- a/OsmAnd/src/net/osmand/plus/activities/actions/OsmAndDialogs.java +++ b/OsmAnd/src/net/osmand/plus/activities/actions/OsmAndDialogs.java @@ -1,17 +1,15 @@ package net.osmand.plus.activities.actions; -import java.util.HashMap; -import java.util.Map; - import android.app.Activity; import android.app.Dialog; import android.content.DialogInterface; import android.os.Bundle; -import android.support.v7.app.AlertDialog; import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.appcompat.app.AlertDialog; + import net.osmand.CallbackWithObject; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; @@ -23,6 +21,9 @@ import net.osmand.plus.mapcontextmenu.other.RoutePreferencesMenu; import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper; import net.osmand.util.Algorithms; +import java.util.HashMap; +import java.util.Map; + public class OsmAndDialogs { private static Map dialogActions = new HashMap(); diff --git a/OsmAnd/src/net/osmand/plus/activities/actions/OsmandRestoreOrExitDialog.java b/OsmAnd/src/net/osmand/plus/activities/actions/OsmandRestoreOrExitDialog.java index d9d7206fdf..adec05ba7e 100644 --- a/OsmAnd/src/net/osmand/plus/activities/actions/OsmandRestoreOrExitDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/actions/OsmandRestoreOrExitDialog.java @@ -2,14 +2,15 @@ package net.osmand.plus.activities.actions; import android.graphics.Typeface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.base.BottomSheetDialogFragment; diff --git a/OsmAnd/src/net/osmand/plus/activities/actions/ShareDialog.java b/OsmAnd/src/net/osmand/plus/activities/actions/ShareDialog.java index 475286525c..5b81f8b505 100644 --- a/OsmAnd/src/net/osmand/plus/activities/actions/ShareDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/actions/ShareDialog.java @@ -9,11 +9,12 @@ 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 androidx.appcompat.app.AlertDialog; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.Version; diff --git a/OsmAnd/src/net/osmand/plus/activities/actions/StartGPSStatus.java b/OsmAnd/src/net/osmand/plus/activities/actions/StartGPSStatus.java index ab67ad0fbc..530c769491 100644 --- a/OsmAnd/src/net/osmand/plus/activities/actions/StartGPSStatus.java +++ b/OsmAnd/src/net/osmand/plus/activities/actions/StartGPSStatus.java @@ -9,9 +9,6 @@ import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.net.Uri; import android.os.Bundle; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.AppCompatCheckBox; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; @@ -23,6 +20,10 @@ import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.AppCompatCheckBox; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchActivity.java index 14bd169095..fdae526aff 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchActivity.java @@ -1,13 +1,23 @@ package net.osmand.plus.activities.search; -import java.io.Serializable; -import java.lang.ref.WeakReference; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Formatter; -import java.util.List; -import java.util.Locale; +import android.app.ActionBar; +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.MenuItem; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ArrayAdapter; +import android.widget.Button; + +import androidx.appcompat.app.ActionBar.OnNavigationListener; +import androidx.appcompat.widget.Toolbar; +import androidx.core.view.ViewCompat; +import androidx.fragment.app.Fragment; +import androidx.viewpager.widget.ViewPager; +import androidx.viewpager.widget.ViewPager.OnPageChangeListener; import net.osmand.access.AccessibilityAssistant; import net.osmand.access.NavigationInfo; @@ -24,22 +34,14 @@ import net.osmand.plus.activities.NavigatePointFragment; import net.osmand.plus.activities.TabActivity; import net.osmand.plus.views.controls.PagerSlidingTabStrip; import net.osmand.util.Algorithms; -import android.app.ActionBar; -import android.content.Intent; -import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.view.ViewCompat; -import android.support.v4.view.ViewPager; -import android.support.v4.view.ViewPager.OnPageChangeListener; -import android.support.v7.app.ActionBar.OnNavigationListener; -import android.support.v7.widget.Toolbar; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.MenuItem; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ArrayAdapter; -import android.widget.Button; + +import java.io.Serializable; +import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Formatter; +import java.util.List; +import java.util.Locale; public class SearchActivity extends TabActivity implements OsmAndLocationListener { public static final int POI_TAB_INDEX = 0; diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java index 1fe5410bf1..9be37bf7cd 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java @@ -4,8 +4,6 @@ import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.view.MenuItemCompat; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -18,6 +16,9 @@ import android.widget.RadioGroup; import android.widget.TextView; import android.widget.Toast; +import androidx.core.view.MenuItemCompat; +import androidx.fragment.app.Fragment; + import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java index 67d322eae7..4549a2e4e2 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java @@ -12,7 +12,6 @@ import android.os.AsyncTask.Status; import android.os.Bundle; import android.os.Handler; import android.os.Message; -import android.support.annotation.Nullable; import android.text.Editable; import android.text.Spannable; import android.text.TextWatcher; @@ -35,6 +34,8 @@ import android.widget.TextView; import android.widget.TextView.BufferType; import android.widget.TextView.OnEditorActionListener; +import androidx.annotation.Nullable; + import net.osmand.Collator; import net.osmand.CollatorStringMatcher; import net.osmand.CollatorStringMatcher.StringMatcherMode; diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java index bb77f19290..ef012804df 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java @@ -1,6 +1,29 @@ package net.osmand.plus.activities.search; -import java.util.List; +import android.app.Activity; +import android.content.DialogInterface; +import android.content.Intent; +import android.os.Bundle; +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.AdapterView; +import android.widget.AdapterView.OnItemClickListener; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.TextView; +import android.widget.TextView.BufferType; + +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.PopupMenu; +import androidx.core.view.ViewCompat; +import androidx.fragment.app.FragmentActivity; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; @@ -17,29 +40,8 @@ import net.osmand.plus.base.OsmAndListFragment; import net.osmand.plus.helpers.SearchHistoryHelper; import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry; import net.osmand.util.MapUtils; -import android.app.Activity; -import android.content.DialogInterface; -import android.content.Intent; -import android.os.Bundle; -import android.support.v4.app.FragmentActivity; -import android.support.v4.view.ViewCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.PopupMenu; -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.AdapterView; -import android.widget.AdapterView.OnItemClickListener; -import android.widget.ArrayAdapter; -import android.widget.Button; -import android.widget.ImageButton; -import android.widget.ImageView; -import android.widget.ListView; -import android.widget.TextView; -import android.widget.TextView.BufferType; + +import java.util.List; public class SearchHistoryFragment extends OsmAndListFragment implements SearchActivityChild, OsmAndCompassListener { diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java index 5da047842b..b08b6348eb 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java @@ -3,16 +3,39 @@ */ package net.osmand.plus.activities.search; -import gnu.trove.set.hash.TLongHashSet; +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.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 androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.PopupMenu; +import androidx.appcompat.widget.Toolbar; +import androidx.core.view.MenuItemCompat; +import androidx.core.view.ViewCompat; import net.osmand.Location; import net.osmand.ResultMatcher; @@ -43,38 +66,17 @@ import net.osmand.util.Algorithms; import net.osmand.util.MapUtils; import net.osmand.util.OpeningHoursParser; import net.osmand.util.OpeningHoursParser.OpeningHours; -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.v4.view.ViewCompat; -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 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 diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPoiFilterFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPoiFilterFragment.java index 15b4791da6..a1c4d466e1 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPoiFilterFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPoiFilterFragment.java @@ -6,8 +6,6 @@ package net.osmand.plus.activities.search; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; -import android.support.v4.app.FragmentActivity; -import android.support.v7.widget.PopupMenu; import android.text.Editable; import android.text.TextWatcher; import android.view.KeyEvent; @@ -25,15 +23,18 @@ import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; +import androidx.appcompat.widget.PopupMenu; +import androidx.fragment.app.FragmentActivity; + import net.osmand.CollatorStringMatcher; import net.osmand.CollatorStringMatcher.StringMatcherMode; import net.osmand.data.LatLon; import net.osmand.osm.AbstractPoiType; import net.osmand.osm.PoiType; -import net.osmand.plus.UiUtilities; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild; import net.osmand.plus.base.OsmAndListFragment; import net.osmand.plus.poi.NominatimPoiFilter; diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchRegionByNameActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchRegionByNameActivity.java index 044d1e8eca..2f0d8c4524 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchRegionByNameActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchRegionByNameActivity.java @@ -1,19 +1,21 @@ package net.osmand.plus.activities.search; -import java.text.Collator; -import java.util.ArrayList; -import java.util.Comparator; +import android.os.Bundle; +import android.view.View; +import android.widget.AdapterView; +import android.widget.Toast; + +import androidx.annotation.Nullable; import net.osmand.data.LatLon; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.helpers.FileNameTranslationHelper; import net.osmand.plus.resources.RegionAddressRepository; -import android.os.Bundle; -import android.support.annotation.Nullable; -import android.view.View; -import android.widget.AdapterView; -import android.widget.Toast; + +import java.text.Collator; +import java.util.ArrayList; +import java.util.Comparator; public class SearchRegionByNameActivity extends SearchByNameAbstractActivity { diff --git a/OsmAnd/src/net/osmand/plus/activities/search/toolbar/SplitToolbar.java b/OsmAnd/src/net/osmand/plus/activities/search/toolbar/SplitToolbar.java index a43c39bed5..6991729163 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/toolbar/SplitToolbar.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/toolbar/SplitToolbar.java @@ -1,12 +1,13 @@ package net.osmand.plus.activities.search.toolbar; import android.content.Context; -import android.support.v7.widget.ActionMenuView; -import android.support.v7.widget.Toolbar; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; +import androidx.appcompat.widget.ActionMenuView; +import androidx.appcompat.widget.Toolbar; + /** * Created by Denis * on 20.01.2015. diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java index 5f7d663733..bd8647fccb 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java @@ -7,8 +7,9 @@ import android.graphics.Color; import android.graphics.Paint; import android.graphics.Paint.Style; import android.graphics.PointF; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.data.DataTileManager; import net.osmand.data.LatLon; diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteMenuBuilder.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteMenuBuilder.java index 8b810c5b4c..13a5d3dcff 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteMenuBuilder.java @@ -4,13 +4,14 @@ import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; -import android.support.annotation.NonNull; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; +import androidx.annotation.NonNull; + import net.osmand.AndroidUtils; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteMenuController.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteMenuController.java index d131be2de9..30c0b1f7ea 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteMenuController.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteMenuController.java @@ -5,8 +5,9 @@ import android.content.Intent; import android.graphics.drawable.Drawable; import android.media.MediaScannerConnection; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.v7.app.AlertDialog; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenuFullScreen.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenuFullScreen.java index 17bc545085..1f6953928d 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenuFullScreen.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenuFullScreen.java @@ -4,8 +4,6 @@ import android.animation.ValueAnimator; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; -import android.support.v4.app.Fragment; -import android.support.v4.view.ViewCompat; import android.util.DisplayMetrics; import android.view.Display; import android.view.View; @@ -14,6 +12,9 @@ import android.view.animation.LinearInterpolator; import android.widget.ImageView; import android.widget.ProgressBar; +import androidx.core.view.ViewCompat; +import androidx.fragment.app.Fragment; + import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenuFullScreenFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenuFullScreenFragment.java index 8b824feb8f..e38ecfa892 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenuFullScreenFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenuFullScreenFragment.java @@ -1,14 +1,15 @@ package net.osmand.plus.audionotes; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.plus.R; public class AudioVideoNoteRecordingMenuFullScreenFragment extends Fragment { diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java index 6058a7e942..26fe6c967b 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java @@ -23,9 +23,6 @@ import android.net.Uri; import android.os.Build; import android.os.StatFs; import android.provider.MediaStore; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; -import android.support.v7.app.AlertDialog; import android.view.Display; import android.view.KeyEvent; import android.view.Surface; @@ -37,6 +34,10 @@ import android.view.WindowManager; import android.widget.ArrayAdapter; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.core.app.ActivityCompat; + import net.osmand.AndroidUtils; import net.osmand.IProgress; import net.osmand.IndexConstants; diff --git a/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java index 4ae2e79cfc..4aea6b99b2 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java @@ -2,7 +2,6 @@ package net.osmand.plus.audionotes; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -10,6 +9,8 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.Nullable; + import net.osmand.data.PointDescription; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; diff --git a/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java index 7ed0095022..6031fdacd6 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java @@ -13,14 +13,15 @@ import android.media.MediaRecorder; import android.os.Build; import android.os.Bundle; import android.os.StatFs; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; -import android.support.v4.app.FragmentManager; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceViewHolder; import android.text.SpannableString; import android.view.View; +import androidx.annotation.NonNull; +import androidx.core.app.ActivityCompat; +import androidx.fragment.app.FragmentManager; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; diff --git a/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java index bc0eb4dc35..f0df427d22 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java @@ -7,11 +7,6 @@ import android.media.MediaScannerConnection; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v7.app.AlertDialog; -import android.support.v7.view.ActionMode; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; @@ -26,6 +21,12 @@ import android.widget.ImageView; import android.widget.ListView; import android.widget.Toast; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ActionMode; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; diff --git a/OsmAnd/src/net/osmand/plus/audionotes/adapters/NotesAdapter.java b/OsmAnd/src/net/osmand/plus/audionotes/adapters/NotesAdapter.java index 6e7a2de55f..278fdbd737 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/adapters/NotesAdapter.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/adapters/NotesAdapter.java @@ -1,8 +1,6 @@ package net.osmand.plus.audionotes.adapters; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -14,6 +12,9 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.audionotes.AudioVideoNotesPlugin.Recording; diff --git a/OsmAnd/src/net/osmand/plus/base/BaseOsmAndDialogFragment.java b/OsmAnd/src/net/osmand/plus/base/BaseOsmAndDialogFragment.java index 3045caba3b..4119d6658f 100644 --- a/OsmAnd/src/net/osmand/plus/base/BaseOsmAndDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/BaseOsmAndDialogFragment.java @@ -2,18 +2,19 @@ package net.osmand.plus.base; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.AppCompatActivity; import android.view.WindowManager; import android.widget.ImageView; -import net.osmand.plus.UiUtilities; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.appcompat.app.AppCompatActivity; +import androidx.fragment.app.DialogFragment; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; public class BaseOsmAndDialogFragment extends DialogFragment { diff --git a/OsmAnd/src/net/osmand/plus/base/BaseOsmAndFragment.java b/OsmAnd/src/net/osmand/plus/base/BaseOsmAndFragment.java index 35915f558c..d71b367f37 100644 --- a/OsmAnd/src/net/osmand/plus/base/BaseOsmAndFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/BaseOsmAndFragment.java @@ -3,19 +3,20 @@ package net.osmand.plus.base; import android.app.Activity; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.IdRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; import android.view.View; import android.view.animation.Animation; import android.widget.ImageView; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.IdRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.UiUtilities; diff --git a/OsmAnd/src/net/osmand/plus/base/BottomSheetDialog.java b/OsmAnd/src/net/osmand/plus/base/BottomSheetDialog.java index 5485f6cdea..ef369a1585 100644 --- a/OsmAnd/src/net/osmand/plus/base/BottomSheetDialog.java +++ b/OsmAnd/src/net/osmand/plus/base/BottomSheetDialog.java @@ -5,8 +5,6 @@ import android.content.Context; import android.content.res.TypedArray; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup.LayoutParams; @@ -14,6 +12,9 @@ import android.view.Window; import android.view.WindowManager; import android.widget.FrameLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.plus.R; public class BottomSheetDialog extends Dialog { diff --git a/OsmAnd/src/net/osmand/plus/base/BottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/base/BottomSheetDialogFragment.java index 8912cf3beb..0d08572610 100644 --- a/OsmAnd/src/net/osmand/plus/base/BottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/BottomSheetDialogFragment.java @@ -5,16 +5,17 @@ import android.app.Dialog; import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; + import net.osmand.plus.OnDialogFragmentResultListener; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/base/ContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/base/ContextMenuFragment.java index 4072286a03..64b0d8b4a0 100644 --- a/OsmAnd/src/net/osmand/plus/base/ContextMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/ContextMenuFragment.java @@ -7,13 +7,6 @@ import android.app.Activity; import android.content.Context; import android.os.Build; import android.os.Bundle; -import android.support.annotation.IdRes; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v7.view.ContextThemeWrapper; import android.text.ClipboardManager; import android.util.TypedValue; import android.view.GestureDetector; @@ -33,6 +26,14 @@ import android.widget.LinearLayout; import android.widget.OverScroller; import android.widget.Toast; +import androidx.annotation.IdRes; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.data.LatLon; diff --git a/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java b/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java index a45b2a2e42..e6b256c208 100644 --- a/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java +++ b/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java @@ -5,13 +5,14 @@ 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.data.LatLon; +import androidx.appcompat.app.AlertDialog; + import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; +import net.osmand.PlatformUtil; +import net.osmand.data.LatLon; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java b/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java index 75c5cecdf7..2876d9fc83 100644 --- a/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java +++ b/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java @@ -13,7 +13,8 @@ import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.GPXUtilities; import net.osmand.data.FavouritePoint; diff --git a/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java b/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java index d02b3ffb74..730856af6c 100644 --- a/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java +++ b/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java @@ -2,9 +2,10 @@ package net.osmand.plus.base; import android.content.Context; import android.os.AsyncTask; -import android.support.v4.util.Pair; import android.view.WindowManager; +import androidx.core.util.Pair; + import net.osmand.Location; import net.osmand.StateChangedListener; import net.osmand.binary.BinaryMapDataObject; @@ -28,7 +29,6 @@ import net.osmand.plus.views.AnimateDraggingMapThread; import net.osmand.plus.views.OsmandMapTileView; import net.osmand.util.MapUtils; - import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Map; diff --git a/OsmAnd/src/net/osmand/plus/base/MenuBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/base/MenuBottomSheetDialogFragment.java index 68a5958d50..120b7fde98 100644 --- a/OsmAnd/src/net/osmand/plus/base/MenuBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/MenuBottomSheetDialogFragment.java @@ -5,14 +5,6 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; @@ -22,6 +14,15 @@ import android.view.Window; import android.view.WindowManager; import android.widget.LinearLayout; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; + import net.osmand.AndroidUtils; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/base/OsmAndListFragment.java b/OsmAnd/src/net/osmand/plus/base/OsmAndListFragment.java index 2bcfa54e1f..b1dcb5ad43 100644 --- a/OsmAnd/src/net/osmand/plus/base/OsmAndListFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/OsmAndListFragment.java @@ -1,9 +1,10 @@ package net.osmand.plus.base; import android.os.Bundle; -import android.support.v4.app.ListFragment; import android.widget.ArrayAdapter; +import androidx.fragment.app.ListFragment; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/base/OsmandExpandableListFragment.java b/OsmAnd/src/net/osmand/plus/base/OsmandExpandableListFragment.java index 8aa1329c36..e28adac58e 100644 --- a/OsmAnd/src/net/osmand/plus/base/OsmandExpandableListFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/OsmandExpandableListFragment.java @@ -5,8 +5,6 @@ import android.graphics.Shader.TileMode; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.view.MenuItemCompat; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -14,6 +12,9 @@ import android.widget.ExpandableListAdapter; import android.widget.ExpandableListView; import android.widget.ExpandableListView.OnChildClickListener; +import androidx.annotation.NonNull; +import androidx.core.view.MenuItemCompat; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.OsmandActionBarActivity; diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BaseBottomSheetItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BaseBottomSheetItem.java index f330d7e811..d57467a7e9 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BaseBottomSheetItem.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BaseBottomSheetItem.java @@ -1,13 +1,13 @@ package net.osmand.plus.base.bottomsheetmenu; import android.content.Context; -import android.support.annotation.LayoutRes; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import net.osmand.plus.OsmandApplication; +import androidx.annotation.LayoutRes; + import net.osmand.plus.R; public class BaseBottomSheetItem { diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemTitleWithDescrAndButton.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemTitleWithDescrAndButton.java index 6899c3cb3c..385b51a07b 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemTitleWithDescrAndButton.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemTitleWithDescrAndButton.java @@ -2,15 +2,15 @@ package net.osmand.plus.base.bottomsheetmenu; import android.content.Context; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorRes; -import android.support.annotation.LayoutRes; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; -import net.osmand.plus.OsmandApplication; +import androidx.annotation.ColorRes; +import androidx.annotation.LayoutRes; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import net.osmand.plus.R; public class BottomSheetItemTitleWithDescrAndButton extends BottomSheetItemWithDescription { diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithCompoundButton.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithCompoundButton.java index cd8d46239e..267ff16519 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithCompoundButton.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithCompoundButton.java @@ -3,16 +3,16 @@ package net.osmand.plus.base.bottomsheetmenu; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorRes; -import android.support.annotation.LayoutRes; -import android.support.v4.content.ContextCompat; -import android.support.v4.widget.CompoundButtonCompat; import android.view.View; import android.view.ViewGroup; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; -import net.osmand.plus.OsmandApplication; +import androidx.annotation.ColorRes; +import androidx.annotation.LayoutRes; +import androidx.core.content.ContextCompat; +import androidx.core.widget.CompoundButtonCompat; + import net.osmand.plus.R; import net.osmand.plus.UiUtilities; diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithDescription.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithDescription.java index 15d8448766..8e308a2c6d 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithDescription.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithDescription.java @@ -2,14 +2,15 @@ package net.osmand.plus.base.bottomsheetmenu; import android.content.Context; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorRes; -import android.support.annotation.LayoutRes; -import android.support.v4.content.ContextCompat; import android.text.method.LinkMovementMethod; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.annotation.ColorRes; +import androidx.annotation.LayoutRes; +import androidx.core.content.ContextCompat; + import net.osmand.plus.R; public class BottomSheetItemWithDescription extends SimpleBottomSheetItem { diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/HorizontalRecyclerBottomSheetItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/HorizontalRecyclerBottomSheetItem.java index 890c2bb534..0897e0eb8a 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/HorizontalRecyclerBottomSheetItem.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/HorizontalRecyclerBottomSheetItem.java @@ -1,12 +1,12 @@ package net.osmand.plus.base.bottomsheetmenu; import android.content.Context; -import android.support.annotation.LayoutRes; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; -import net.osmand.plus.OsmandApplication; +import androidx.annotation.LayoutRes; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.R; public class HorizontalRecyclerBottomSheetItem extends BaseBottomSheetItem { diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java index 0366a00192..58d3e3c5f7 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java @@ -2,14 +2,15 @@ package net.osmand.plus.base.bottomsheetmenu; import android.content.Context; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorRes; -import android.support.annotation.LayoutRes; -import android.support.v4.content.ContextCompat; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.ColorRes; +import androidx.annotation.LayoutRes; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/DividerHalfItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/DividerHalfItem.java index 4d2b965a9e..62948107cf 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/DividerHalfItem.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/DividerHalfItem.java @@ -1,7 +1,8 @@ package net.osmand.plus.base.bottomsheetmenu.simpleitems; import android.content.Context; -import android.support.annotation.ColorRes; + +import androidx.annotation.ColorRes; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/DividerItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/DividerItem.java index f809e123e1..388da9b0ea 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/DividerItem.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/DividerItem.java @@ -1,14 +1,14 @@ package net.osmand.plus.base.bottomsheetmenu.simpleitems; import android.content.Context; -import android.support.annotation.ColorRes; -import android.support.v4.content.ContextCompat; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; +import androidx.annotation.ColorRes; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; -import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/DividerStartItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/DividerStartItem.java index b429bf1db5..232434d5a8 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/DividerStartItem.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/DividerStartItem.java @@ -1,7 +1,8 @@ package net.osmand.plus.base.bottomsheetmenu.simpleitems; import android.content.Context; -import android.support.annotation.ColorRes; + +import androidx.annotation.ColorRes; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/SimpleDividerItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/SimpleDividerItem.java index 8a34b7784d..82ee9fa909 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/SimpleDividerItem.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/SimpleDividerItem.java @@ -1,7 +1,8 @@ package net.osmand.plus.base.bottomsheetmenu.simpleitems; import android.content.Context; -import android.support.annotation.ColorRes; + +import androidx.annotation.ColorRes; public class SimpleDividerItem extends DividerItem { diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/SubtitleDividerItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/SubtitleDividerItem.java index ab94b87737..94124411a3 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/SubtitleDividerItem.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/SubtitleDividerItem.java @@ -1,7 +1,8 @@ package net.osmand.plus.base.bottomsheetmenu.simpleitems; import android.content.Context; -import android.support.annotation.ColorRes; + +import androidx.annotation.ColorRes; public class SubtitleDividerItem extends DividerItem { diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/SubtitmeListDividerItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/SubtitmeListDividerItem.java index f429795bf1..d353a05858 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/SubtitmeListDividerItem.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/SubtitmeListDividerItem.java @@ -1,7 +1,8 @@ package net.osmand.plus.base.bottomsheetmenu.simpleitems; import android.content.Context; -import android.support.annotation.ColorRes; + +import androidx.annotation.ColorRes; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/TitleDividerItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/TitleDividerItem.java index d1531d80b5..850d0474d5 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/TitleDividerItem.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/TitleDividerItem.java @@ -1,7 +1,8 @@ package net.osmand.plus.base.bottomsheetmenu.simpleitems; import android.content.Context; -import android.support.annotation.ColorRes; + +import androidx.annotation.ColorRes; public class TitleDividerItem extends DividerItem { diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/TitleItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/TitleItem.java index 79709828d3..966f02ef03 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/TitleItem.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/TitleItem.java @@ -1,10 +1,10 @@ package net.osmand.plus.base.bottomsheetmenu.simpleitems; import android.content.Context; -import android.support.annotation.ColorRes; import android.view.ViewGroup; -import net.osmand.plus.OsmandApplication; +import androidx.annotation.ColorRes; + import net.osmand.plus.R; import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem; diff --git a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanDialogFragment.java b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanDialogFragment.java index 2a7c149c12..7a5f5876e2 100644 --- a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanDialogFragment.java @@ -9,15 +9,6 @@ import android.content.Intent; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.AppCompatImageView; import android.text.TextUtils; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; @@ -30,6 +21,16 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanFreeBannerDialogFragment.java b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanFreeBannerDialogFragment.java index c8de556d89..bfdeb1b632 100644 --- a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanFreeBannerDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanFreeBannerDialogFragment.java @@ -1,9 +1,10 @@ package net.osmand.plus.chooseplan; import android.app.Activity; -import android.support.annotation.Nullable; import android.view.View; +import androidx.annotation.Nullable; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.OsmandInAppPurchaseActivity; diff --git a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanHillshadeSrtmDialogFragment.java b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanHillshadeSrtmDialogFragment.java index 4580830191..b2858b53b8 100644 --- a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanHillshadeSrtmDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanHillshadeSrtmDialogFragment.java @@ -1,9 +1,10 @@ package net.osmand.plus.chooseplan; import android.app.Activity; -import android.support.annotation.Nullable; import android.view.View; +import androidx.annotation.Nullable; + import net.osmand.plus.R; import net.osmand.plus.activities.OsmandInAppPurchaseActivity; import net.osmand.plus.inapp.InAppPurchaseHelper; diff --git a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanSeaDepthMapsDialogFragment.java b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanSeaDepthMapsDialogFragment.java index f80cbc8e05..211c788c38 100644 --- a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanSeaDepthMapsDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanSeaDepthMapsDialogFragment.java @@ -1,9 +1,10 @@ package net.osmand.plus.chooseplan; import android.app.Activity; -import android.support.annotation.Nullable; import android.view.View; +import androidx.annotation.Nullable; + import net.osmand.plus.R; import net.osmand.plus.activities.OsmandInAppPurchaseActivity; import net.osmand.plus.inapp.InAppPurchaseHelper; diff --git a/OsmAnd/src/net/osmand/plus/chooseplan/OsmLiveCancelledDialog.java b/OsmAnd/src/net/osmand/plus/chooseplan/OsmLiveCancelledDialog.java index 9dac53298c..037dccbcac 100644 --- a/OsmAnd/src/net/osmand/plus/chooseplan/OsmLiveCancelledDialog.java +++ b/OsmAnd/src/net/osmand/plus/chooseplan/OsmLiveCancelledDialog.java @@ -7,12 +7,6 @@ import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.ColorRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; @@ -20,6 +14,13 @@ import android.view.ViewGroup; import android.view.Window; import android.widget.ProgressBar; +import androidx.annotation.ColorRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashBaseFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashBaseFragment.java index 10a634a6b5..43107ab3f2 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashBaseFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashBaseFragment.java @@ -4,15 +4,17 @@ import android.app.Activity; import android.content.Intent; import android.location.Location; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v4.app.Fragment; -import android.support.v4.view.ViewCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; +import androidx.annotation.Nullable; +import androidx.core.view.ViewCompat; +import androidx.fragment.app.Fragment; + +import com.google.android.material.snackbar.Snackbar; + import net.osmand.plus.OsmAndAppCustomization; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java index bb0c259e24..a1ecc88c0f 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java @@ -12,12 +12,6 @@ import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.os.StatFs; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.ActivityCompat; -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; @@ -28,6 +22,13 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.core.app.ActivityCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; + import net.osmand.AndroidUtils; import net.osmand.ValueHolder; import net.osmand.plus.OsmandApplication; @@ -42,7 +43,6 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashSet; import java.util.List; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashErrorFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashErrorFragment.java index 136e50deab..047c645165 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashErrorFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashErrorFragment.java @@ -2,8 +2,6 @@ package net.osmand.plus.dashboard; import android.graphics.Typeface; import android.os.Bundle; -import android.support.design.widget.Snackbar; -import android.support.v4.view.ViewCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -11,6 +9,10 @@ import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; +import androidx.core.view.ViewCompat; + +import com.google.android.material.snackbar.Snackbar; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java index c94601a05c..28155c664b 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java @@ -2,8 +2,6 @@ package net.osmand.plus.dashboard; import android.graphics.Typeface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -11,6 +9,9 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashNavigationFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashNavigationFragment.java index 2a3d73cf88..db4ab19884 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashNavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashNavigationFragment.java @@ -1,11 +1,7 @@ package net.osmand.plus.dashboard; -import android.app.Activity; import android.content.DialogInterface; import android.os.Bundle; -import android.support.annotation.Nullable; -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; @@ -14,11 +10,14 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.FragmentActivity; + import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; -import net.osmand.plus.routepreparationmenu.ChooseRouteFragment; -import net.osmand.plus.routepreparationmenu.RouteDetailsFragment; import net.osmand.plus.dashboard.tools.DashFragmentData; +import net.osmand.plus.routepreparationmenu.ChooseRouteFragment; import net.osmand.plus.routing.RoutingHelper; /** diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java index f50cc1af1a..20affaa27a 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java @@ -4,8 +4,6 @@ import android.content.Intent; import android.content.res.TypedArray; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -15,6 +13,9 @@ import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentManager; + import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; import net.osmand.plus.activities.PluginActivity; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java index 802e3cbd76..98d81601da 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java @@ -1,7 +1,6 @@ package net.osmand.plus.dashboard; import android.os.Bundle; -import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -9,6 +8,8 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.Nullable; + import net.osmand.data.LatLon; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashSearchFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashSearchFragment.java index 37d7f4aedf..71ae75da3b 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashSearchFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashSearchFragment.java @@ -1,19 +1,18 @@ package net.osmand.plus.dashboard; -import android.graphics.Typeface; import android.os.Bundle; -import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.annotation.Nullable; + import net.osmand.AndroidUtils; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity.ShowQuickSearchMode; import net.osmand.plus.dashboard.tools.DashFragmentData; -import net.osmand.plus.helpers.FontCache; public class DashSearchFragment extends DashBaseFragment { public static final String TAG = "DASH_SEARCH_FRAGMENT"; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java index 6bd94bafd2..d66754bace 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java @@ -2,9 +2,6 @@ package net.osmand.plus.dashboard; 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; import android.view.View; @@ -15,6 +12,10 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.PopupMenu; + import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index 5b3d0d0b83..24579a75b9 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -10,13 +10,6 @@ import android.content.Intent; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.ColorRes; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.ViewCompat; -import android.support.v7.widget.Toolbar; import android.view.Gravity; import android.view.LayoutInflater; import android.view.MenuItem; @@ -38,6 +31,14 @@ import android.widget.ProgressBar; import android.widget.ScrollView; import android.widget.TextView; +import androidx.annotation.ColorRes; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.core.view.ViewCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; + import com.github.ksoichiro.android.observablescrollview.ObservableListView; import com.github.ksoichiro.android.observablescrollview.ObservableScrollView; import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/tools/DashFragmentData.java b/OsmAnd/src/net/osmand/plus/dashboard/tools/DashFragmentData.java index ab1b1de27c..c791b6228c 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/tools/DashFragmentData.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/tools/DashFragmentData.java @@ -1,6 +1,6 @@ package net.osmand.plus.dashboard.tools; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import net.osmand.plus.OsmandSettings; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/tools/DashboardSettingsDialogFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/tools/DashboardSettingsDialogFragment.java index 38c918dcef..4370eead93 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/tools/DashboardSettingsDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/tools/DashboardSettingsDialogFragment.java @@ -4,14 +4,8 @@ import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; -import android.content.res.Resources; import android.content.res.Resources.Theme; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentActivity; -import android.support.v7.app.AlertDialog; -import android.support.v7.view.ContextThemeWrapper; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; @@ -21,6 +15,12 @@ import android.widget.CompoundButton; import android.widget.ListView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentActivity; + import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/tools/NumberPickerDialogFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/tools/NumberPickerDialogFragment.java index 9c20d4a0d6..5eabf22cd3 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/tools/NumberPickerDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/tools/NumberPickerDialogFragment.java @@ -3,13 +3,14 @@ package net.osmand.plus.dashboard.tools; 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.LayoutInflater; import android.view.View; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; + import net.osmand.PlatformUtil; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/tools/TransactionBuilder.java b/OsmAnd/src/net/osmand/plus/dashboard/tools/TransactionBuilder.java index 37ae3c0939..c012f58c94 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/tools/TransactionBuilder.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/tools/TransactionBuilder.java @@ -1,9 +1,10 @@ package net.osmand.plus.dashboard.tools; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; import android.util.Log; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; + import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java b/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java index 35f75a1b27..d934e1bb4f 100644 --- a/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java +++ b/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java @@ -1,7 +1,6 @@ package net.osmand.plus.development; import android.os.Bundle; -import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; @@ -11,6 +10,8 @@ import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.Nullable; + import net.osmand.plus.OsmAndLocationProvider; import net.osmand.plus.R; import net.osmand.plus.dashboard.DashBaseFragment; diff --git a/OsmAnd/src/net/osmand/plus/development/DevelopmentSettingsFragment.java b/OsmAnd/src/net/osmand/plus/development/DevelopmentSettingsFragment.java index 9a33485b29..549914ca09 100644 --- a/OsmAnd/src/net/osmand/plus/development/DevelopmentSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/development/DevelopmentSettingsFragment.java @@ -2,7 +2,8 @@ package net.osmand.plus.development; import android.content.Intent; import android.os.Debug; -import android.support.v7.preference.Preference; + +import androidx.preference.Preference; import net.osmand.plus.OsmAndLocationSimulation; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/development/LogcatActivity.java b/OsmAnd/src/net/osmand/plus/development/LogcatActivity.java index fd638590e1..65f8ac210d 100644 --- a/OsmAnd/src/net/osmand/plus/development/LogcatActivity.java +++ b/OsmAnd/src/net/osmand/plus/development/LogcatActivity.java @@ -2,10 +2,6 @@ package net.osmand.plus.development; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.Gravity; import android.view.LayoutInflater; import android.view.Menu; @@ -14,6 +10,11 @@ import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBar; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java index a17eabae3c..cb1c0a1a63 100644 --- a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java +++ b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java @@ -5,11 +5,10 @@ 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.Gravity; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; -import android.view.Gravity; import android.widget.Button; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams; @@ -17,14 +16,16 @@ import android.widget.ScrollView; import android.widget.TextView; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.OsmandActionBarActivity; import net.osmand.plus.routing.data.StreetName; import net.osmand.plus.voice.AbstractPrologCommandPlayer; -import net.osmand.plus.voice.TTSCommandPlayerImpl; import net.osmand.plus.voice.CommandBuilder; import net.osmand.plus.voice.CommandPlayer; +import net.osmand.plus.voice.TTSCommandPlayerImpl; import java.util.HashMap; import java.util.Map; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/AddWaypointBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/dialogs/AddWaypointBottomSheetDialogFragment.java index 90f45a137a..2b8f7a07f5 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/AddWaypointBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/AddWaypointBottomSheetDialogFragment.java @@ -6,10 +6,11 @@ import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.os.Bundle; -import android.support.annotation.DrawableRes; -import android.support.annotation.Nullable; import android.view.View; +import androidx.annotation.DrawableRes; +import androidx.annotation.Nullable; + import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index 52f0d4eecd..4b991c2b8e 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -4,15 +4,6 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Build; -import android.support.annotation.ColorInt; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.view.ContextThemeWrapper; -import android.support.v7.widget.AppCompatCheckedTextView; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -25,6 +16,16 @@ import android.widget.ListView; import android.widget.Spinner; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.appcompat.widget.AppCompatCheckedTextView; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.GPXUtilities; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/CrashBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/dialogs/CrashBottomSheetDialogFragment.java index ded8574cf3..6533e6d77b 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/CrashBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/CrashBottomSheetDialogFragment.java @@ -2,11 +2,12 @@ package net.osmand.plus.dialogs; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentManager; import android.view.ContextThemeWrapper; import android.view.View; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentManager; + import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; @@ -14,7 +15,6 @@ import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.base.MenuBottomSheetDialogFragment; import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem; -import net.osmand.plus.base.bottomsheetmenu.simpleitems.SubtitleDividerItem; import org.apache.commons.logging.Log; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/DirectionsDialogs.java b/OsmAnd/src/net/osmand/plus/dialogs/DirectionsDialogs.java index 65852a05d0..95db101406 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/DirectionsDialogs.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/DirectionsDialogs.java @@ -3,9 +3,10 @@ package net.osmand.plus.dialogs; import android.app.Activity; import android.content.DialogInterface; import android.os.Bundle; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.PopupMenu; + +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.PopupMenu; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/DislikeOsmAndBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/dialogs/DislikeOsmAndBottomSheetDialogFragment.java index eaae1f27cb..49d3837132 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/DislikeOsmAndBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/DislikeOsmAndBottomSheetDialogFragment.java @@ -4,11 +4,12 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentManager; -import android.support.v7.view.ContextThemeWrapper; import android.view.View; +import androidx.annotation.NonNull; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.fragment.app.FragmentManager; + import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/FavoriteDialogs.java b/OsmAnd/src/net/osmand/plus/dialogs/FavoriteDialogs.java index d5ee2d23fc..d52e5dccf9 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/FavoriteDialogs.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/FavoriteDialogs.java @@ -9,7 +9,6 @@ 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; @@ -19,8 +18,10 @@ import android.widget.EditText; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; + +import androidx.appcompat.app.AlertDialog; + import net.osmand.AndroidUtils; -import net.osmand.Location; import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; @@ -30,12 +31,9 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.FavoritesListFragment.FavouritesAdapter; import net.osmand.plus.activities.MapActivity; -import net.osmand.util.MapUtils; -import java.text.Collator; import java.text.MessageFormat; import java.util.ArrayList; -import java.util.Comparator; import java.util.List; public class FavoriteDialogs { diff --git a/OsmAnd/src/net/osmand/plus/dialogs/HelpArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/dialogs/HelpArticleDialogFragment.java index f669de9bd9..996ed1e80f 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/HelpArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/HelpArticleDialogFragment.java @@ -3,9 +3,6 @@ package net.osmand.plus.dialogs; import android.annotation.SuppressLint; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v7.widget.Toolbar; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -13,6 +10,10 @@ import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.Toolbar; +import androidx.fragment.app.DialogFragment; + import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/PluginDisabledBottomSheet.java b/OsmAnd/src/net/osmand/plus/dialogs/PluginDisabledBottomSheet.java index 259933f367..50c0046c89 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/PluginDisabledBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/PluginDisabledBottomSheet.java @@ -6,10 +6,11 @@ import android.graphics.Typeface; import android.net.Uri; import android.os.Bundle; import android.provider.Settings; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentManager; import android.text.SpannableString; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/PluginInstalledBottomSheetDialog.java b/OsmAnd/src/net/osmand/plus/dialogs/PluginInstalledBottomSheetDialog.java index aa8ad430a7..2e884f8022 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/PluginInstalledBottomSheetDialog.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/PluginInstalledBottomSheetDialog.java @@ -4,14 +4,15 @@ import android.app.Activity; import android.content.Context; import android.graphics.Typeface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentManager; import android.text.SpannableString; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ProgressBar; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ProgressDialogFragment.java b/OsmAnd/src/net/osmand/plus/dialogs/ProgressDialogFragment.java index da7e311004..e4b7a19bae 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ProgressDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ProgressDialogFragment.java @@ -4,8 +4,9 @@ import android.app.Dialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; + +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; import net.osmand.plus.ProgressImplementation; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java index a43e38cdd4..0f837c7565 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java @@ -1,10 +1,11 @@ package net.osmand.plus.dialogs; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; import android.view.View; import android.widget.ArrayAdapter; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; + import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/RateUsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/dialogs/RateUsBottomSheetDialogFragment.java index 20bd10f612..84aae3f509 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/RateUsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/RateUsBottomSheetDialogFragment.java @@ -4,11 +4,12 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentManager; import android.view.ContextThemeWrapper; import android.view.View; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentManager; + import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; @@ -16,12 +17,9 @@ import net.osmand.plus.R; import net.osmand.plus.Version; import net.osmand.plus.base.MenuBottomSheetDialogFragment; import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem; -import net.osmand.plus.base.bottomsheetmenu.simpleitems.SubtitleDividerItem; import org.apache.commons.logging.Log; -import java.util.Calendar; - public class RateUsBottomSheetDialogFragment extends MenuBottomSheetDialogFragment { public static final String TAG = "RateUsBottomSheetDialogFragment"; private static final Log LOG = PlatformUtil.getLog(SendAnalyticsBottomSheetDialogFragment.class); diff --git a/OsmAnd/src/net/osmand/plus/dialogs/SelectMapStyleBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/dialogs/SelectMapStyleBottomSheetDialogFragment.java index d0856a77e1..d09a2d6c20 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/SelectMapStyleBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/SelectMapStyleBottomSheetDialogFragment.java @@ -3,10 +3,6 @@ package net.osmand.plus.dialogs; import android.app.Activity; import android.content.Context; import android.os.Bundle; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.widget.NestedScrollView; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; @@ -16,6 +12,11 @@ import android.widget.RadioButton; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.widget.NestedScrollView; + import net.osmand.Collator; import net.osmand.OsmAndCollator; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/SelectMapViewQuickActionsBottomSheet.java b/OsmAnd/src/net/osmand/plus/dialogs/SelectMapViewQuickActionsBottomSheet.java index 1d60dab23f..2e0aa62177 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/SelectMapViewQuickActionsBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/SelectMapViewQuickActionsBottomSheet.java @@ -5,12 +5,6 @@ import android.app.Activity; import android.content.Context; import android.content.res.ColorStateList; import android.os.Bundle; -import android.support.annotation.ColorInt; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentManager; -import android.support.v4.util.Pair; -import android.support.v4.widget.CompoundButtonCompat; -import android.support.v4.widget.NestedScrollView; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; @@ -20,6 +14,13 @@ import android.widget.LinearLayout.LayoutParams; import android.widget.RadioButton; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.annotation.Nullable; +import androidx.core.util.Pair; +import androidx.core.widget.CompoundButtonCompat; +import androidx.core.widget.NestedScrollView; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; @@ -33,9 +34,9 @@ import net.osmand.plus.quickaction.QuickAction; import net.osmand.plus.quickaction.QuickActionFactory; import net.osmand.plus.quickaction.QuickActionRegistry; import net.osmand.plus.quickaction.SwitchableAction; -import net.osmand.plus.quickaction.actions.MapStyleAction; -import net.osmand.plus.quickaction.actions.MapSourceAction; import net.osmand.plus.quickaction.actions.MapOverlayAction; +import net.osmand.plus.quickaction.actions.MapSourceAction; +import net.osmand.plus.quickaction.actions.MapStyleAction; import net.osmand.plus.quickaction.actions.MapUnderlayAction; import net.osmand.plus.render.RendererRegistry; import net.osmand.render.RenderingRulesStorage; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/SendAnalyticsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/dialogs/SendAnalyticsBottomSheetDialogFragment.java index d212b7e76d..e67b1bc076 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/SendAnalyticsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/SendAnalyticsBottomSheetDialogFragment.java @@ -2,11 +2,6 @@ package net.osmand.plus.dialogs; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; import android.text.Spannable; import android.text.SpannableString; import android.text.TextPaint; @@ -15,6 +10,12 @@ import android.text.style.URLSpan; import android.view.ContextThemeWrapper; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/WhatsNewDialogFragment.java b/OsmAnd/src/net/osmand/plus/dialogs/WhatsNewDialogFragment.java index bfb253eca0..730cafd47c 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/WhatsNewDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/WhatsNewDialogFragment.java @@ -5,9 +5,10 @@ import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.AlertDialog; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/dialogs/XMasDialogFragment.java b/OsmAnd/src/net/osmand/plus/dialogs/XMasDialogFragment.java index b67f51be2b..e57273964f 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/XMasDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/XMasDialogFragment.java @@ -3,12 +3,13 @@ package net.osmand.plus.dialogs; 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.Button; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; + import net.osmand.osm.PoiCategory; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index fd778cfb2a..b96d3c268b 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -9,17 +9,6 @@ import android.content.pm.PackageManager; import android.os.AsyncTask; import android.os.Bundle; import android.os.StatFs; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; -import android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.ViewPager; -import android.support.v4.widget.Space; -import android.support.v7.app.AlertDialog; import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; import android.view.MenuItem; @@ -34,6 +23,18 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; +import androidx.appcompat.app.AlertDialog; +import androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; +import androidx.legacy.widget.Space; +import androidx.viewpager.widget.ViewPager; + import net.osmand.AndroidUtils; import net.osmand.IProgress; import net.osmand.IndexConstants; diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java b/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java index 98cc159720..ccc5fb0510 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java @@ -9,11 +9,12 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.AsyncTask.Status; import android.os.StatFs; -import android.support.annotation.UiThread; -import android.support.v7.app.AlertDialog; import android.view.View; import android.widget.Toast; +import androidx.annotation.UiThread; +import androidx.appcompat.app.AlertDialog; + import net.osmand.AndroidNetworkUtils; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java index c30c2730d2..926c6f0596 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java @@ -1,7 +1,7 @@ package net.osmand.plus.download; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadValidationManager.java b/OsmAnd/src/net/osmand/plus/download/DownloadValidationManager.java index 7810ef80ef..4196d9ecdb 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadValidationManager.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadValidationManager.java @@ -6,18 +6,18 @@ import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentActivity; -import android.support.v7.app.AlertDialog; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentActivity; + 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 net.osmand.plus.inapp.InAppPurchaseHelper; import java.io.File; import java.text.MessageFormat; diff --git a/OsmAnd/src/net/osmand/plus/download/IndexItem.java b/OsmAnd/src/net/osmand/plus/download/IndexItem.java index 7e315eea71..9f55404079 100644 --- a/OsmAnd/src/net/osmand/plus/download/IndexItem.java +++ b/OsmAnd/src/net/osmand/plus/download/IndexItem.java @@ -1,11 +1,9 @@ package net.osmand.plus.download; -import java.io.File; -import java.io.IOException; -import java.text.DateFormat; -import java.util.Date; +import android.content.Context; + +import androidx.annotation.NonNull; -import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; import net.osmand.map.OsmandRegions; @@ -15,8 +13,10 @@ import net.osmand.plus.helpers.FileNameTranslationHelper; import org.apache.commons.logging.Log; -import android.content.Context; -import android.support.annotation.NonNull; +import java.io.File; +import java.io.IOException; +import java.text.DateFormat; +import java.util.Date; public class IndexItem implements Comparable { private static final Log log = PlatformUtil.getLog(IndexItem.class); diff --git a/OsmAnd/src/net/osmand/plus/download/ui/ActiveDownloadsDialogFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/ActiveDownloadsDialogFragment.java index 2e63c26cac..1b8667685c 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/ActiveDownloadsDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/ActiveDownloadsDialogFragment.java @@ -2,14 +2,15 @@ package net.osmand.plus.download.ui; 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 androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; + import net.osmand.plus.R; import net.osmand.plus.download.DownloadActivity; import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents; diff --git a/OsmAnd/src/net/osmand/plus/download/ui/DataStoragePlaceDialogFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/DataStoragePlaceDialogFragment.java index 72a262891b..f6b2ce314d 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/DataStoragePlaceDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/DataStoragePlaceDialogFragment.java @@ -6,8 +6,6 @@ import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.os.StatFs; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentManager; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -19,6 +17,9 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.IProgress; import net.osmand.plus.OnDismissDialogFragmentListener; diff --git a/OsmAnd/src/net/osmand/plus/download/ui/DownloadMapToolbarController.java b/OsmAnd/src/net/osmand/plus/download/ui/DownloadMapToolbarController.java index 990eb390fa..0cff5c9e44 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/DownloadMapToolbarController.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/DownloadMapToolbarController.java @@ -1,15 +1,15 @@ package net.osmand.plus.download.ui; -import android.content.Context; import android.graphics.Typeface; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.view.ContextThemeWrapper; import android.view.View; import android.widget.TextView; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; diff --git a/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java index b46836ba0e..5d1c25d7f4 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java @@ -7,10 +7,6 @@ import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Bundle; -import android.support.v4.app.DialogFragment; -import android.support.v4.view.MenuItemCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.Menu; @@ -25,6 +21,11 @@ import android.widget.ExpandableListView.OnChildClickListener; import android.widget.ImageView; import android.widget.TextView; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; +import androidx.core.view.MenuItemCompat; +import androidx.fragment.app.DialogFragment; + import net.osmand.AndroidNetworkUtils; import net.osmand.AndroidUtils; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java index 89ab85263c..9d8dd0510d 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java @@ -6,9 +6,6 @@ import android.content.Intent; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.AsyncTask; -import android.support.v4.view.ViewCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.PopupMenu; import android.util.TypedValue; import android.view.MenuItem; import android.view.View; @@ -19,6 +16,10 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.PopupMenu; +import androidx.core.view.ViewCompat; + import net.osmand.map.WorldRegion; import net.osmand.plus.R; import net.osmand.plus.Version; diff --git a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java index ea566933f7..ddf99ce9ab 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java @@ -1,47 +1,5 @@ package net.osmand.plus.download.ui; -import java.io.File; -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 java.util.regex.Pattern; - -import net.osmand.AndroidUtils; -import net.osmand.Collator; -import net.osmand.IndexConstants; -import net.osmand.OsmAndCollator; -import net.osmand.ResultMatcher; -import net.osmand.map.ITileSource; -import net.osmand.map.TileSourceManager; -import net.osmand.plus.ContextMenuAdapter; -import net.osmand.plus.ContextMenuAdapter.ItemClickListener; -import net.osmand.plus.ContextMenuItem; -import net.osmand.plus.SQLiteTileSource; -import net.osmand.plus.UiUtilities; -import net.osmand.plus.OsmandApplication; -import net.osmand.plus.OsmandPlugin; -import net.osmand.plus.R; -import net.osmand.plus.activities.LocalIndexHelper; -import net.osmand.plus.activities.LocalIndexHelper.LocalIndexType; -import net.osmand.plus.activities.LocalIndexInfo; -import net.osmand.plus.activities.OsmandBaseExpandableListAdapter; -import net.osmand.plus.base.OsmandExpandableListFragment; -import net.osmand.plus.dialogs.DirectionsDialogs; -import net.osmand.plus.download.DownloadActivity; -import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents; -import net.osmand.plus.download.IndexItem; -import net.osmand.plus.helpers.FileNameTranslationHelper; -import net.osmand.plus.inapp.InAppPurchaseHelper; -import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; -import net.osmand.plus.resources.IncrementalChangesManager; -import net.osmand.util.Algorithms; import android.app.Activity; import android.content.DialogInterface; import android.content.res.Resources; @@ -49,13 +7,6 @@ import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -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.text.Editable; import android.text.TextWatcher; import android.util.TypedValue; @@ -78,6 +29,57 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ActionMode; +import androidx.appcompat.widget.PopupMenu; +import androidx.core.content.ContextCompat; +import androidx.core.view.MenuItemCompat; + +import net.osmand.AndroidUtils; +import net.osmand.Collator; +import net.osmand.IndexConstants; +import net.osmand.OsmAndCollator; +import net.osmand.ResultMatcher; +import net.osmand.map.ITileSource; +import net.osmand.map.TileSourceManager; +import net.osmand.plus.ContextMenuAdapter; +import net.osmand.plus.ContextMenuAdapter.ItemClickListener; +import net.osmand.plus.ContextMenuItem; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandPlugin; +import net.osmand.plus.R; +import net.osmand.plus.SQLiteTileSource; +import net.osmand.plus.UiUtilities; +import net.osmand.plus.activities.LocalIndexHelper; +import net.osmand.plus.activities.LocalIndexHelper.LocalIndexType; +import net.osmand.plus.activities.LocalIndexInfo; +import net.osmand.plus.activities.OsmandBaseExpandableListAdapter; +import net.osmand.plus.base.OsmandExpandableListFragment; +import net.osmand.plus.dialogs.DirectionsDialogs; +import net.osmand.plus.download.DownloadActivity; +import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents; +import net.osmand.plus.download.IndexItem; +import net.osmand.plus.helpers.FileNameTranslationHelper; +import net.osmand.plus.inapp.InAppPurchaseHelper; +import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; +import net.osmand.plus.resources.IncrementalChangesManager; +import net.osmand.util.Algorithms; + +import java.io.File; +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 java.util.regex.Pattern; + public class LocalIndexesFragment extends OsmandExpandableListFragment implements DownloadEvents { public static final Pattern ILLEGAL_FILE_NAME_CHARACTERS = Pattern.compile("[?:\"*|/<>]"); diff --git a/OsmAnd/src/net/osmand/plus/download/ui/SearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/SearchDialogFragment.java index 7da8f572be..d7066f2841 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/SearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/SearchDialogFragment.java @@ -4,11 +4,6 @@ import android.content.res.TypedArray; import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.Toolbar; import android.text.Editable; import android.text.TextWatcher; import android.util.TypedValue; @@ -27,6 +22,12 @@ import android.widget.LinearLayout; import android.widget.ListView; import android.widget.ProgressBar; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentActivity; + import net.osmand.Collator; import net.osmand.CollatorStringMatcher; import net.osmand.OsmAndCollator; diff --git a/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java index f829e35ee2..2ca0da41e4 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java @@ -1,7 +1,24 @@ package net.osmand.plus.download.ui; -import java.util.Comparator; -import java.util.List; +import android.app.Activity; +import android.content.Context; +import android.content.DialogInterface; +import android.graphics.drawable.Drawable; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.view.ViewGroup; +import android.widget.ArrayAdapter; +import android.widget.ListView; +import android.widget.TextView; + +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; +import androidx.core.view.MenuItemCompat; import net.osmand.Collator; import net.osmand.OsmAndCollator; @@ -17,24 +34,9 @@ import net.osmand.plus.download.DownloadResources; import net.osmand.plus.download.IndexItem; import net.osmand.plus.inapp.InAppPurchaseHelper; import net.osmand.util.Algorithms; -import android.app.Activity; -import android.content.Context; -import android.content.DialogInterface; -import android.graphics.drawable.Drawable; -import android.os.Bundle; -import android.support.v4.view.MenuItemCompat; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AlertDialog; -import android.view.LayoutInflater; -import android.view.Menu; -import android.view.MenuInflater; -import android.view.MenuItem; -import android.view.View; -import android.view.View.OnClickListener; -import android.view.ViewGroup; -import android.widget.ArrayAdapter; -import android.widget.ListView; -import android.widget.TextView; + +import java.util.Comparator; +import java.util.List; public class UpdatesIndexFragment extends OsmAndListFragment implements DownloadEvents { private static final int RELOAD_ID = 5; diff --git a/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWelcomeFragment.java b/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWelcomeFragment.java index b5531598a9..52f9f7657c 100644 --- a/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWelcomeFragment.java +++ b/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWelcomeFragment.java @@ -2,15 +2,16 @@ package net.osmand.plus.firstusage; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; -import android.support.v7.widget.AppCompatButton; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.AppCompatButton; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; + import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWizardFragment.java b/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWizardFragment.java index a16d863fd3..a64fde836c 100644 --- a/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWizardFragment.java +++ b/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWizardFragment.java @@ -7,13 +7,6 @@ import android.os.AsyncTask; import android.os.Bundle; import android.os.StatFs; import android.provider.Settings.Secure; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.ActivityCompat; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.AppCompatButton; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -22,6 +15,14 @@ import android.widget.ImageButton; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.AppCompatButton; +import androidx.core.app.ActivityCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; + import net.osmand.AndroidNetworkUtils; import net.osmand.AndroidUtils; import net.osmand.Location; @@ -56,12 +57,10 @@ import org.json.JSONObject; import java.io.File; import java.io.IOException; -import java.text.MessageFormat; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.Timer; import java.util.TimerTask; diff --git a/OsmAnd/src/net/osmand/plus/helpers/AndroidUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/AndroidUiHelper.java index 782c8f94b7..2ed487f736 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/AndroidUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/AndroidUiHelper.java @@ -1,15 +1,17 @@ package net.osmand.plus.helpers; -import net.osmand.PlatformUtil; import android.app.Activity; import android.content.pm.ActivityInfo; import android.content.res.Configuration; -import android.support.annotation.NonNull; import android.util.DisplayMetrics; import android.util.Log; import android.view.Surface; import android.view.View; +import androidx.annotation.NonNull; + +import net.osmand.PlatformUtil; + /** * Created by dummy on 28.01.15. */ diff --git a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java index 86ba6ebe0e..12f2684add 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java +++ b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java @@ -3,10 +3,6 @@ package net.osmand.plus.helpers; import android.content.Context; import android.content.DialogInterface; import android.graphics.drawable.Drawable; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.AlertDialog; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -17,6 +13,11 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; + import net.osmand.CallbackWithObject; import net.osmand.Location; import net.osmand.ResultMatcher; diff --git a/OsmAnd/src/net/osmand/plus/helpers/DiscountHelper.java b/OsmAnd/src/net/osmand/plus/helpers/DiscountHelper.java index cc1867fded..6c7e6b924a 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/DiscountHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/DiscountHelper.java @@ -11,13 +11,14 @@ import android.graphics.drawable.LayerDrawable; import android.net.Uri; import android.os.AsyncTask; import android.provider.Settings.Secure; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; import android.text.TextUtils; import android.util.Log; import android.view.View; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidNetworkUtils; import net.osmand.osm.AbstractPoiType; import net.osmand.osm.MapPoiTypes; diff --git a/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java index 4cc790d587..1012b0d52b 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java @@ -7,23 +7,24 @@ import android.content.Intent; import android.net.Uri; import android.os.Build; import android.os.ParcelFileDescriptor; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; + +import net.osmand.GPXUtilities; +import net.osmand.GPXUtilities.GPXFile; import net.osmand.IndexConstants; import net.osmand.Location; import net.osmand.PlatformUtil; -import net.osmand.aidl.OsmandAidlApi; import net.osmand.aidl.AidlSearchResultWrapper; +import net.osmand.aidl.OsmandAidlApi; import net.osmand.aidl.search.SearchParams; import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.ApplicationMode; import net.osmand.plus.FavouritesDbHelper; -import net.osmand.GPXUtilities; -import net.osmand.GPXUtilities.GPXFile; import net.osmand.plus.MapMarkersHelper; import net.osmand.plus.MapMarkersHelper.MapMarker; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java index 9db441bc31..d90a39518d 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java @@ -13,13 +13,6 @@ import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.ListPopupWindow; -import android.support.v7.widget.SwitchCompat; import android.text.SpannableString; import android.text.style.StyleSpan; import android.util.TypedValue; @@ -38,6 +31,14 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.ListPopupWindow; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; + import com.github.mikephil.charting.charts.HorizontalBarChart; import com.github.mikephil.charting.charts.LineChart; import com.github.mikephil.charting.components.AxisBase; diff --git a/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java b/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java index 9cb66f91d9..a388d0b333 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java @@ -14,11 +14,6 @@ import android.os.Bundle; import android.os.ParcelFileDescriptor; import android.provider.OpenableColumns; import android.provider.Settings; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentManager; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; import android.text.style.ForegroundColorSpan; import android.util.TypedValue; import android.view.LayoutInflater; @@ -29,6 +24,12 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; import net.osmand.GPXUtilities; diff --git a/OsmAnd/src/net/osmand/plus/helpers/LockHelper.java b/OsmAnd/src/net/osmand/plus/helpers/LockHelper.java index 44c58310c0..41ac51bda8 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/LockHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/LockHelper.java @@ -10,8 +10,9 @@ import android.hardware.SensorManager; import android.os.Handler; import android.os.PowerManager; import android.os.PowerManager.WakeLock; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.plus.OsmAndAppCustomization.OsmAndAppCustomizationListener; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index fcc69cb443..19cd646ecb 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -5,12 +5,13 @@ import android.app.Activity; import android.app.ProgressDialog; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.Nullable; import android.view.View; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.Nullable; + import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.TspAnt; diff --git a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java index 18dfac848c..98a26a33f6 100644 --- a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java +++ b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java @@ -3,11 +3,12 @@ package net.osmand.plus.inapp; import android.annotation.SuppressLint; import android.app.Activity; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import com.android.billingclient.api.BillingClient.BillingResponseCode; import com.android.billingclient.api.BillingClient.SkuType; import com.android.billingclient.api.BillingResult; diff --git a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java index 8aaa826658..2fb216419e 100644 --- a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java +++ b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java @@ -3,13 +3,14 @@ package net.osmand.plus.inapp; import android.content.Context; import android.graphics.Color; import android.graphics.Typeface; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.style.ForegroundColorSpan; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import com.android.billingclient.api.SkuDetails; import net.osmand.AndroidUtils; diff --git a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java index 214617ee19..b5b3c654f9 100644 --- a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java +++ b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java @@ -2,8 +2,9 @@ package net.osmand.plus.inapp.util; import android.app.Activity; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.android.billingclient.api.AcknowledgePurchaseParams; import com.android.billingclient.api.AcknowledgePurchaseResponseListener; diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/CountrySelectionFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/CountrySelectionFragment.java index db69ac929f..f070559121 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/CountrySelectionFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/CountrySelectionFragment.java @@ -4,8 +4,6 @@ import android.content.Context; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.ColorInt; -import android.support.annotation.DrawableRes; import android.text.Editable; import android.text.TextWatcher; import android.util.TypedValue; @@ -19,6 +17,9 @@ import android.widget.ImageButton; import android.widget.ListView; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.annotation.DrawableRes; + import net.osmand.map.WorldRegion; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java index dceab09fdd..9c7489a881 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java @@ -11,16 +11,6 @@ import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AlertDialog.Builder; -import android.support.v7.widget.SwitchCompat; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; @@ -34,6 +24,17 @@ import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AlertDialog.Builder; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesHelper.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesHelper.java index d8e53763e8..aa44f127d1 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesHelper.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesHelper.java @@ -5,7 +5,8 @@ import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.AsyncTask; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesSettingsDialogFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesSettingsDialogFragment.java index 780cf2f9f4..bd585b316d 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesSettingsDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesSettingsDialogFragment.java @@ -6,10 +6,6 @@ import android.app.PendingIntent; import android.content.Context; 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.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.widget.AdapterView; @@ -19,13 +15,17 @@ import android.widget.CheckBox; import android.widget.Spinner; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.SwitchCompat; +import androidx.fragment.app.DialogFragment; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.download.AbstractDownloadActivity; -import net.osmand.plus.download.DownloadActivity; import net.osmand.plus.liveupdates.LiveUpdatesHelper.TimeOfDay; import net.osmand.plus.liveupdates.LiveUpdatesHelper.UpdateFrequency; import net.osmand.plus.resources.IncrementalChangesManager; diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/OsmLiveActivity.java b/OsmAnd/src/net/osmand/plus/liveupdates/OsmLiveActivity.java index c7505715a9..ce708fc3ab 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/OsmLiveActivity.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/OsmLiveActivity.java @@ -4,15 +4,17 @@ import android.content.Intent; import android.content.res.Resources; import android.os.AsyncTask; import android.os.Bundle; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.ActionBar; import android.view.MenuItem; import android.view.View; +import androidx.appcompat.app.ActionBar; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.viewpager.widget.ViewPager; + +import com.google.android.material.tabs.TabLayout; + import net.osmand.AndroidNetworkUtils; import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/PerformLiveUpdateAsyncTask.java b/OsmAnd/src/net/osmand/plus/liveupdates/PerformLiveUpdateAsyncTask.java index f7fb65d496..85f33191d6 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/PerformLiveUpdateAsyncTask.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/PerformLiveUpdateAsyncTask.java @@ -4,7 +4,8 @@ import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.os.AsyncTask; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java index 456b720968..6bec905698 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java @@ -7,9 +7,6 @@ import android.content.res.Resources; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.AttrRes; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.MotionEvent; @@ -24,6 +21,10 @@ import android.widget.ProgressBar; import android.widget.Spinner; import android.widget.TextView; +import androidx.annotation.AttrRes; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; + import com.google.gson.Gson; import com.google.gson.JsonSyntaxException; diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java index f5f2d81095..c51e62c988 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java @@ -3,10 +3,6 @@ package net.osmand.plus.liveupdates; import android.app.Activity; import android.app.ProgressDialog; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v7.widget.AppCompatCheckBox; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; @@ -19,6 +15,11 @@ import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.AppCompatCheckBox; +import androidx.fragment.app.Fragment; + import net.osmand.AndroidNetworkUtils; import net.osmand.AndroidUtils; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/UsersReportFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/UsersReportFragment.java index bba2d2155c..2dc66ef10e 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/UsersReportFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/UsersReportFragment.java @@ -1,17 +1,9 @@ package net.osmand.plus.liveupdates; -import net.osmand.plus.R; -import net.osmand.plus.base.BaseOsmAndDialogFragment; -import net.osmand.plus.liveupdates.Protocol.RankingUserByMonthResponse; -import net.osmand.plus.liveupdates.Protocol.UserRankingByMonth; -import net.osmand.plus.liveupdates.ReportsFragment.GetJsonAsyncTask; -import net.osmand.plus.liveupdates.ReportsFragment.GetJsonAsyncTask.OnResponseListener; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.ColorInt; -import android.support.annotation.DrawableRes; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; @@ -21,6 +13,16 @@ import android.widget.ImageButton; import android.widget.ListView; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.annotation.DrawableRes; + +import net.osmand.plus.R; +import net.osmand.plus.base.BaseOsmAndDialogFragment; +import net.osmand.plus.liveupdates.Protocol.RankingUserByMonthResponse; +import net.osmand.plus.liveupdates.Protocol.UserRankingByMonth; +import net.osmand.plus.liveupdates.ReportsFragment.GetJsonAsyncTask; +import net.osmand.plus.liveupdates.ReportsFragment.GetJsonAsyncTask.OnResponseListener; + public class UsersReportFragment extends BaseOsmAndDialogFragment { public static final String URL_REQUEST = "URL_REQUEST"; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/AdditionalActionsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/AdditionalActionsBottomSheetDialogFragment.java index aee76b6e60..41e9b84e5b 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/AdditionalActionsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/AdditionalActionsBottomSheetDialogFragment.java @@ -4,9 +4,6 @@ import android.app.Activity; import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; @@ -18,6 +15,10 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.AndroidUtils; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/BaseMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/BaseMenuController.java index b43ede9bc1..55a808272e 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/BaseMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/BaseMenuController.java @@ -1,8 +1,9 @@ package net.osmand.plus.mapcontextmenu; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java index 4813753927..2d0377ea0d 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java @@ -4,13 +4,14 @@ import android.app.Dialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; import android.util.Pair; import android.view.View; import android.widget.LinearLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; + import net.osmand.CallbackWithObject; import net.osmand.GPXUtilities.GPXFile; import net.osmand.GPXUtilities.WptPt; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java index 9d8bd58b2d..d01e66ca46 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java @@ -10,12 +10,6 @@ import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.view.ContextThemeWrapper; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.TextUtils; @@ -43,6 +37,13 @@ import android.widget.OverScroller; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java index 377df7a9dd..faf5835364 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java @@ -11,12 +11,6 @@ import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.net.Uri; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.drawable.DrawableCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.view.ContextThemeWrapper; import android.text.ClipboardManager; import android.text.SpannableStringBuilder; import android.text.Spanned; @@ -33,6 +27,13 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; + import net.osmand.AndroidUtils; import net.osmand.binary.BinaryMapIndexReader; import net.osmand.data.Amenity; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java index 8d25fae1bb..112e315968 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java @@ -3,11 +3,6 @@ package net.osmand.plus.mapcontextmenu; import android.content.Context; import android.graphics.drawable.Drawable; import android.os.AsyncTask; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.text.SpannableString; import android.text.style.ForegroundColorSpan; import android.util.Pair; @@ -15,6 +10,13 @@ import android.view.View; import android.view.View.OnClickListener; import android.widget.LinearLayout; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + +import net.osmand.GPXUtilities.WptPt; import net.osmand.IndexConstants; import net.osmand.Location; import net.osmand.NativeLibrary.RenderedObject; @@ -29,7 +31,6 @@ import net.osmand.data.PointDescription; import net.osmand.data.TransportStop; import net.osmand.map.OsmandRegions; import net.osmand.map.WorldRegion; -import net.osmand.GPXUtilities.WptPt; import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem; import net.osmand.plus.MapMarkersHelper.MapMarker; import net.osmand.plus.OsmAndFormatter; @@ -80,12 +81,13 @@ import net.osmand.util.Algorithms; import net.osmand.util.MapUtils; import net.osmand.util.OpeningHoursParser.OpeningHours; +import org.apache.commons.logging.Log; + import java.io.IOException; import java.lang.ref.WeakReference; import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import org.apache.commons.logging.Log; public abstract class MenuController extends BaseMenuController implements CollapseExpandListener { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuTitleController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuTitleController.java index 3c544e879e..523ce5fef4 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuTitleController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuTitleController.java @@ -1,7 +1,8 @@ package net.osmand.plus.mapcontextmenu; import android.graphics.drawable.Drawable; -import android.support.annotation.Nullable; + +import androidx.annotation.Nullable; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/TransportStopRouteAdapter.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/TransportStopRouteAdapter.java index 5ba498bbba..4766e6f0cd 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/TransportStopRouteAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/TransportStopRouteAdapter.java @@ -1,15 +1,16 @@ package net.osmand.plus.mapcontextmenu; import android.graphics.drawable.GradientDrawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java index eb3e9f7112..31d2280086 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java @@ -6,9 +6,6 @@ import android.content.res.ColorStateList; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.view.ContextThemeWrapper; import android.text.TextUtils; import android.text.util.Linkify; import android.view.Gravity; @@ -18,6 +15,10 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.data.Amenity; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/FavouritePointMenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/FavouritePointMenuBuilder.java index c9501975f6..4e4dd22668 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/FavouritePointMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/FavouritePointMenuBuilder.java @@ -2,10 +2,11 @@ package net.osmand.plus.mapcontextmenu.builders; import android.content.Context; import android.graphics.Color; -import android.support.annotation.NonNull; import android.view.View; import android.widget.LinearLayout; +import androidx.annotation.NonNull; + import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; import net.osmand.binary.BinaryMapIndexReader; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/GpxItemMenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/GpxItemMenuBuilder.java index fa79c17c72..e9e7ef1076 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/GpxItemMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/GpxItemMenuBuilder.java @@ -1,7 +1,5 @@ package net.osmand.plus.mapcontextmenu.builders; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; import android.util.TypedValue; import android.view.Gravity; import android.view.View; @@ -10,6 +8,9 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; + import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/MapDataMenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/MapDataMenuBuilder.java index 531f6729d1..7b8a062eb8 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/MapDataMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/MapDataMenuBuilder.java @@ -1,6 +1,7 @@ package net.osmand.plus.mapcontextmenu.builders; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; + import net.osmand.plus.activities.MapActivity; import net.osmand.plus.mapcontextmenu.MenuBuilder; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/WptPtMenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/WptPtMenuBuilder.java index a54f3e11db..68c19e8319 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/WptPtMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/WptPtMenuBuilder.java @@ -2,12 +2,13 @@ package net.osmand.plus.mapcontextmenu.builders; import android.content.Context; import android.content.Intent; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; import android.view.View; import android.widget.LinearLayout; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; + import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.WptPt; import net.osmand.data.LatLon; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/AbstractCard.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/AbstractCard.java index 9818980bbe..82d935b091 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/AbstractCard.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/AbstractCard.java @@ -7,10 +7,6 @@ import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.Drawable; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.Toolbar; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; @@ -19,6 +15,11 @@ import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.LinearLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/CardsRowBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/CardsRowBuilder.java index 5fedb55d5a..6e0bec8e56 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/CardsRowBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/CardsRowBuilder.java @@ -1,11 +1,12 @@ package net.osmand.plus.mapcontextmenu.builders.cards; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; + import net.osmand.AndroidUtils; import net.osmand.plus.LockableViewPager; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/ImageCard.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/ImageCard.java index 693d88fe44..a821d8b3cf 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/ImageCard.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/ImageCard.java @@ -4,15 +4,16 @@ import android.content.res.ColorStateList; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.AppCompatButton; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.AppCompatButton; + import net.osmand.AndroidNetworkUtils; import net.osmand.AndroidUtils; import net.osmand.Location; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/NoImagesCard.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/NoImagesCard.java index 81eaf79b98..c20b63870e 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/NoImagesCard.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/NoImagesCard.java @@ -1,13 +1,14 @@ package net.osmand.plus.mapcontextmenu.builders.cards; -import android.support.v4.content.ContextCompat; import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; -import net.osmand.plus.UiUtilities; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.mapillary.MapillaryPlugin; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/dialogs/ContextMenuCardDialog.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/dialogs/ContextMenuCardDialog.java index 65e52f4204..90beeae69c 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/dialogs/ContextMenuCardDialog.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/dialogs/ContextMenuCardDialog.java @@ -1,10 +1,11 @@ package net.osmand.plus.mapcontextmenu.builders.cards.dialogs; import android.os.Bundle; -import android.support.annotation.NonNull; import android.view.Menu; import android.view.View; +import androidx.annotation.NonNull; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/dialogs/ContextMenuCardDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/dialogs/ContextMenuCardDialogFragment.java index 8f864c78ef..8b2934241b 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/dialogs/ContextMenuCardDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/dialogs/ContextMenuCardDialogFragment.java @@ -1,13 +1,6 @@ package net.osmand.plus.mapcontextmenu.builders.cards.dialogs; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.AppCompatImageView; -import android.support.v7.widget.PopupMenu; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -15,6 +8,14 @@ import android.webkit.WebView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.appcompat.widget.PopupMenu; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AMapPointMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AMapPointMenuController.java index e59168a5c2..edbb581c0a 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AMapPointMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AMapPointMenuController.java @@ -5,11 +5,12 @@ import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; import android.util.Pair; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.AndroidUtils; import net.osmand.aidl.AidlContextMenuButtonWrapper; import net.osmand.aidl.AidlContextMenuButtonsWrapper; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AmenityMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AmenityMenuController.java index 48a7765acc..f697c1a403 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AmenityMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AmenityMenuController.java @@ -1,9 +1,10 @@ package net.osmand.plus.mapcontextmenu.controllers; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; import android.text.TextUtils; +import androidx.annotation.NonNull; + import net.osmand.data.Amenity; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java index 1f0f462bb6..b5767ed122 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java @@ -1,8 +1,9 @@ package net.osmand.plus.mapcontextmenu.controllers; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; import net.osmand.data.Amenity; import net.osmand.data.FavouritePoint; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/GpxItemMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/GpxItemMenuController.java index 4afecd6002..899810ecf9 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/GpxItemMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/GpxItemMenuController.java @@ -1,7 +1,8 @@ package net.osmand.plus.mapcontextmenu.controllers; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.data.PointDescription; import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/HistoryMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/HistoryMenuController.java index 60618aa686..446557af96 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/HistoryMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/HistoryMenuController.java @@ -1,7 +1,8 @@ package net.osmand.plus.mapcontextmenu.controllers; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.data.PointDescription; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/ImpassibleRoadsMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/ImpassibleRoadsMenuController.java index 7c78eeface..188ae5c013 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/ImpassibleRoadsMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/ImpassibleRoadsMenuController.java @@ -1,8 +1,9 @@ package net.osmand.plus.mapcontextmenu.controllers; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; + +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; import net.osmand.data.PointDescription; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java index 8cf67a83b7..ecae4fe7f1 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java @@ -5,10 +5,11 @@ import android.content.Intent; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.v7.app.AlertDialog; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; + import net.osmand.AndroidUtils; import net.osmand.IProgress; import net.osmand.IndexConstants; @@ -21,7 +22,6 @@ import net.osmand.plus.activities.LocalIndexHelper; import net.osmand.plus.activities.LocalIndexHelper.LocalIndexType; import net.osmand.plus.activities.LocalIndexInfo; import net.osmand.plus.activities.MapActivity; -import net.osmand.plus.download.DownloadActivity; import net.osmand.plus.download.DownloadActivityType; import net.osmand.plus.download.DownloadIndexesThread; import net.osmand.plus.download.DownloadValidationManager; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapMarkerMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapMarkerMenuController.java index c0a0051463..01a646d08a 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapMarkerMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapMarkerMenuController.java @@ -3,14 +3,13 @@ package net.osmand.plus.mapcontextmenu.controllers; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.graphics.drawable.ShapeDrawable; -import android.graphics.drawable.StateListDrawable; import android.graphics.drawable.shapes.OvalShape; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import net.osmand.AndroidUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import net.osmand.data.PointDescription; import net.osmand.plus.MapMarkersHelper; import net.osmand.plus.MapMarkersHelper.MapMarker; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MyLocationMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MyLocationMenuController.java index 237f3d0daf..71b55e9d71 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MyLocationMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MyLocationMenuController.java @@ -1,10 +1,10 @@ package net.osmand.plus.mapcontextmenu.controllers; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.data.PointDescription; -import net.osmand.plus.ApplicationMode; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.mapcontextmenu.MenuBuilder; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/PointDescriptionMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/PointDescriptionMenuController.java index c810aa2ce8..7362e6ab66 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/PointDescriptionMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/PointDescriptionMenuController.java @@ -1,7 +1,8 @@ package net.osmand.plus.mapcontextmenu.controllers; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.data.PointDescription; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/RenderedObjectMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/RenderedObjectMenuController.java index 0a300013ff..a8654f9ff6 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/RenderedObjectMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/RenderedObjectMenuController.java @@ -1,6 +1,6 @@ package net.osmand.plus.mapcontextmenu.controllers; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import net.osmand.NativeLibrary.RenderedObject; import net.osmand.data.LatLon; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TargetPointMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TargetPointMenuController.java index d0a0f11b40..5cf76ab694 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TargetPointMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TargetPointMenuController.java @@ -1,7 +1,8 @@ package net.osmand.plus.mapcontextmenu.controllers; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.data.PointDescription; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java index 99850be914..0b08118495 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java @@ -1,10 +1,11 @@ package net.osmand.plus.mapcontextmenu.controllers; -import android.support.annotation.NonNull; import android.text.TextUtils; import android.view.View; import android.view.View.OnClickListener; +import androidx.annotation.NonNull; + import net.osmand.binary.OsmandOdb.TransportRouteStop; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportStopController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportStopController.java index e66159672b..8198833bd7 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportStopController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportStopController.java @@ -1,7 +1,7 @@ package net.osmand.plus.mapcontextmenu.controllers; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.data.Amenity; import net.osmand.data.LatLon; @@ -16,7 +16,6 @@ import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.mapcontextmenu.MenuController; import net.osmand.plus.mapcontextmenu.builders.TransportStopMenuBuilder; -import net.osmand.plus.resources.TransportIndexRepository; import net.osmand.plus.transport.TransportStopRoute; import net.osmand.plus.transport.TransportStopType; import net.osmand.util.Algorithms; @@ -24,7 +23,6 @@ import net.osmand.util.MapUtils; import java.io.IOException; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/WptPtMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/WptPtMenuController.java index 921ebb2d18..d692c153a4 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/WptPtMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/WptPtMenuController.java @@ -1,8 +1,9 @@ package net.osmand.plus.mapcontextmenu.controllers; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; + +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; import net.osmand.GPXUtilities.WptPt; import net.osmand.data.LatLon; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/EditCategoryDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/EditCategoryDialogFragment.java index 826d5e01b5..72fcb1b3b1 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/EditCategoryDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/EditCategoryDialogFragment.java @@ -3,17 +3,18 @@ package net.osmand.plus.mapcontextmenu.editors; import android.app.Dialog; import android.content.DialogInterface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentActivity; -import android.support.v7.app.AlertDialog; import android.view.View; import android.widget.AdapterView; import android.widget.Button; import android.widget.EditText; import android.widget.Spinner; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentActivity; + import net.osmand.plus.FavouritesDbHelper; import net.osmand.plus.FavouritesDbHelper.FavoriteGroup; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditor.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditor.java index b7258b63c5..b72679e6c8 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditor.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditor.java @@ -1,6 +1,6 @@ package net.osmand.plus.mapcontextmenu.editors; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditorFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditorFragment.java index be3f7a541c..244c923770 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditorFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditorFragment.java @@ -4,15 +4,16 @@ import android.content.Context; import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v7.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.FragmentActivity; + import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.plus.FavouritesDbHelper; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/MapMarkerEditor.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/MapMarkerEditor.java index 7faece2036..b90cd2c334 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/MapMarkerEditor.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/MapMarkerEditor.java @@ -1,6 +1,6 @@ package net.osmand.plus.mapcontextmenu.editors; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import net.osmand.plus.MapMarkersHelper.MapMarker; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/MapMarkerEditorFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/MapMarkerEditorFragment.java index a9a3573d02..e19914f3f0 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/MapMarkerEditorFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/MapMarkerEditorFragment.java @@ -5,13 +5,14 @@ import android.content.Context; import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.data.PointDescription; import net.osmand.plus.MapMarkersHelper.MapMarker; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditor.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditor.java index 31af59959c..033525a91c 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditor.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditor.java @@ -1,9 +1,10 @@ package net.osmand.plus.mapcontextmenu.editors; import android.app.Activity; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java index b3b3e5d27f..121a20506f 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java @@ -7,12 +7,6 @@ import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; import android.os.IBinder; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.Toolbar; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.MotionEvent; @@ -24,6 +18,13 @@ import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentActivity; + import net.osmand.AndroidUtils; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/RtePtEditor.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/RtePtEditor.java index 6e072e1ba8..feedd4a9cc 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/RtePtEditor.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/RtePtEditor.java @@ -1,6 +1,6 @@ package net.osmand.plus.mapcontextmenu.editors; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/RtePtEditorFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/RtePtEditorFragment.java index a72801192a..840ebba24f 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/RtePtEditorFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/RtePtEditorFragment.java @@ -1,6 +1,6 @@ package net.osmand.plus.mapcontextmenu.editors; -import android.support.v4.app.DialogFragment; +import androidx.fragment.app.DialogFragment; import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.WptPt; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/SelectCategoryDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/SelectCategoryDialogFragment.java index 3005a014d5..2b9df31698 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/SelectCategoryDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/SelectCategoryDialogFragment.java @@ -5,29 +5,28 @@ import android.app.Dialog; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentActivity; + import net.osmand.AndroidUtils; -import net.osmand.plus.FavouritesDbHelper; import net.osmand.GPXUtilities.GPXFile; -import net.osmand.plus.UiUtilities; +import net.osmand.plus.FavouritesDbHelper; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; import java.util.List; import java.util.Map; import java.util.Set; -import static net.osmand.plus.FavouritesDbHelper.FavoriteGroup.PERSONAL_CATEGORY; - public class SelectCategoryDialogFragment extends DialogFragment { public static final String TAG = SelectCategoryDialogFragment.class.getSimpleName(); diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditor.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditor.java index e628c94654..4474de7deb 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditor.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditor.java @@ -1,11 +1,11 @@ package net.osmand.plus.mapcontextmenu.editors; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; -import net.osmand.data.LatLon; -import net.osmand.plus.FavouritesDbHelper; import net.osmand.GPXUtilities.GPXFile; import net.osmand.GPXUtilities.WptPt; +import net.osmand.data.LatLon; +import net.osmand.plus.FavouritesDbHelper; import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragment.java index 10875fa392..cefbebf253 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragment.java @@ -6,15 +6,16 @@ import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; import android.view.View; -import net.osmand.data.LatLon; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; + import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; import net.osmand.GPXUtilities.WptPt; +import net.osmand.data.LatLon; import net.osmand.data.WptLocationPoint; import net.osmand.plus.GpxSelectionHelper; import net.osmand.plus.MapMarkersHelper; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenu.java index 74c64c7889..e2772ecdf0 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenu.java @@ -1,7 +1,5 @@ package net.osmand.plus.mapcontextmenu.other; -import android.support.v4.app.Fragment; - import net.osmand.plus.activities.MapActivity; import net.osmand.plus.mapcontextmenu.BaseMenuController; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenuFragment.java index f14ec16ba4..eb85e274d3 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenuFragment.java @@ -2,16 +2,17 @@ package net.osmand.plus.mapcontextmenu.other; import android.app.Activity; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v7.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageButton; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.fragment.app.Fragment; + import net.osmand.AndroidUtils; import net.osmand.data.LatLon; import net.osmand.plus.ApplicationMode; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesAdapter.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesAdapter.java index 5e8f0f853a..cb9f9d0d7b 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesAdapter.java @@ -1,19 +1,20 @@ package net.osmand.plus.mapcontextmenu.other; -import java.util.List; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.recyclerview.widget.RecyclerView; import net.osmand.data.FavouritePoint; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities.UpdateLocationViewCache; import net.osmand.plus.base.FavoriteImageDrawable; -import android.app.Activity; -import android.support.v7.widget.RecyclerView; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; -import android.widget.TextView; + +import java.util.List; public class FavouritesAdapter extends RecyclerView.Adapter { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesBottomSheetMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesBottomSheetMenuFragment.java index 3966c2b00f..a0e31623d5 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesBottomSheetMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesBottomSheetMenuFragment.java @@ -1,17 +1,16 @@ package net.osmand.plus.mapcontextmenu.other; -import android.Manifest; import android.app.Activity; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; -import android.support.v4.app.Fragment; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.ContextThemeWrapper; import android.view.View; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.data.FavouritePoint; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenu.java index 08f244b67a..1e54f3bd88 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenu.java @@ -1,8 +1,8 @@ package net.osmand.plus.mapcontextmenu.other; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java index f3da0f7801..d7aefdab98 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java @@ -4,9 +4,6 @@ import android.app.Activity; import android.content.Context; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -18,6 +15,10 @@ import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; + import com.github.ksoichiro.android.observablescrollview.ObservableListView; import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; import com.github.ksoichiro.android.observablescrollview.ScrollState; @@ -26,7 +27,6 @@ import net.osmand.AndroidUtils; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.mapcontextmenu.other.MapMultiSelectionMenu.MenuObject; -import net.osmand.plus.routepreparationmenu.MapRouteInfoMenu; import java.util.LinkedList; import java.util.List; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MultiSelectionArrayAdapter.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MultiSelectionArrayAdapter.java index 2a5fddd890..a76cfba5f5 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MultiSelectionArrayAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MultiSelectionArrayAdapter.java @@ -1,18 +1,19 @@ package net.osmand.plus.mapcontextmenu.other; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; -import net.osmand.plus.UiUtilities; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; import java.util.List; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java index 766a11b004..ba5792988c 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java @@ -2,9 +2,6 @@ package net.osmand.plus.mapcontextmenu.other; import android.content.DialogInterface; import android.content.Intent; -import android.support.annotation.NonNull; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.PopupMenu; import android.util.TypedValue; import android.view.MenuItem; import android.view.View; @@ -17,12 +14,16 @@ import android.widget.CompoundButton; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.PopupMenu; + import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; +import net.osmand.GPXUtilities; import net.osmand.plus.ApplicationMode; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; -import net.osmand.GPXUtilities; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/ShareMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/ShareMenu.java index 84b444490a..c32a8281b4 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/ShareMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/ShareMenu.java @@ -3,11 +3,12 @@ package net.osmand.plus.mapcontextmenu.other; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.text.TextUtilsCompat; -import android.support.v4.view.ViewCompat; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.core.text.TextUtilsCompat; +import androidx.core.view.ViewCompat; + import net.osmand.data.LatLon; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/TrackDetailsMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/TrackDetailsMenu.java index 5f4e0a75b0..f5a27329b0 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/TrackDetailsMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/TrackDetailsMenu.java @@ -2,15 +2,16 @@ package net.osmand.plus.mapcontextmenu.other; import android.content.Context; import android.graphics.Matrix; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.PopupMenu; import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.PopupMenu; + import com.github.mikephil.charting.charts.LineChart; import com.github.mikephil.charting.data.Entry; import com.github.mikephil.charting.data.LineData; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/TrackDetailsMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/TrackDetailsMenuFragment.java index 3777d66bb7..c4e6b50eb0 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/TrackDetailsMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/TrackDetailsMenuFragment.java @@ -2,11 +2,6 @@ package net.osmand.plus.mapcontextmenu.other; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v7.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -15,6 +10,12 @@ import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryAutoCompleteAdapter.java b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryAutoCompleteAdapter.java index 5b0f88a651..5aeac322a5 100644 --- a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryAutoCompleteAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryAutoCompleteAdapter.java @@ -5,9 +5,6 @@ import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Build; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.Log; import android.util.Pair; import android.util.TypedValue; @@ -20,6 +17,10 @@ import android.widget.Filterable; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.osm.io.NetworkUtils; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryFiltersFragment.java b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryFiltersFragment.java index c22b78ecf4..dc17ec9050 100644 --- a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryFiltersFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryFiltersFragment.java @@ -5,10 +5,6 @@ import android.app.DatePickerDialog; import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.AppCompatImageView; -import android.support.v7.widget.AppCompatTextView; import android.text.Editable; import android.text.TextWatcher; import android.view.ContextThemeWrapper; @@ -26,6 +22,11 @@ import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.appcompat.widget.AppCompatTextView; +import androidx.core.content.ContextCompat; + import net.osmand.map.TileSourceManager; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryImageDialog.java b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryImageDialog.java index b64c8a620b..7b9cd23b69 100644 --- a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryImageDialog.java +++ b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryImageDialog.java @@ -6,8 +6,6 @@ import android.graphics.Color; import android.graphics.drawable.BitmapDrawable; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.util.Pair; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -20,6 +18,9 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ProgressBar; +import androidx.annotation.NonNull; +import androidx.core.util.Pair; + import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.Point; @@ -32,8 +33,8 @@ import net.osmand.data.QuadRect; import net.osmand.data.RotatedTileBox; import net.osmand.map.ITileSource; import net.osmand.map.TileSourceManager; -import net.osmand.plus.UiUtilities; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.mapcontextmenu.MenuBuilder; import net.osmand.plus.mapcontextmenu.builders.cards.dialogs.ContextMenuCardDialog; diff --git a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryInstallDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryInstallDialogFragment.java index 67cccb2e4d..5397142723 100644 --- a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryInstallDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryInstallDialogFragment.java @@ -3,9 +3,10 @@ package net.osmand.plus.mapillary; 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 androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; diff --git a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryMenuController.java b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryMenuController.java index f7b97acfc5..37bedfd02e 100644 --- a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryMenuController.java @@ -1,7 +1,8 @@ package net.osmand.plus.mapillary; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.data.PointDescription; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java index e3ef951edc..fc8b7d8a55 100644 --- a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java +++ b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java @@ -5,14 +5,16 @@ import android.content.ActivityNotFoundException; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentActivity; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.CompoundButton; + +import androidx.annotation.NonNull; +import androidx.appcompat.widget.SwitchCompat; +import androidx.fragment.app.FragmentActivity; + import net.osmand.AndroidUtils; import net.osmand.map.ITileSource; import net.osmand.map.TileSourceManager; @@ -28,7 +30,6 @@ import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivityLayers; import net.osmand.plus.base.BottomSheetDialogFragment; import net.osmand.plus.dashboard.DashboardOnMap; -import net.osmand.plus.settings.BaseSettingsFragment; import net.osmand.plus.views.MapInfoLayer; import net.osmand.plus.views.MapTileLayer; import net.osmand.plus.views.OsmandMapTileView; diff --git a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryVectorLayer.java b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryVectorLayer.java index 3288b43b82..3c2f4d8c33 100644 --- a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryVectorLayer.java +++ b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryVectorLayer.java @@ -5,7 +5,8 @@ import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PointF; -import android.support.v4.content.ContextCompat; + +import androidx.core.content.ContextCompat; import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Geometry; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/AddFavouritesGroupBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/AddFavouritesGroupBottomSheetDialogFragment.java index 4808a70d70..0e6b31f4f4 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/AddFavouritesGroupBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/AddFavouritesGroupBottomSheetDialogFragment.java @@ -1,7 +1,8 @@ package net.osmand.plus.mapmarkers; import android.os.Bundle; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.data.FavouritePoint; import net.osmand.plus.FavouritesDbHelper; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/AddGroupBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/AddGroupBottomSheetDialogFragment.java index 0043a41070..a066ca9c0a 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/AddGroupBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/AddGroupBottomSheetDialogFragment.java @@ -2,12 +2,12 @@ package net.osmand.plus.mapmarkers; import android.app.Dialog; import android.os.Bundle; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.ContextThemeWrapper; import android.view.View; -import net.osmand.plus.MapMarkersHelper.MapMarkersGroup; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.R; import net.osmand.plus.base.MenuBottomSheetDialogFragment; import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/AddTracksGroupBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/AddTracksGroupBottomSheetDialogFragment.java index d9a8d01dce..d1005e35e8 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/AddTracksGroupBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/AddTracksGroupBottomSheetDialogFragment.java @@ -3,13 +3,14 @@ package net.osmand.plus.mapmarkers; import android.annotation.SuppressLint; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; import net.osmand.GPXUtilities.GPXTrackAnalysis; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java index 3ed13c1ffd..810ca967a6 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java @@ -13,21 +13,6 @@ import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.IdRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.drawable.DrawableCompat; -import android.support.v4.widget.TextViewCompat; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.PopupMenu; -import android.support.v7.widget.RecyclerView; import android.text.Editable; import android.text.InputType; import android.text.TextWatcher; @@ -52,12 +37,29 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.IdRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.PopupMenu; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; +import androidx.core.widget.TextViewCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.google.android.material.snackbar.Snackbar; + import net.osmand.AndroidUtils; -import net.osmand.IndexConstants; -import net.osmand.Location; import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; import net.osmand.GPXUtilities.WptPt; +import net.osmand.IndexConstants; +import net.osmand.Location; import net.osmand.plus.GpxSelectionHelper; import net.osmand.plus.MapMarkersHelper; import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/DirectionIndicationDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/DirectionIndicationDialogFragment.java index e3e5d8926d..ae2698ed0e 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/DirectionIndicationDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/DirectionIndicationDialogFragment.java @@ -7,10 +7,6 @@ import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.ListPopupWindow; -import android.support.v7.widget.Toolbar; import android.text.SpannableString; import android.text.style.ForegroundColorSpan; import android.view.Gravity; @@ -24,6 +20,11 @@ import android.widget.ImageView; import android.widget.RadioButton; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.ListPopupWindow; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; + import com.github.ksoichiro.android.observablescrollview.ObservableScrollView; import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; import com.github.ksoichiro.android.observablescrollview.ScrollState; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkerSelectionFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkerSelectionFragment.java index bb7bb67b57..fd63e7bd3e 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkerSelectionFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkerSelectionFragment.java @@ -2,7 +2,6 @@ package net.osmand.plus.mapmarkers; import android.content.Context; import android.os.Bundle; -import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -11,6 +10,8 @@ import android.widget.ArrayAdapter; import android.widget.ImageButton; import android.widget.ListView; +import androidx.annotation.Nullable; + import net.osmand.AndroidUtils; import net.osmand.data.LatLon; import net.osmand.plus.MapMarkersHelper.MapMarker; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersActiveFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersActiveFragment.java index 55292080fd..b893fbe5c8 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersActiveFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersActiveFragment.java @@ -2,24 +2,24 @@ package net.osmand.plus.mapmarkers; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import net.osmand.GPXUtilities.WptPt; import net.osmand.Location; import net.osmand.data.Amenity; import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; -import net.osmand.data.LocationPoint; import net.osmand.data.PointDescription; -import net.osmand.GPXUtilities.WptPt; import net.osmand.data.WptLocationPoint; import net.osmand.plus.MapMarkersHelper.MapMarker; import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener; @@ -27,8 +27,6 @@ import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; -import net.osmand.plus.base.MapViewTrackingUtilities; -import net.osmand.plus.dashboard.DashLocationFragment; import net.osmand.plus.mapmarkers.adapters.MapMarkersActiveAdapter; import net.osmand.plus.mapmarkers.adapters.MapMarkersActiveAdapter.MapMarkersActiveAdapterListener; import net.osmand.plus.mapmarkers.adapters.MapMarkersItemTouchHelperCallback; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDbHelper.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDbHelper.java index 51e3825f77..89137c3473 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDbHelper.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDbHelper.java @@ -1,6 +1,6 @@ package net.osmand.plus.mapmarkers; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDialogFragment.java index cbb0bd2764..335bfeabf6 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDialogFragment.java @@ -5,16 +5,6 @@ import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.BottomNavigationView; -import android.support.design.widget.Snackbar; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.Toolbar; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; @@ -23,6 +13,18 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; + +import com.google.android.material.bottomnavigation.BottomNavigationView; +import com.google.android.material.snackbar.Snackbar; + import net.osmand.Location; import net.osmand.data.LatLon; import net.osmand.plus.LockableViewPager; @@ -48,7 +50,7 @@ import java.util.List; import static net.osmand.plus.mapmarkers.OptionsBottomSheetDialogFragment.GROUPS_MARKERS_MENU; import static net.osmand.plus.mapmarkers.OptionsBottomSheetDialogFragment.HISTORY_MARKERS_MENU; -public class MapMarkersDialogFragment extends android.support.v4.app.DialogFragment implements OnGroupSyncedListener { +public class MapMarkersDialogFragment extends DialogFragment implements OnGroupSyncedListener { public static final String TAG = "MapMarkersDialogFragment"; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersGroupsFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersGroupsFragment.java index f176c016c2..4e5c77dd89 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersGroupsFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersGroupsFragment.java @@ -9,20 +9,21 @@ import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; -import net.osmand.AndroidUtils; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.google.android.material.snackbar.Snackbar; + import net.osmand.GPXUtilities.WptPt; import net.osmand.Location; import net.osmand.data.Amenity; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersHistoryFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersHistoryFragment.java index 5729e38bbf..d7efc365f6 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersHistoryFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersHistoryFragment.java @@ -9,19 +9,20 @@ import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; -import net.osmand.AndroidUtils; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.google.android.material.snackbar.Snackbar; + import net.osmand.plus.MapMarkersHelper; import net.osmand.plus.MapMarkersHelper.MapMarker; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/OptionsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/OptionsBottomSheetDialogFragment.java index 32f80ffc7f..e6394f2422 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/OptionsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/OptionsBottomSheetDialogFragment.java @@ -3,8 +3,6 @@ package net.osmand.plus.mapmarkers; import android.app.Activity; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; @@ -12,6 +10,9 @@ import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.widget.ImageView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.AndroidUtils; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java index 8ec8020ec6..59e7e700e1 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java @@ -6,17 +6,6 @@ import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; -import android.support.v7.widget.helper.ItemTouchHelper; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; @@ -28,15 +17,28 @@ import android.widget.LinearLayout; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.google.android.material.snackbar.Snackbar; + import net.osmand.AndroidUtils; +import net.osmand.GPXUtilities.TrkSegment; +import net.osmand.GPXUtilities.WptPt; import net.osmand.Location; import net.osmand.TspAnt; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.data.RotatedTileBox; import net.osmand.plus.ApplicationMode; -import net.osmand.GPXUtilities.TrkSegment; -import net.osmand.GPXUtilities.WptPt; import net.osmand.plus.MapMarkersHelper; import net.osmand.plus.MapMarkersHelper.MapMarker; import net.osmand.plus.OsmAndFormatter; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/SaveAsTrackBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/SaveAsTrackBottomSheetDialogFragment.java index 0c893db19b..48b0d54cfc 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/SaveAsTrackBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/SaveAsTrackBottomSheetDialogFragment.java @@ -2,10 +2,6 @@ package net.osmand.plus.mapmarkers; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.TextInputLayout; -import android.support.v4.content.ContextCompat; import android.text.format.DateFormat; import android.view.ContextThemeWrapper; import android.view.Gravity; @@ -19,13 +15,19 @@ import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + +import com.google.android.material.textfield.TextInputLayout; + import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.plus.OsmandApplication; -import net.osmand.plus.widgets.OsmandTextFieldBoxes; import net.osmand.plus.R; import net.osmand.plus.base.BottomSheetDialogFragment; import net.osmand.plus.helpers.AndroidUiHelper; +import net.osmand.plus.widgets.OsmandTextFieldBoxes; import java.io.File; import java.util.Date; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/SelectWptCategoriesBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/SelectWptCategoriesBottomSheetDialogFragment.java index 83f23ac7e9..f5255f0d25 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/SelectWptCategoriesBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/SelectWptCategoriesBottomSheetDialogFragment.java @@ -1,11 +1,12 @@ package net.osmand.plus.mapmarkers; import android.os.Bundle; -import android.support.annotation.Nullable; import android.view.View; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; +import androidx.annotation.Nullable; + import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; import net.osmand.GPXUtilities.WptPt; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/CoordinateInputAdapter.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/CoordinateInputAdapter.java index e24b867cb2..cc48e72a76 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/CoordinateInputAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/CoordinateInputAdapter.java @@ -1,16 +1,17 @@ package net.osmand.plus.mapmarkers.adapters; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.AndroidUtils; import net.osmand.GPXUtilities.GPXFile; import net.osmand.GPXUtilities.WptPt; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/FavouritesGroupsAdapter.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/FavouritesGroupsAdapter.java index fd9373d3b9..9b9a8bd7a5 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/FavouritesGroupsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/FavouritesGroupsAdapter.java @@ -2,7 +2,8 @@ package net.osmand.plus.mapmarkers.adapters; import android.content.Context; import android.graphics.Color; -import android.support.v7.widget.RecyclerView; + +import androidx.recyclerview.widget.RecyclerView; import net.osmand.plus.FavouritesDbHelper.FavoriteGroup; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/GroupsAdapter.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/GroupsAdapter.java index 226924d266..5a6e541fa6 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/GroupsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/GroupsAdapter.java @@ -1,14 +1,15 @@ package net.osmand.plus.mapmarkers.adapters; import android.content.Context; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import net.osmand.plus.UiUtilities; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; public abstract class GroupsAdapter extends RecyclerView.Adapter { diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkerCategoriesViewHolder.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkerCategoriesViewHolder.java index 0fd33e1c42..3551b46171 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkerCategoriesViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkerCategoriesViewHolder.java @@ -1,13 +1,11 @@ package net.osmand.plus.mapmarkers.adapters; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.SwitchCompat; import android.view.View; -import android.widget.ImageButton; -import android.widget.ImageView; import android.widget.TextView; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.R; public class MapMarkerCategoriesViewHolder extends RecyclerView.ViewHolder { diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkerHeaderViewHolder.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkerHeaderViewHolder.java index b0e77dafb4..54bc803920 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkerHeaderViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkerHeaderViewHolder.java @@ -1,12 +1,12 @@ package net.osmand.plus.mapmarkers.adapters; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.SwitchCompat; import android.view.View; -import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; +import androidx.appcompat.widget.SwitchCompat; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.R; public class MapMarkerHeaderViewHolder extends RecyclerView.ViewHolder { diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkerItemViewHolder.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkerItemViewHolder.java index b0340ea467..12f565fb11 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkerItemViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkerItemViewHolder.java @@ -1,12 +1,13 @@ package net.osmand.plus.mapmarkers.adapters; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.CheckBox; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.R; public class MapMarkerItemViewHolder extends RecyclerView.ViewHolder { diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersActiveAdapter.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersActiveAdapter.java index 3d487e3831..fb99d047f1 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersActiveAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersActiveAdapter.java @@ -1,22 +1,24 @@ package net.osmand.plus.mapmarkers.adapters; -import android.support.design.widget.Snackbar; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.MotionEventCompat; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; -import net.osmand.AndroidUtils; + +import androidx.core.content.ContextCompat; +import androidx.core.view.MotionEventCompat; +import androidx.recyclerview.widget.RecyclerView; + +import com.google.android.material.snackbar.Snackbar; + import net.osmand.data.LatLon; -import net.osmand.plus.OsmAndFormatter; -import net.osmand.plus.UiUtilities; import net.osmand.plus.MapMarkersHelper; import net.osmand.plus.MapMarkersHelper.MapMarker; import net.osmand.plus.MapMarkersHelper.MapMarkersGroup; +import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; import net.osmand.plus.UiUtilities.UpdateLocationViewCache; import net.osmand.plus.activities.MapActivity; import net.osmand.util.Algorithms; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupHeaderViewHolder.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupHeaderViewHolder.java index 5f1d6ad17e..b20567d305 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupHeaderViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupHeaderViewHolder.java @@ -1,9 +1,10 @@ package net.osmand.plus.mapmarkers.adapters; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.TextView; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.R; public class MapMarkersGroupHeaderViewHolder extends RecyclerView.ViewHolder { diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupViewHolder.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupViewHolder.java index 2de8773582..cdb3e028a4 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupViewHolder.java @@ -1,10 +1,11 @@ package net.osmand.plus.mapmarkers.adapters; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.R; public class MapMarkersGroupViewHolder extends RecyclerView.ViewHolder { diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupsAdapter.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupsAdapter.java index 8e22fb2706..c4f95fc9fa 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupsAdapter.java @@ -1,21 +1,23 @@ package net.osmand.plus.mapmarkers.adapters; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CompoundButton; import android.widget.ImageView; -import net.osmand.IndexConstants; -import net.osmand.data.LatLon; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; + +import com.google.android.material.snackbar.Snackbar; + import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; +import net.osmand.IndexConstants; +import net.osmand.data.LatLon; import net.osmand.plus.GpxSelectionHelper; import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile; import net.osmand.plus.MapMarkersHelper; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersHistoryAdapter.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersHistoryAdapter.java index a35e0e1634..1bd43aa669 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersHistoryAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersHistoryAdapter.java @@ -1,18 +1,19 @@ package net.osmand.plus.mapmarkers.adapters; -import android.support.design.widget.Snackbar; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import net.osmand.AndroidUtils; -import net.osmand.plus.OsmAndFormatter; -import net.osmand.plus.UiUtilities; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; + +import com.google.android.material.snackbar.Snackbar; + import net.osmand.plus.MapMarkersHelper.MapMarker; +import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; import java.text.SimpleDateFormat; import java.util.ArrayList; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersItemTouchHelperCallback.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersItemTouchHelperCallback.java index 1fb9ec755f..ee19d38c48 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersItemTouchHelperCallback.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersItemTouchHelperCallback.java @@ -7,11 +7,12 @@ import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; import android.view.View; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersListAdapter.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersListAdapter.java index 19f48003c9..88b43b34df 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersListAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersListAdapter.java @@ -1,8 +1,5 @@ package net.osmand.plus.mapmarkers.adapters; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.MotionEventCompat; -import android.support.v7.widget.RecyclerView; import android.util.Pair; import android.util.TypedValue; import android.view.LayoutInflater; @@ -10,17 +7,21 @@ import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; +import androidx.core.content.ContextCompat; +import androidx.core.view.MotionEventCompat; +import androidx.recyclerview.widget.RecyclerView; + +import net.osmand.GPXUtilities.WptPt; import net.osmand.Location; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; -import net.osmand.GPXUtilities.WptPt; import net.osmand.plus.GeocodingLookupService.AddressLookupRequest; import net.osmand.plus.GeocodingLookupService.OnAddressLookupResult; -import net.osmand.plus.UiUtilities; import net.osmand.plus.MapMarkersHelper.MapMarker; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; import net.osmand.util.MapUtils; diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersShowHideHistoryViewHolder.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersShowHideHistoryViewHolder.java index 3783c6f294..2fc5f9aa17 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersShowHideHistoryViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersShowHideHistoryViewHolder.java @@ -1,9 +1,10 @@ package net.osmand.plus.mapmarkers.adapters; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.TextView; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.R; public class MapMarkersShowHideHistoryViewHolder extends RecyclerView.ViewHolder { diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/TracksGroupsAdapter.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/TracksGroupsAdapter.java index 93b8dae393..2d8baad26c 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/TracksGroupsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/TracksGroupsAdapter.java @@ -1,10 +1,11 @@ package net.osmand.plus.mapmarkers.adapters; import android.content.Context; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; import android.view.View; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.GPXUtilities.GPXTrackAnalysis; import net.osmand.plus.GPXDatabase.GpxDataItem; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java index e753bdfda2..f5d606bf0b 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java @@ -1,8 +1,9 @@ package net.osmand.plus.measurementtool; -import android.support.annotation.Nullable; import android.util.Pair; +import androidx.annotation.Nullable; + import net.osmand.GPXUtilities.TrkSegment; import net.osmand.GPXUtilities.WptPt; import net.osmand.Location; diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index 17b60ebf0e..a2e06516f3 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -8,18 +8,6 @@ import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v4.widget.TextViewCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.SwitchCompat; -import android.support.v7.widget.helper.ItemTouchHelper; import android.text.Editable; import android.text.TextWatcher; import android.util.TypedValue; @@ -34,6 +22,19 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.core.widget.TextViewCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; import net.osmand.GPXUtilities; diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/RecyclerViewFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/RecyclerViewFragment.java index fe54a84683..771e641079 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/RecyclerViewFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/RecyclerViewFragment.java @@ -1,10 +1,6 @@ package net.osmand.plus.measurementtool; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; import android.util.TypedValue; import android.view.Gravity; import android.view.LayoutInflater; @@ -14,6 +10,11 @@ import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout.LayoutParams; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.AndroidUtils; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/SelectedPointBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/SelectedPointBottomSheetDialogFragment.java index 7e47fc2e6e..2ccda82c10 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/SelectedPointBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/SelectedPointBottomSheetDialogFragment.java @@ -3,11 +3,12 @@ package net.osmand.plus.measurementtool; import android.app.Activity; import android.content.DialogInterface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.GPXUtilities.WptPt; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/SnapToRoadBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/SnapToRoadBottomSheetDialogFragment.java index 0b711f6e3f..d3919b1b30 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/SnapToRoadBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/SnapToRoadBottomSheetDialogFragment.java @@ -2,8 +2,6 @@ package net.osmand.plus.measurementtool; import android.app.Dialog; import android.content.DialogInterface; -import android.support.design.widget.BottomSheetBehavior; -import android.support.design.widget.BottomSheetDialog; import android.view.ContextThemeWrapper; import android.view.View; import android.view.Window; @@ -13,6 +11,10 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import com.google.android.material.bottomsheet.BottomSheetBehavior; +import com.google.android.material.bottomsheet.BottomSheetDialog; +import com.google.android.material.bottomsheet.BottomSheetDialogFragment; + import net.osmand.AndroidUtils; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; @@ -23,7 +25,7 @@ import net.osmand.plus.helpers.AndroidUiHelper; import java.util.ArrayList; import java.util.List; -public class SnapToRoadBottomSheetDialogFragment extends android.support.design.widget.BottomSheetDialogFragment { +public class SnapToRoadBottomSheetDialogFragment extends BottomSheetDialogFragment { public static final String TAG = "SnapToRoadBottomSheetDialogFragment"; @@ -99,7 +101,7 @@ public class SnapToRoadBottomSheetDialogFragment extends android.support.design. @Override public void onShow(DialogInterface dialogInterface) { BottomSheetDialog dialog = (BottomSheetDialog) dialogInterface; - FrameLayout bottomSheet = (FrameLayout) dialog.findViewById(android.support.design.R.id.design_bottom_sheet); + FrameLayout bottomSheet = (FrameLayout) dialog.findViewById(com.google.android.material.R.id.design_bottom_sheet); BottomSheetBehavior.from(bottomSheet).setState(BottomSheetBehavior.STATE_EXPANDED); } }); diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java b/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java index 9e0b157c9e..ff034478d8 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java @@ -1,9 +1,5 @@ package net.osmand.plus.measurementtool.adapter; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.MotionEventCompat; -import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.MotionEvent; @@ -13,6 +9,11 @@ import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.core.view.MotionEventCompat; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.GPXUtilities.WptPt; import net.osmand.Location; import net.osmand.plus.OsmAndFormatter; diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/command/MeasurementCommandManager.java b/OsmAnd/src/net/osmand/plus/measurementtool/command/MeasurementCommandManager.java index 4261271adb..f1548ada12 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/command/MeasurementCommandManager.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/command/MeasurementCommandManager.java @@ -1,6 +1,6 @@ package net.osmand.plus.measurementtool.command; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import net.osmand.plus.measurementtool.MeasurementToolLayer; import net.osmand.plus.measurementtool.command.MeasurementModeCommand.MeasurementCommandType; diff --git a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java index 9b05493363..052480cbf5 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java @@ -4,11 +4,12 @@ import android.content.Intent; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.v4.app.FragmentManager; -import android.support.v7.preference.Preference; import android.text.SpannableString; import android.text.SpannableStringBuilder; +import androidx.fragment.app.FragmentManager; +import androidx.preference.Preference; + import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmAndAppCustomization; import net.osmand.plus.OsmandPlugin; diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OnSaveCurrentTrackFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/OnSaveCurrentTrackFragment.java index 6765a435c1..58a330c657 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/OnSaveCurrentTrackFragment.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/OnSaveCurrentTrackFragment.java @@ -3,12 +3,6 @@ package net.osmand.plus.monitoring; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.SwitchCompat; import android.text.Editable; import android.text.TextWatcher; import android.view.KeyEvent; @@ -22,6 +16,13 @@ import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.WptPt; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java index e6fab01a86..42870b6896 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java @@ -4,11 +4,6 @@ import android.app.Activity; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.AppCompatCheckBox; import android.view.View; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; @@ -18,6 +13,12 @@ import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.AppCompatCheckBox; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; + import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.ValueHolder; diff --git a/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java b/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java index 135e409ce9..578234c258 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java @@ -13,8 +13,6 @@ import android.preference.Preference; import android.preference.Preference.OnPreferenceClickListener; import android.preference.PreferenceCategory; import android.preference.PreferenceScreen; -import android.support.annotation.NonNull; -import android.support.v7.app.AlertDialog; import android.text.SpannableString; import android.text.style.StyleSpan; import android.util.TypedValue; @@ -26,6 +24,9 @@ import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; + import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmAndTaskManager.OsmAndTaskRunnable; diff --git a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java index 94f20115e7..96e759796f 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java @@ -13,14 +13,6 @@ import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -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; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; @@ -44,6 +36,15 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ActionMode; +import androidx.appcompat.widget.PopupMenu; +import androidx.appcompat.widget.SearchView; +import androidx.core.content.ContextCompat; +import androidx.core.view.MenuItemCompat; + import net.osmand.AndroidUtils; import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; diff --git a/OsmAnd/src/net/osmand/plus/myplaces/EditTrackGroupDialogFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/EditTrackGroupDialogFragment.java index 958c0d6e31..bf931b0df3 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/EditTrackGroupDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/EditTrackGroupDialogFragment.java @@ -6,12 +6,6 @@ import android.content.Context; import android.content.DialogInterface; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.ListPopupWindow; import android.text.TextUtils; import android.view.ContextThemeWrapper; import android.view.Gravity; @@ -22,6 +16,12 @@ import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.ListPopupWindow; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; diff --git a/OsmAnd/src/net/osmand/plus/myplaces/FavoritesActivity.java b/OsmAnd/src/net/osmand/plus/myplaces/FavoritesActivity.java index 300088ab2d..cfef97d52d 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/FavoritesActivity.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/FavoritesActivity.java @@ -8,17 +8,18 @@ import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.view.ViewPager; -import android.support.v7.widget.SearchView; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.style.ImageSpan; import android.view.MenuItem; import android.widget.ImageView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.SearchView; +import androidx.fragment.app.Fragment; +import androidx.viewpager.widget.ViewPager; + import net.osmand.PlatformUtil; import net.osmand.data.PointDescription; import net.osmand.plus.OsmAndAppCustomization; @@ -32,7 +33,6 @@ import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.TabActivity; import net.osmand.plus.helpers.ImportHelper; import net.osmand.plus.views.controls.PagerSlidingTabStrip; -import net.osmand.plus.wikivoyage.data.TravelDbHelper; import org.apache.commons.logging.Log; diff --git a/OsmAnd/src/net/osmand/plus/myplaces/GpxDescriptionDialogFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/GpxDescriptionDialogFragment.java index 80f25e2467..d61daaae30 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/GpxDescriptionDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/GpxDescriptionDialogFragment.java @@ -3,17 +3,19 @@ package net.osmand.plus.myplaces; import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.AppBarLayout; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.Toolbar; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebView; import android.widget.LinearLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; + +import com.google.android.material.appbar.AppBarLayout; + import net.osmand.AndroidUtils; import net.osmand.plus.R; import net.osmand.plus.base.BaseOsmAndDialogFragment; diff --git a/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentDialogFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentDialogFragment.java index f8fd097268..69ca266c95 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentDialogFragment.java @@ -7,12 +7,6 @@ import android.graphics.Paint; import android.graphics.Rect; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.ListPopupWindow; -import android.support.v7.widget.Toolbar; import android.util.DisplayMetrics; import android.view.Gravity; import android.view.LayoutInflater; @@ -26,6 +20,13 @@ import android.widget.ListView; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.ListPopupWindow; +import androidx.appcompat.widget.Toolbar; +import androidx.fragment.app.DialogFragment; + import net.osmand.AndroidUtils; import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackActivityFragmentAdapter.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackActivityFragmentAdapter.java index b645e9b6ac..5aa5390dea 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/TrackActivityFragmentAdapter.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackActivityFragmentAdapter.java @@ -7,13 +7,6 @@ import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.ListPopupWindow; -import android.support.v7.widget.SwitchCompat; import android.text.Html; import android.text.TextUtils; import android.view.Gravity; @@ -27,6 +20,14 @@ import android.widget.ListView; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.ListPopupWindow; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; + +import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.squareup.picasso.Callback; import com.squareup.picasso.Picasso; import com.squareup.picasso.RequestCreator; diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java index 1f0f86fea6..1cc0ce8055 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java @@ -7,10 +7,11 @@ import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.LayerDrawable; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; + +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; import net.osmand.AndroidUtils; import net.osmand.GPXUtilities; diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java index dd8ba618b3..c02848766a 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java @@ -8,16 +8,6 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -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.text.SpannableStringBuilder; import android.text.Spanned; import android.text.TextUtils; @@ -39,17 +29,29 @@ import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ActionMode; +import androidx.appcompat.widget.SearchView; +import androidx.core.content.ContextCompat; +import androidx.core.view.MenuItemCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + +import com.google.android.material.snackbar.Snackbar; + import net.osmand.AndroidUtils; import net.osmand.Collator; +import net.osmand.GPXUtilities; +import net.osmand.GPXUtilities.GPXFile; +import net.osmand.GPXUtilities.WptPt; import net.osmand.OsmAndCollator; import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.FavouritesDbHelper; import net.osmand.plus.GPXDatabase.GpxDataItem; -import net.osmand.GPXUtilities; -import net.osmand.GPXUtilities.GPXFile; -import net.osmand.GPXUtilities.WptPt; import net.osmand.plus.GpxSelectionHelper.GpxDisplayGroup; import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem; import net.osmand.plus.GpxSelectionHelper.GpxDisplayItemType; diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java index e39de1c4b3..bab87752af 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java @@ -9,14 +9,6 @@ import android.graphics.Matrix; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.MenuItemCompat; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.SwitchCompat; import android.util.SparseArray; import android.view.LayoutInflater; import android.view.Menu; @@ -30,6 +22,15 @@ import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.core.view.MenuItemCompat; +import androidx.core.view.ViewCompat; +import androidx.viewpager.widget.PagerAdapter; + import com.github.mikephil.charting.charts.LineChart; import com.github.mikephil.charting.data.Entry; import com.github.mikephil.charting.data.LineData; diff --git a/OsmAnd/src/net/osmand/plus/notifications/DownloadNotification.java b/OsmAnd/src/net/osmand/plus/notifications/DownloadNotification.java index 5b1e7109c4..cf1873a964 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/DownloadNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/DownloadNotification.java @@ -2,7 +2,8 @@ package net.osmand.plus.notifications; import android.content.Intent; import android.os.AsyncTask; -import android.support.v4.app.NotificationCompat; + +import androidx.core.app.NotificationCompat; import net.osmand.plus.OsmandApplication; import net.osmand.plus.Version; diff --git a/OsmAnd/src/net/osmand/plus/notifications/ErrorNotification.java b/OsmAnd/src/net/osmand/plus/notifications/ErrorNotification.java index af9a3841c9..e0cd7f813d 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/ErrorNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/ErrorNotification.java @@ -1,7 +1,8 @@ package net.osmand.plus.notifications; import android.content.Intent; -import android.support.v4.app.NotificationCompat; + +import androidx.core.app.NotificationCompat; import net.osmand.plus.NavigationService; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java b/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java index 3657d78fe7..daef81c368 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java @@ -5,9 +5,10 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.BigTextStyle; -import android.support.v4.app.NotificationCompat.Builder; + +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.BigTextStyle; +import androidx.core.app.NotificationCompat.Builder; import net.osmand.plus.NavigationService; import net.osmand.plus.OsmAndFormatter; diff --git a/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java b/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java index 82bc936d22..562f9d9191 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java @@ -11,11 +11,12 @@ import android.graphics.Canvas; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.BigTextStyle; -import android.support.v4.app.NotificationCompat.Builder; import android.view.View; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.BigTextStyle; +import androidx.core.app.NotificationCompat.Builder; + import net.osmand.plus.NavigationService; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/notifications/OsmandNotification.java b/OsmAnd/src/net/osmand/plus/notifications/OsmandNotification.java index 3cfd041a5a..7b02e2d22f 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/OsmandNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/OsmandNotification.java @@ -5,9 +5,10 @@ import android.app.Notification; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.Builder; -import android.support.v4.app.NotificationManagerCompat; + +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.Builder; +import androidx.core.app.NotificationManagerCompat; import net.osmand.plus.NotificationHelper; import net.osmand.plus.OsmandApplication; @@ -75,7 +76,7 @@ public abstract class OsmandNotification { app.getNotificationHelper().createNotificationChannel(); } Builder builder = new Builder(app, NotificationHelper.NOTIFICATION_CHANEL_ID) - .setVisibility(android.support.v4.app.NotificationCompat.VISIBILITY_PUBLIC) + .setVisibility(androidx.core.app.NotificationCompat.VISIBILITY_PUBLIC) .setPriority(top ? NotificationCompat.PRIORITY_HIGH : getPriority()) .setOngoing(ongoing && !wearable) .setContentIntent(contentPendingIntent) diff --git a/OsmAnd/src/net/osmand/plus/openseamapsplugin/NauticalMapsPlugin.java b/OsmAnd/src/net/osmand/plus/openseamapsplugin/NauticalMapsPlugin.java index a2e59657ab..5e9a72b9fd 100644 --- a/OsmAnd/src/net/osmand/plus/openseamapsplugin/NauticalMapsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/openseamapsplugin/NauticalMapsPlugin.java @@ -1,8 +1,9 @@ package net.osmand.plus.openseamapsplugin; import android.app.Activity; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/AdvancedEditPoiFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/AdvancedEditPoiFragment.java index f19fcb111b..e640f9da50 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/AdvancedEditPoiFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/AdvancedEditPoiFragment.java @@ -3,8 +3,6 @@ package net.osmand.plus.osmedit; import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Editable; import android.text.InputFilter; import android.text.TextWatcher; @@ -20,6 +18,9 @@ import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.PlatformUtil; import net.osmand.osm.AbstractPoiType; import net.osmand.osm.MapPoiTypes; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java index d676609fee..c9455a9c15 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java @@ -4,9 +4,6 @@ import android.content.Context; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; import android.text.Editable; import android.text.InputFilter; import android.text.TextUtils; @@ -23,6 +20,10 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; + import net.osmand.PlatformUtil; import net.osmand.osm.edit.OSMSettings; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java index 857a246b14..e55181872d 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java @@ -4,7 +4,6 @@ import android.app.ProgressDialog; import android.content.DialogInterface; import android.os.AsyncTask; import android.os.Bundle; -import android.support.v7.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -13,6 +12,8 @@ import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.appcompat.app.AlertDialog; + import net.osmand.data.PointDescription; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java index eeb9eb4fb0..9a47563fe4 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java @@ -1,9 +1,9 @@ package net.osmand.plus.osmedit; -import android.support.annotation.NonNull; import android.view.View; -import net.osmand.data.PointDescription; +import androidx.annotation.NonNull; + import net.osmand.osm.PoiType; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java index 075adb475b..479a69e26b 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java @@ -2,8 +2,9 @@ package net.osmand.plus.osmedit; import android.content.DialogInterface; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.v7.app.AlertDialog; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; import net.osmand.data.PointDescription; import net.osmand.osm.PoiType; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiData.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiData.java index 255b1bd101..363e2a7876 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiData.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiData.java @@ -1,6 +1,6 @@ package net.osmand.plus.osmedit; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import net.osmand.PlatformUtil; import net.osmand.osm.PoiCategory; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java index 0fc0e7085b..3523c7dac9 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java @@ -11,20 +11,6 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.TabLayout; -import android.support.design.widget.TextInputLayout; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.app.FragmentTransaction; -import android.support.v4.view.ViewCompat; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; @@ -48,7 +34,21 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; -import java.util.Map.Entry; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.core.view.ViewCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.fragment.app.FragmentTransaction; +import androidx.viewpager.widget.ViewPager; + +import com.google.android.material.tabs.TabLayout; +import com.google.android.material.textfield.TextInputLayout; import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; @@ -83,6 +83,7 @@ import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.Set; public class EditPoiDialogFragment extends BaseOsmAndDialogFragment { diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiViewPager.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiViewPager.java index 908873050a..a4f791b778 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiViewPager.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiViewPager.java @@ -1,10 +1,11 @@ package net.osmand.plus.osmedit; import android.content.Context; -import android.support.v4.view.ViewPager; import android.util.AttributeSet; import android.view.View; +import androidx.viewpager.widget.ViewPager; + public class EditPoiViewPager extends ViewPager { public EditPoiViewPager(Context context) { super(context); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapUtil.java index 94edb547e0..1c20814c06 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapUtil.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapUtil.java @@ -1,6 +1,6 @@ package net.osmand.plus.osmedit; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import net.osmand.data.MapObject; import net.osmand.osm.edit.Entity; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugMenuController.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugMenuController.java index fd46fde546..2a62f86ef4 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugMenuController.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugMenuController.java @@ -1,7 +1,8 @@ package net.osmand.plus.osmedit; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java index 0760b9839e..03a5f6a6ab 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java @@ -9,13 +9,14 @@ import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PointF; import android.os.AsyncTask; -import android.support.v7.app.AlertDialog; import android.util.Xml; import android.view.LayoutInflater; import android.view.View; import android.widget.EditText; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.data.LatLon; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java index 2cd2615b64..2c44a0a28a 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java @@ -4,14 +4,15 @@ import android.content.Intent; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.v4.app.FragmentManager; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceViewHolder; import android.text.SpannableString; import android.view.LayoutInflater; import android.view.View; import android.widget.TextView; +import androidx.fragment.app.FragmentManager; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; + import net.osmand.plus.OsmAndAppCustomization; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java index 0d3118a98d..0624e088b6 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java @@ -6,9 +6,6 @@ import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v7.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.widget.ArrayAdapter; @@ -16,6 +13,10 @@ import android.widget.EditText; import android.widget.Spinner; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.Fragment; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.data.Amenity; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsAdapter.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsAdapter.java index e0aa6d3f32..9668654adc 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsAdapter.java @@ -2,8 +2,6 @@ package net.osmand.plus.osmedit; import android.graphics.Typeface; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; import android.text.SpannableString; import android.text.TextUtils; import android.text.style.StyleSpan; @@ -18,11 +16,13 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; + import net.osmand.osm.PoiType; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.render.RenderingIcons; -import net.osmand.util.Algorithms; import java.util.List; import java.util.Map; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java index e8bff450df..ffe4b8fa44 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java @@ -7,13 +7,6 @@ import android.content.Intent; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; -import android.support.annotation.IntDef; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v7.app.AlertDialog; -import android.support.v7.view.ActionMode; import android.util.Xml; import android.view.LayoutInflater; import android.view.Menu; @@ -29,6 +22,14 @@ import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.IntDef; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ActionMode; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java index 93ece10d15..4d1aa34116 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java @@ -6,10 +6,11 @@ import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PointF; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.data.RotatedTileBox; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsUploadListenerHelper.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsUploadListenerHelper.java index 4831933676..1d09b522ab 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsUploadListenerHelper.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsUploadListenerHelper.java @@ -6,13 +6,6 @@ import android.app.ProgressDialog; import android.content.DialogInterface; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.MainThread; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -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.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; @@ -23,6 +16,14 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.MainThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmNotesMenu.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmNotesMenu.java index 5493d78ab4..3558a69c59 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmNotesMenu.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmNotesMenu.java @@ -1,12 +1,13 @@ package net.osmand.plus.osmedit; import android.content.Context; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; import android.view.ContextThemeWrapper; import android.view.View; import android.widget.ArrayAdapter; +import androidx.appcompat.app.AlertDialog; +import androidx.core.content.ContextCompat; + import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; import net.osmand.plus.DialogListItemAdapter; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursDaysDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursDaysDialogFragment.java index 7706accfa6..497ceb4735 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursDaysDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursDaysDialogFragment.java @@ -3,11 +3,12 @@ package net.osmand.plus.osmedit.dialogs; 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.text.format.DateFormat; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; + import net.osmand.PlatformUtil; import net.osmand.plus.R; import net.osmand.plus.osmedit.BasicEditPoiFragment; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursHoursDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursHoursDialogFragment.java index 08fb4c61d7..28fb6406c3 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursHoursDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursHoursDialogFragment.java @@ -4,15 +4,16 @@ import android.app.Dialog; import android.content.DialogInterface; import android.graphics.Typeface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.AlertDialog; import android.text.format.DateFormat; import android.util.TypedValue; import android.view.Gravity; import android.widget.TextView; import android.widget.TimePicker; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; + import net.osmand.plus.R; import net.osmand.plus.osmedit.BasicEditPoiFragment; import net.osmand.util.OpeningHoursParser; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/PoiSubTypeDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/PoiSubTypeDialogFragment.java index 9f72bdbe91..53b9ce0677 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/PoiSubTypeDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/PoiSubTypeDialogFragment.java @@ -3,9 +3,10 @@ package net.osmand.plus.osmedit.dialogs; 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 androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; import net.osmand.osm.MapPoiTypes; import net.osmand.osm.PoiCategory; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/PoiTypeDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/PoiTypeDialogFragment.java index d4c01865f6..cdcf88fb0a 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/PoiTypeDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/PoiTypeDialogFragment.java @@ -3,9 +3,10 @@ package net.osmand.plus.osmedit.dialogs; 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 androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; import net.osmand.osm.MapPoiTypes; import net.osmand.osm.PoiCategory; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/SendPoiDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/SendPoiDialogFragment.java index c651138e75..f2cc831475 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/SendPoiDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/SendPoiDialogFragment.java @@ -5,15 +5,16 @@ import android.app.ProgressDialog; import android.content.DialogInterface; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.SwitchCompat; import android.view.View; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.EditText; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.SwitchCompat; +import androidx.fragment.app.DialogFragment; + import net.osmand.osm.PoiType; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/DashParkingFragment.java b/OsmAnd/src/net/osmand/plus/parkingpoint/DashParkingFragment.java index 17dcdd61fa..a5bf1cc4df 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/DashParkingFragment.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/DashParkingFragment.java @@ -4,7 +4,6 @@ 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; @@ -12,6 +11,8 @@ import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; +import androidx.appcompat.app.AlertDialog; + import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.OsmandPlugin; diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionMenuController.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionMenuController.java index cb33d07ab4..706f99b9a5 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionMenuController.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionMenuController.java @@ -1,7 +1,8 @@ package net.osmand.plus.parkingpoint; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.data.PointDescription; import net.osmand.plus.OsmandPlugin; diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java index f051507c2f..b13a2193a4 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java @@ -5,8 +5,6 @@ import android.app.Activity; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; -import android.support.v4.app.FragmentManager; -import android.support.v7.app.AlertDialog; import android.text.format.DateFormat; import android.text.format.Time; import android.view.View; @@ -15,6 +13,9 @@ import android.widget.CheckBox; import android.widget.TextView; import android.widget.TimePicker; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.FragmentManager; + import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java index f2dcf9a692..9bfc82dfdd 100644 --- a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java +++ b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java @@ -1,6 +1,6 @@ package net.osmand.plus.poi; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import net.osmand.osm.AbstractPoiType; import net.osmand.osm.MapPoiTypes; diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java index ac604910a5..7efaf867ef 100644 --- a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java +++ b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java @@ -2,7 +2,8 @@ package net.osmand.plus.poi; import android.content.Context; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.CollatorStringMatcher; import net.osmand.CollatorStringMatcher.StringMatcherMode; diff --git a/OsmAnd/src/net/osmand/plus/poi/RearrangePoiFiltersFragment.java b/OsmAnd/src/net/osmand/plus/poi/RearrangePoiFiltersFragment.java index 5bb86da388..b2bc645760 100644 --- a/OsmAnd/src/net/osmand/plus/poi/RearrangePoiFiltersFragment.java +++ b/OsmAnd/src/net/osmand/plus/poi/RearrangePoiFiltersFragment.java @@ -4,15 +4,6 @@ import android.annotation.SuppressLint; import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.MotionEventCompat; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; @@ -22,6 +13,16 @@ import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.core.view.MotionEventCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentActivity; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/profiles/AbstractProfileMenuAdapter.java b/OsmAnd/src/net/osmand/plus/profiles/AbstractProfileMenuAdapter.java index 3ab089abb6..813456d831 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/AbstractProfileMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/profiles/AbstractProfileMenuAdapter.java @@ -1,7 +1,7 @@ package net.osmand.plus.profiles; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import net.osmand.plus.ApplicationMode; diff --git a/OsmAnd/src/net/osmand/plus/profiles/AppModesBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/profiles/AppModesBottomSheetDialogFragment.java index 6084e0f185..d2fb534a8b 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/AppModesBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/profiles/AppModesBottomSheetDialogFragment.java @@ -2,11 +2,12 @@ package net.osmand.plus.profiles; import android.content.DialogInterface; import android.os.Bundle; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.ContextThemeWrapper; import android.view.View; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.ApplicationMode; import net.osmand.plus.R; import net.osmand.plus.base.MenuBottomSheetDialogFragment; diff --git a/OsmAnd/src/net/osmand/plus/profiles/AppProfileArrayAdapter.java b/OsmAnd/src/net/osmand/plus/profiles/AppProfileArrayAdapter.java index f4154462ff..58f1c721ab 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/AppProfileArrayAdapter.java +++ b/OsmAnd/src/net/osmand/plus/profiles/AppProfileArrayAdapter.java @@ -1,10 +1,7 @@ package net.osmand.plus.profiles; import android.app.Activity; -import android.app.Application; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.system.Os; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -12,10 +9,14 @@ import android.widget.ArrayAdapter; import android.widget.CompoundButton; import android.widget.ImageView; import android.widget.TextView; -import java.util.List; + +import androidx.annotation.NonNull; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; +import java.util.List; + public class AppProfileArrayAdapter extends ArrayAdapter { private Activity context; diff --git a/OsmAnd/src/net/osmand/plus/profiles/ConfigureProfileMenuAdapter.java b/OsmAnd/src/net/osmand/plus/profiles/ConfigureProfileMenuAdapter.java index a7d4790e5d..f738528cbe 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/ConfigureProfileMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/profiles/ConfigureProfileMenuAdapter.java @@ -1,16 +1,17 @@ package net.osmand.plus.profiles; -import android.support.annotation.ColorRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.view.ContextThemeWrapper; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; +import androidx.annotation.ColorRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java b/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java index e81d4fbfda..4d8fa72ef6 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java +++ b/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java @@ -4,14 +4,6 @@ import android.annotation.SuppressLint; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.MotionEventCompat; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; import android.text.SpannableString; import android.view.LayoutInflater; import android.view.MotionEvent; @@ -21,6 +13,15 @@ import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.core.view.MotionEventCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.AndroidUtils; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/profiles/LocationIcon.java b/OsmAnd/src/net/osmand/plus/profiles/LocationIcon.java index 7ac87b1554..44c02a8e33 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/LocationIcon.java +++ b/OsmAnd/src/net/osmand/plus/profiles/LocationIcon.java @@ -1,6 +1,6 @@ package net.osmand.plus.profiles; -import android.support.annotation.DrawableRes; +import androidx.annotation.DrawableRes; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/profiles/NavigationIcon.java b/OsmAnd/src/net/osmand/plus/profiles/NavigationIcon.java index fa636079f4..0d1a371fab 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/NavigationIcon.java +++ b/OsmAnd/src/net/osmand/plus/profiles/NavigationIcon.java @@ -1,6 +1,6 @@ package net.osmand.plus.profiles; -import android.support.annotation.DrawableRes; +import androidx.annotation.DrawableRes; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/profiles/ProfileAbstractViewHolder.java b/OsmAnd/src/net/osmand/plus/profiles/ProfileAbstractViewHolder.java index c485485c37..c8aea33ffc 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/ProfileAbstractViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/profiles/ProfileAbstractViewHolder.java @@ -1,12 +1,13 @@ package net.osmand.plus.profiles; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.CompoundButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.R; public abstract class ProfileAbstractViewHolder extends RecyclerView.ViewHolder { diff --git a/OsmAnd/src/net/osmand/plus/profiles/ProfileDataObject.java b/OsmAnd/src/net/osmand/plus/profiles/ProfileDataObject.java index 2402506548..666a7603a2 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/ProfileDataObject.java +++ b/OsmAnd/src/net/osmand/plus/profiles/ProfileDataObject.java @@ -1,7 +1,7 @@ package net.osmand.plus.profiles; -import android.support.annotation.ColorRes; -import android.support.annotation.NonNull; +import androidx.annotation.ColorRes; +import androidx.annotation.NonNull; public class ProfileDataObject implements Comparable { diff --git a/OsmAnd/src/net/osmand/plus/profiles/ProfileIconColors.java b/OsmAnd/src/net/osmand/plus/profiles/ProfileIconColors.java index d22091119e..f9650910a7 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/ProfileIconColors.java +++ b/OsmAnd/src/net/osmand/plus/profiles/ProfileIconColors.java @@ -1,7 +1,7 @@ package net.osmand.plus.profiles; -import android.support.annotation.ColorRes; -import android.support.annotation.StringRes; +import androidx.annotation.ColorRes; +import androidx.annotation.StringRes; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/profiles/ProfileIcons.java b/OsmAnd/src/net/osmand/plus/profiles/ProfileIcons.java index 8543c21d1d..dde1f07da1 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/ProfileIcons.java +++ b/OsmAnd/src/net/osmand/plus/profiles/ProfileIcons.java @@ -1,8 +1,8 @@ package net.osmand.plus.profiles; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/profiles/SelectAppModesBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/profiles/SelectAppModesBottomSheetDialogFragment.java index c85e080bdc..8a3cbd7f65 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/SelectAppModesBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/profiles/SelectAppModesBottomSheetDialogFragment.java @@ -1,10 +1,11 @@ package net.osmand.plus.profiles; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; diff --git a/OsmAnd/src/net/osmand/plus/profiles/SelectCopyAppModeBottomSheet.java b/OsmAnd/src/net/osmand/plus/profiles/SelectCopyAppModeBottomSheet.java index 2e8024e0ea..f3c09b373d 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/SelectCopyAppModeBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/profiles/SelectCopyAppModeBottomSheet.java @@ -1,9 +1,10 @@ package net.osmand.plus.profiles; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; diff --git a/OsmAnd/src/net/osmand/plus/profiles/SelectCopyProfilesMenuAdapter.java b/OsmAnd/src/net/osmand/plus/profiles/SelectCopyProfilesMenuAdapter.java index 2030a7ce49..27475596df 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/SelectCopyProfilesMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/profiles/SelectCopyProfilesMenuAdapter.java @@ -3,14 +3,15 @@ package net.osmand.plus.profiles; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.AndroidUtils; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java index b9148e9b12..09f27b149c 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java @@ -3,10 +3,6 @@ package net.osmand.plus.profiles; import android.app.Activity; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; @@ -16,6 +12,11 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.CallbackWithObject; import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/profiles/SelectProfileMenuAdapter.java b/OsmAnd/src/net/osmand/plus/profiles/SelectProfileMenuAdapter.java index 8c259757a7..4dc2ba6153 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/SelectProfileMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/profiles/SelectProfileMenuAdapter.java @@ -3,15 +3,16 @@ package net.osmand.plus.profiles; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; -import android.support.annotation.ColorRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.view.ContextThemeWrapper; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.ColorRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/AddQuickActionDialog.java b/OsmAnd/src/net/osmand/plus/quickaction/AddQuickActionDialog.java index bda5ed8a2a..73f39added 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/AddQuickActionDialog.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/AddQuickActionDialog.java @@ -2,11 +2,6 @@ package net.osmand.plus.quickaction; import android.app.Dialog; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -15,6 +10,12 @@ import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.DialogFragment; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java index b77d12d32d..995aa691c4 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java @@ -5,11 +5,6 @@ import android.content.DialogInterface; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; @@ -20,6 +15,12 @@ import android.widget.EditText; import android.widget.ImageView; import android.widget.Toast; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.DialogFragment; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/QuickAction.java b/OsmAnd/src/net/osmand/plus/quickaction/QuickAction.java index 44408fae9e..2461463749 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/QuickAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/QuickAction.java @@ -2,12 +2,13 @@ package net.osmand.plus.quickaction; import android.content.Context; -import android.support.annotation.DrawableRes; -import android.support.annotation.StringRes; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; +import androidx.annotation.DrawableRes; +import androidx.annotation.StringRes; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.activities.MapActivity; import net.osmand.util.Algorithms; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionFactory.java b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionFactory.java index 479c7f2b9e..2490343962 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionFactory.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionFactory.java @@ -1,7 +1,7 @@ package net.osmand.plus.quickaction; -import android.support.annotation.DrawableRes; -import android.support.annotation.StringRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.StringRes; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java index b56d6a1189..511cbc6ce7 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java @@ -5,16 +5,6 @@ import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.MotionEventCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; -import android.support.v7.widget.helper.ItemTouchHelper; import android.util.Log; import android.util.TypedValue; import android.view.LayoutInflater; @@ -25,14 +15,26 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.core.view.MotionEventCompat; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.google.android.material.floatingactionbutton.FloatingActionButton; + import net.osmand.AndroidUtils; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.base.BaseOsmAndFragment; import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; -import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback.UnmovableItem; import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback.OnItemMoveCallback; +import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback.UnmovableItem; import java.util.ArrayList; import java.util.Collections; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionsWidget.java b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionsWidget.java index 36efc520a0..9de919648a 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionsWidget.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionsWidget.java @@ -6,13 +6,6 @@ import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.ShapeDrawable; -import android.support.annotation.StyleRes; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.view.ContextThemeWrapper; -import android.support.v7.widget.GridLayout; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; @@ -22,9 +15,17 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; -import net.osmand.plus.UiUtilities; +import androidx.annotation.StyleRes; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.core.content.ContextCompat; +import androidx.gridlayout.widget.GridLayout; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; import net.osmand.plus.helpers.AndroidUiHelper; import net.osmand.plus.quickaction.actions.NewAction; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java b/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java index 3c8dcd9464..e804c90018 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java @@ -2,12 +2,6 @@ package net.osmand.plus.quickaction; import android.content.Context; import android.os.Bundle; -import android.support.annotation.StringRes; -import android.support.v4.app.FragmentManager; -import android.support.v4.view.MotionEventCompat; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.SwitchCompat; -import android.support.v7.widget.helper.ItemTouchHelper; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; @@ -17,6 +11,13 @@ import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.StringRes; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.view.MotionEventCompat; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.dialogs.SelectMapViewQuickActionsBottomSheet; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/AddOSMBugAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/AddOSMBugAction.java index fd75c7ab08..c172c541a7 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/AddOSMBugAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/AddOSMBugAction.java @@ -1,11 +1,12 @@ package net.osmand.plus.quickaction.actions; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; +import androidx.appcompat.widget.SwitchCompat; + import net.osmand.data.LatLon; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/AddPOIAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/AddPOIAction.java index c65893a54b..f40c5ecd77 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/AddPOIAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/AddPOIAction.java @@ -6,8 +6,6 @@ import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; -import android.support.design.widget.TextInputLayout; -import android.support.v7.widget.SwitchCompat; import android.text.Editable; import android.text.TextWatcher; import android.util.TypedValue; @@ -24,6 +22,9 @@ import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.appcompat.widget.SwitchCompat; + +import com.google.android.material.textfield.TextInputLayout; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/FavoriteAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/FavoriteAction.java index 8f4e434e53..8c17d152a0 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/FavoriteAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/FavoriteAction.java @@ -4,14 +4,15 @@ import android.app.Dialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; -import android.support.annotation.NonNull; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.ImageView; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.SwitchCompat; + import net.osmand.data.LatLon; import net.osmand.plus.FavouritesDbHelper; import net.osmand.plus.GeocodingLookupService.AddressLookupRequest; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/GPXAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/GPXAction.java index d007e7422b..0eadf00279 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/GPXAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/GPXAction.java @@ -2,13 +2,14 @@ package net.osmand.plus.quickaction.actions; import android.app.Dialog; import android.app.ProgressDialog; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.ImageView; +import androidx.appcompat.widget.SwitchCompat; + import net.osmand.data.LatLon; import net.osmand.plus.GeocodingLookupService; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapOverlayAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapOverlayAction.java index 1a09c0a8de..57173f820f 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapOverlayAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapOverlayAction.java @@ -2,13 +2,14 @@ package net.osmand.plus.quickaction.actions; import android.content.Context; import android.content.DialogInterface; -import android.support.v4.util.Pair; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.SwitchCompat; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.util.Pair; + import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapSourceAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapSourceAction.java index a6faaf10e4..eb9dedcec7 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapSourceAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapSourceAction.java @@ -2,13 +2,14 @@ package net.osmand.plus.quickaction.actions; import android.content.Context; import android.content.DialogInterface; -import android.support.v4.util.Pair; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.SwitchCompat; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.util.Pair; + import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java index f56d00701b..fb11b3e154 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java @@ -2,13 +2,14 @@ package net.osmand.plus.quickaction.actions; import android.content.Context; import android.content.DialogInterface; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.SwitchCompat; import android.text.TextUtils; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.SwitchCompat; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapUnderlayAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapUnderlayAction.java index 79cdd2837f..6c9f2a2d34 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapUnderlayAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapUnderlayAction.java @@ -2,13 +2,14 @@ package net.osmand.plus.quickaction.actions; import android.content.Context; import android.content.DialogInterface; -import android.support.v4.util.Pair; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.SwitchCompat; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.util.Pair; + import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/NavStartStopAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/NavStartStopAction.java index 8f5beb05ba..e5b31fa9a6 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/NavStartStopAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/NavStartStopAction.java @@ -1,12 +1,12 @@ package net.osmand.plus.quickaction.actions; import android.content.Context; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import net.osmand.plus.ApplicationMode; +import androidx.appcompat.widget.SwitchCompat; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java index 4b83227fae..df89591064 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java @@ -3,8 +3,6 @@ package net.osmand.plus.quickaction.actions; import android.content.Context; import android.content.DialogInterface; import android.graphics.drawable.Drawable; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -15,6 +13,9 @@ import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; +import androidx.appcompat.app.AlertDialog; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java b/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java index 87e19bffee..30253d5575 100644 --- a/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java @@ -3,11 +3,6 @@ package net.osmand.plus.rastermaps; import android.app.Activity; import android.content.DialogInterface; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.AppCompatCheckBox; import android.view.ContextThemeWrapper; import android.view.View; import android.widget.AdapterView; @@ -19,6 +14,12 @@ import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.AppCompatCheckBox; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.ResultMatcher; diff --git a/OsmAnd/src/net/osmand/plus/render/RendererRegistry.java b/OsmAnd/src/net/osmand/plus/render/RendererRegistry.java index ca8cb00d11..3225f77ee3 100644 --- a/OsmAnd/src/net/osmand/plus/render/RendererRegistry.java +++ b/OsmAnd/src/net/osmand/plus/render/RendererRegistry.java @@ -1,8 +1,10 @@ package net.osmand.plus.render; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.IProgress; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/resources/AmenityIndexRepositoryBinary.java b/OsmAnd/src/net/osmand/plus/resources/AmenityIndexRepositoryBinary.java index 123d1e4ac3..4c57457588 100644 --- a/OsmAnd/src/net/osmand/plus/resources/AmenityIndexRepositoryBinary.java +++ b/OsmAnd/src/net/osmand/plus/resources/AmenityIndexRepositoryBinary.java @@ -1,6 +1,6 @@ package net.osmand.plus.resources; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import net.osmand.Location; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/resources/RegionAddressRepository.java b/OsmAnd/src/net/osmand/plus/resources/RegionAddressRepository.java index 7c0155b44c..235bf1a31e 100644 --- a/OsmAnd/src/net/osmand/plus/resources/RegionAddressRepository.java +++ b/OsmAnd/src/net/osmand/plus/resources/RegionAddressRepository.java @@ -1,10 +1,6 @@ package net.osmand.plus.resources; -import android.support.annotation.Nullable; - -import java.text.Collator; -import java.util.Comparator; -import java.util.List; +import androidx.annotation.Nullable; import net.osmand.ResultMatcher; import net.osmand.data.Building; @@ -14,6 +10,10 @@ import net.osmand.data.MapObject; import net.osmand.data.Street; import net.osmand.util.MapUtils; +import java.text.Collator; +import java.util.Comparator; +import java.util.List; + public interface RegionAddressRepository { diff --git a/OsmAnd/src/net/osmand/plus/resources/RegionAddressRepositoryBinary.java b/OsmAnd/src/net/osmand/plus/resources/RegionAddressRepositoryBinary.java index 5f78ea9e43..7fa8057507 100644 --- a/OsmAnd/src/net/osmand/plus/resources/RegionAddressRepositoryBinary.java +++ b/OsmAnd/src/net/osmand/plus/resources/RegionAddressRepositoryBinary.java @@ -1,7 +1,7 @@ package net.osmand.plus.resources; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.Collator; import net.osmand.CollatorStringMatcher.StringMatcherMode; diff --git a/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java b/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java index dca3f943c2..8000ea0fca 100644 --- a/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java +++ b/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java @@ -5,12 +5,13 @@ import android.content.Context; import android.content.res.AssetManager; import android.database.sqlite.SQLiteException; import android.os.HandlerThread; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.format.DateFormat; import android.util.DisplayMetrics; import android.view.WindowManager; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.AndroidUtils; import net.osmand.GeoidAltitudeCorrection; import net.osmand.IProgress; diff --git a/OsmAnd/src/net/osmand/plus/resources/TransportIndexRepositoryBinary.java b/OsmAnd/src/net/osmand/plus/resources/TransportIndexRepositoryBinary.java index 3298db77ce..596b936062 100644 --- a/OsmAnd/src/net/osmand/plus/resources/TransportIndexRepositoryBinary.java +++ b/OsmAnd/src/net/osmand/plus/resources/TransportIndexRepositoryBinary.java @@ -1,13 +1,6 @@ package net.osmand.plus.resources; -import android.support.annotation.Nullable; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; +import androidx.annotation.Nullable; import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; @@ -21,6 +14,13 @@ import net.osmand.util.MapUtils; import org.apache.commons.logging.Log; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + public class TransportIndexRepositoryBinary implements TransportIndexRepository { private static final Log log = PlatformUtil.getLog(TransportIndexRepositoryBinary.class); private BinaryMapReaderResource resource; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/AddPointBottomSheetDialog.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/AddPointBottomSheetDialog.java index 79501ffba6..ae8148eb5c 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/AddPointBottomSheetDialog.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/AddPointBottomSheetDialog.java @@ -6,11 +6,6 @@ import android.content.Intent; import android.graphics.Color; import android.graphics.Typeface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; import android.text.SpannableString; import android.util.Pair; import android.view.ContextThemeWrapper; @@ -21,6 +16,12 @@ import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.data.FavouritePoint; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/AvoidRoadsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/AvoidRoadsBottomSheetDialogFragment.java index f196d3800f..12796a64e3 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/AvoidRoadsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/AvoidRoadsBottomSheetDialogFragment.java @@ -4,11 +4,6 @@ import android.app.Activity; import android.content.Context; import android.os.Build; import android.os.Bundle; -import android.support.annotation.ColorRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v7.widget.Toolbar; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; @@ -17,6 +12,12 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.ColorRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.Toolbar; +import androidx.fragment.app.Fragment; + import net.osmand.AndroidUtils; import net.osmand.data.LatLon; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/ChooseRouteFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/ChooseRouteFragment.java index c0cb21b422..d67b4834e6 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/ChooseRouteFragment.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/ChooseRouteFragment.java @@ -9,15 +9,6 @@ import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.ActivityCompat; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.view.ContextThemeWrapper; import android.text.Html; import android.text.TextUtils; import android.util.TypedValue; @@ -30,6 +21,16 @@ import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.LinearLayout; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.core.app.ActivityCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.viewpager.widget.ViewPager; + import net.osmand.AndroidUtils; import net.osmand.GPXUtilities; import net.osmand.Location; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java index e02c2545cc..bd552c84f5 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java @@ -9,18 +9,6 @@ import android.os.Build; import android.os.Build.VERSION_CODES; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.transition.AutoTransition; -import android.support.transition.Scene; -import android.support.transition.Transition; -import android.support.transition.TransitionListenerAdapter; -import android.support.transition.TransitionManager; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.AppCompatImageView; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; @@ -32,6 +20,19 @@ import android.widget.LinearLayout; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; +import androidx.transition.AutoTransition; +import androidx.transition.Scene; +import androidx.transition.Transition; +import androidx.transition.TransitionListenerAdapter; +import androidx.transition.TransitionManager; + import net.osmand.AndroidUtils; import net.osmand.GPXUtilities.GPXFile; import net.osmand.Location; @@ -64,9 +65,9 @@ import net.osmand.plus.activities.actions.AppModeDialog; import net.osmand.plus.activities.actions.OsmAndDialogs; import net.osmand.plus.base.ContextMenuFragment.MenuState; import net.osmand.plus.helpers.AndroidUiHelper; +import net.osmand.plus.helpers.AvoidSpecificRoads.AvoidRoadInfo; import net.osmand.plus.helpers.GpxUiHelper; import net.osmand.plus.helpers.WaypointHelper; -import net.osmand.plus.helpers.AvoidSpecificRoads.AvoidRoadInfo; import net.osmand.plus.mapcontextmenu.other.TrackDetailsMenuFragment; import net.osmand.plus.mapmarkers.MapMarkerSelectionFragment; import net.osmand.plus.poi.PoiUIFilter; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java index 3024b7f9f4..b5e610c60b 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java @@ -2,9 +2,6 @@ package net.osmand.plus.routepreparationmenu; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -14,6 +11,10 @@ import android.widget.LinearLayout; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.data.QuadRect; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RouteDetailsFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RouteDetailsFragment.java index 69741a6098..a645fa64a5 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RouteDetailsFragment.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RouteDetailsFragment.java @@ -7,10 +7,6 @@ import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.os.Bundle; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.text.Spannable; import android.text.SpannableString; import android.text.SpannableStringBuilder; @@ -29,6 +25,11 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import com.github.mikephil.charting.animation.ChartAnimator; import com.github.mikephil.charting.charts.HorizontalBarChart; import com.github.mikephil.charting.charts.LineChart; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RouteOptionsBottomSheet.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RouteOptionsBottomSheet.java index d31cc6dc2f..0097ff75ca 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RouteOptionsBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RouteOptionsBottomSheet.java @@ -3,17 +3,18 @@ package net.osmand.plus.routepreparationmenu; import android.app.Activity; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.ColorRes; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.view.ContextThemeWrapper; -import android.support.v7.widget.PopupMenu; import android.view.MenuItem; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.ColorRes; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.appcompat.widget.PopupMenu; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; import net.osmand.GPXUtilities; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java index 50385b3c1c..21c17bcf9b 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java @@ -5,16 +5,17 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Build; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.AppCompatCheckedTextView; import android.util.TypedValue; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.AppCompatCheckedTextView; +import androidx.core.content.ContextCompat; + import net.osmand.CallbackWithObject; import net.osmand.GPXUtilities; import net.osmand.IndexConstants; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java index 6e1a78c723..b240f89215 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java @@ -4,10 +4,6 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; @@ -19,6 +15,11 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; + import net.osmand.ValueHolder; import net.osmand.plus.ApplicationMode; import net.osmand.plus.DialogListItemAdapter; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/WaypointsFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/WaypointsFragment.java index a00af39d5a..e13444e82b 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/WaypointsFragment.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/WaypointsFragment.java @@ -4,12 +4,6 @@ import android.content.Context; import android.os.Build; import android.os.Bundle; import android.os.CountDownTimer; -import android.support.annotation.ColorRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; import android.util.TypedValue; import android.view.Gravity; import android.view.LayoutInflater; @@ -23,6 +17,13 @@ import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.ColorRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; import com.github.ksoichiro.android.observablescrollview.ScrollState; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/BaseCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/BaseCard.java index 2665610a8b..245412fe34 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/BaseCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/BaseCard.java @@ -2,16 +2,17 @@ package net.osmand.plus.routepreparationmenu.cards; import android.content.Context; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.core.content.ContextCompat; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/HistoryCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/HistoryCard.java index 94d4cad622..a95f0bfe37 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/HistoryCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/HistoryCard.java @@ -2,14 +2,15 @@ package net.osmand.plus.routepreparationmenu.cards; import android.annotation.SuppressLint; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.v7.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.view.ContextThemeWrapper; + import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.search.SearchHistoryFragment; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/HomeWorkCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/HomeWorkCard.java index ebaf757d91..090792e1b6 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/HomeWorkCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/HomeWorkCard.java @@ -1,7 +1,5 @@ package net.osmand.plus.routepreparationmenu.cards; -import android.Manifest; -import android.support.v4.app.ActivityCompat; import android.view.View; import android.widget.TextView; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/LongDistanceWarningCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/LongDistanceWarningCard.java index f34b5de5fb..f8f2f6434b 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/LongDistanceWarningCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/LongDistanceWarningCard.java @@ -1,6 +1,6 @@ package net.osmand.plus.routepreparationmenu.cards; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/MapMarkersCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/MapMarkersCard.java index 62727168b0..8da0063324 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/MapMarkersCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/MapMarkersCard.java @@ -2,8 +2,6 @@ package net.osmand.plus.routepreparationmenu.cards; import android.annotation.SuppressLint; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.v7.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -11,6 +9,9 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.view.ContextThemeWrapper; + import net.osmand.AndroidUtils; import net.osmand.data.LatLon; import net.osmand.plus.MapMarkersHelper.MapMarker; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PedestrianRouteCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PedestrianRouteCard.java index 03608c7ca5..e331ee1be5 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PedestrianRouteCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PedestrianRouteCard.java @@ -2,7 +2,6 @@ package net.osmand.plus.routepreparationmenu.cards; import android.graphics.Typeface; import android.os.Build; -import android.support.annotation.NonNull; import android.text.SpannableString; import android.text.Spanned; import android.text.style.StyleSpan; @@ -10,6 +9,8 @@ import android.view.View; import android.widget.FrameLayout; import android.widget.TextView; +import androidx.annotation.NonNull; + import net.osmand.AndroidUtils; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportBetaWarningCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportBetaWarningCard.java index 08e7861cfc..87eef5eac4 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportBetaWarningCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportBetaWarningCard.java @@ -1,7 +1,8 @@ package net.osmand.plus.routepreparationmenu.cards; import android.net.Uri; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportCard.java index 16c058ac53..c0deef7a6b 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportCard.java @@ -3,9 +3,6 @@ package net.osmand.plus.routepreparationmenu.cards; import android.graphics.Typeface; import android.graphics.drawable.GradientDrawable; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.text.SpannableString; import android.text.style.ForegroundColorSpan; import android.view.View; @@ -15,6 +12,10 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.data.LatLon; import net.osmand.data.TransportRoute; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportNotFoundSettingsWarningCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportNotFoundSettingsWarningCard.java index 883a0645a9..ddfd7332d5 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportNotFoundSettingsWarningCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportNotFoundSettingsWarningCard.java @@ -1,6 +1,6 @@ package net.osmand.plus.routepreparationmenu.cards; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportNotFoundWarningCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportNotFoundWarningCard.java index 42f28cf001..8d86652325 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportNotFoundWarningCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportNotFoundWarningCard.java @@ -1,6 +1,6 @@ package net.osmand.plus.routepreparationmenu.cards; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/RouteDirectionsCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/RouteDirectionsCard.java index d56950cf6f..0cfd66129e 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/RouteDirectionsCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/RouteDirectionsCard.java @@ -2,14 +2,15 @@ package net.osmand.plus.routepreparationmenu.cards; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; -import android.support.annotation.NonNull; -import android.support.v7.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.view.ContextThemeWrapper; + import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/RouteInfoCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/RouteInfoCard.java index 9263dfe6c9..ef02b16734 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/RouteInfoCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/RouteInfoCard.java @@ -1,10 +1,6 @@ package net.osmand.plus.routepreparationmenu.cards; import android.graphics.drawable.Drawable; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.ColorUtils; -import android.support.v7.view.ContextThemeWrapper; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.style.StyleSpan; @@ -15,6 +11,11 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.ColorUtils; + import com.github.mikephil.charting.charts.HorizontalBarChart; import com.github.mikephil.charting.data.BarData; import com.github.mikephil.charting.data.Entry; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/RouteStatisticCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/RouteStatisticCard.java index 28138b32a5..cfebed1419 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/RouteStatisticCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/RouteStatisticCard.java @@ -2,8 +2,6 @@ package net.osmand.plus.routepreparationmenu.cards; import android.graphics.Matrix; import android.os.Build; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.text.SpannableStringBuilder; import android.text.style.ForegroundColorSpan; import android.view.MotionEvent; @@ -14,6 +12,9 @@ import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import com.github.mikephil.charting.charts.LineChart; import com.github.mikephil.charting.data.Entry; import com.github.mikephil.charting.data.LineData; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/TracksCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/TracksCard.java index cf5bc8f0a6..b223049553 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/TracksCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/TracksCard.java @@ -1,15 +1,16 @@ package net.osmand.plus.routepreparationmenu.cards; import android.annotation.SuppressLint; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.core.content.ContextCompat; + import net.osmand.GPXUtilities.GPXFile; import net.osmand.IndexConstants; import net.osmand.plus.GPXDatabase.GpxDataItem; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/WarningCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/WarningCard.java index 7ad203f867..24b9997837 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/WarningCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/WarningCard.java @@ -2,7 +2,6 @@ package net.osmand.plus.routepreparationmenu.cards; import android.graphics.Typeface; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; import android.text.SpannableString; import android.text.Spanned; import android.text.TextPaint; @@ -13,6 +12,8 @@ import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; + import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.util.Algorithms; diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index f64519ca4d..92c1c2df4c 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -1,8 +1,8 @@ package net.osmand.plus.routing; import android.content.Context; -import android.support.annotation.Nullable; -import android.system.Os; + +import androidx.annotation.Nullable; import net.osmand.Location; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteDirectionInfo.java b/OsmAnd/src/net/osmand/plus/routing/RouteDirectionInfo.java index 9c503ccd82..98c652f76a 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteDirectionInfo.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteDirectionInfo.java @@ -1,6 +1,6 @@ package net.osmand.plus.routing; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import net.osmand.binary.RouteDataObject; import net.osmand.plus.OsmAndFormatter; diff --git a/OsmAnd/src/net/osmand/plus/routing/TransportRoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/TransportRoutingHelper.java index 29cf079cd5..3fc20b5d6c 100644 --- a/OsmAnd/src/net/osmand/plus/routing/TransportRoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/TransportRoutingHelper.java @@ -1,9 +1,10 @@ package net.osmand.plus.routing; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.Pair; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.Location; import net.osmand.PlatformUtil; import net.osmand.ValueHolder; diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchCoordinatesFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchCoordinatesFragment.java index 9463a42981..2941fd9c03 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchCoordinatesFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchCoordinatesFragment.java @@ -6,11 +6,6 @@ import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; import android.text.Editable; import android.text.TextWatcher; import android.util.TypedValue; @@ -26,17 +21,16 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.DialogFragment; + import com.google.openlocationcode.OpenLocationCode; import com.jwetherell.openmap.common.LatLonPoint; import com.jwetherell.openmap.common.UTMPoint; -import java.lang.ref.WeakReference; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; - import net.osmand.Collator; import net.osmand.CollatorStringMatcher; import net.osmand.LocationConvert; @@ -58,6 +52,13 @@ import net.osmand.search.core.SearchPhrase; import net.osmand.util.Algorithms; import net.osmand.util.MapUtils; +import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + import static android.text.InputType.TYPE_CLASS_PHONE; import static android.text.InputType.TYPE_CLASS_TEXT; import static android.text.InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS; diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchCustomPoiFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchCustomPoiFragment.java index 35ab9b2a8e..71c2911018 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchCustomPoiFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchCustomPoiFragment.java @@ -4,15 +4,6 @@ import android.content.Context; import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.AppCompatImageView; -import android.support.v7.widget.AppCompatTextView; -import android.support.v7.widget.SwitchCompat; -import android.support.v7.widget.Toolbar; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -23,13 +14,23 @@ import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.ListView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.appcompat.widget.AppCompatTextView; +import androidx.appcompat.widget.SwitchCompat; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; + import net.osmand.osm.PoiCategory; import net.osmand.osm.PoiType; import net.osmand.plus.DialogListItemAdapter; -import net.osmand.plus.UiUtilities; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; import net.osmand.plus.poi.PoiFiltersHelper; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.render.RenderingIcons; diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java index 495b341b1e..a6cc3df1c3 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java @@ -7,18 +7,6 @@ import android.content.Intent; import android.content.res.Resources; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.TabLayout; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.app.FragmentTransaction; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; import android.text.Editable; import android.text.Spannable; import android.text.SpannableString; @@ -43,8 +31,25 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.fragment.app.FragmentTransaction; +import androidx.viewpager.widget.ViewPager; + +import com.google.android.material.tabs.TabLayout; + import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; +import net.osmand.GPXUtilities; +import net.osmand.GPXUtilities.GPXFile; +import net.osmand.GPXUtilities.WptPt; import net.osmand.Location; import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; @@ -61,9 +66,6 @@ import net.osmand.osm.PoiType; import net.osmand.plus.AppInitializer; import net.osmand.plus.AppInitializer.AppInitializeListener; import net.osmand.plus.FavouritesDbHelper; -import net.osmand.GPXUtilities; -import net.osmand.GPXUtilities.GPXFile; -import net.osmand.GPXUtilities.WptPt; import net.osmand.plus.LockableViewPager; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener; @@ -101,7 +103,6 @@ import net.osmand.util.MapUtils; import java.io.File; import java.io.IOException; -import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java index 37f9587a7c..fd13f09dc1 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java @@ -1,9 +1,11 @@ package net.osmand.plus.search; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import net.osmand.GPXUtilities; import net.osmand.binary.BinaryMapIndexReader; import net.osmand.binary.BinaryMapIndexReader.SearchPoiTypeFilter; import net.osmand.data.Amenity; @@ -16,7 +18,6 @@ import net.osmand.osm.MapPoiTypes; import net.osmand.osm.PoiCategory; import net.osmand.plus.FavouritesDbHelper; import net.osmand.plus.FavouritesDbHelper.FavoriteGroup; -import net.osmand.GPXUtilities; import net.osmand.plus.GpxSelectionHelper; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java index 016cae3dfd..f1283eb1c9 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java @@ -3,9 +3,6 @@ package net.osmand.plus.search; import android.app.Activity; import android.content.Context; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.v4.view.ViewCompat; -import android.support.v7.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -14,6 +11,11 @@ import android.widget.CheckBox; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.core.view.ViewCompat; + import net.osmand.AndroidUtils; import net.osmand.CollatorStringMatcher; import net.osmand.access.AccessibilityAssistant; diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchPoiFilterFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchPoiFilterFragment.java index feb18b7a4d..c462353086 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchPoiFilterFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchPoiFilterFragment.java @@ -4,17 +4,9 @@ import android.content.Context; import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.PopupMenu; -import android.support.v7.widget.SwitchCompat; -import android.support.v7.widget.Toolbar; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; -import android.util.Log; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; @@ -31,16 +23,24 @@ import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.PopupMenu; +import androidx.appcompat.widget.SwitchCompat; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.DialogFragment; + import net.osmand.AndroidUtils; import net.osmand.osm.AbstractPoiType; import net.osmand.osm.MapPoiTypes; import net.osmand.osm.PoiCategory; import net.osmand.osm.PoiFilter; import net.osmand.osm.PoiType; -import net.osmand.plus.UiUtilities; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; import net.osmand.plus.dialogs.DirectionsDialogs; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.render.RenderingIcons; diff --git a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchButtonListItem.java b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchButtonListItem.java index 8324f698aa..691b098859 100644 --- a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchButtonListItem.java +++ b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchButtonListItem.java @@ -1,12 +1,13 @@ package net.osmand.plus.search.listitems; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; import android.text.Spannable; import android.text.SpannableString; import android.text.Spanned; import android.view.View; +import androidx.annotation.NonNull; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchMoreListItem.java b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchMoreListItem.java index bf23afcb70..ebb5d36daa 100644 --- a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchMoreListItem.java +++ b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchMoreListItem.java @@ -1,6 +1,6 @@ package net.osmand.plus.search.listitems; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java index d53fb66350..27758dc6e2 100644 --- a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java @@ -8,34 +8,6 @@ import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.AppBarLayout; -import android.support.v14.preference.MultiSelectListPreference; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.drawable.DrawableCompat; -import android.support.v4.view.ViewCompat; -import android.support.v7.preference.EditTextPreference; -import android.support.v7.preference.ListPreference; -import android.support.v7.preference.Preference; -import android.support.v7.preference.Preference.OnPreferenceChangeListener; -import android.support.v7.preference.Preference.OnPreferenceClickListener; -import android.support.v7.preference.PreferenceCategory; -import android.support.v7.preference.PreferenceFragmentCompat; -import android.support.v7.preference.PreferenceGroup; -import android.support.v7.preference.PreferenceGroupAdapter; -import android.support.v7.preference.PreferenceManager; -import android.support.v7.preference.PreferenceScreen; -import android.support.v7.preference.PreferenceViewHolder; -import android.support.v7.preference.SwitchPreferenceCompat; -import android.support.v7.preference.TwoStatePreference; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -43,6 +15,36 @@ import android.widget.CompoundButton; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; +import androidx.core.view.ViewCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; +import androidx.preference.EditTextPreference; +import androidx.preference.ListPreference; +import androidx.preference.MultiSelectListPreference; +import androidx.preference.Preference; +import androidx.preference.Preference.OnPreferenceChangeListener; +import androidx.preference.Preference.OnPreferenceClickListener; +import androidx.preference.PreferenceCategory; +import androidx.preference.PreferenceFragmentCompat; +import androidx.preference.PreferenceGroup; +import androidx.preference.PreferenceGroupAdapter; +import androidx.preference.PreferenceManager; +import androidx.preference.PreferenceScreen; +import androidx.preference.PreferenceViewHolder; +import androidx.preference.SwitchPreferenceCompat; +import androidx.preference.TwoStatePreference; +import androidx.recyclerview.widget.RecyclerView; + +import com.google.android.material.appbar.AppBarLayout; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.access.AccessibilitySettingsFragment; diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java index aa190ab5f7..3ac420514e 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java @@ -9,24 +9,25 @@ import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.ColorRes; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceCategory; -import android.support.v7.preference.PreferenceGroup; -import android.support.v7.preference.PreferenceGroupAdapter; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.ColorRes; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; +import androidx.preference.Preference; +import androidx.preference.PreferenceCategory; +import androidx.preference.PreferenceGroup; +import androidx.preference.PreferenceGroupAdapter; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; diff --git a/OsmAnd/src/net/osmand/plus/settings/CoordinatesFormatFragment.java b/OsmAnd/src/net/osmand/plus/settings/CoordinatesFormatFragment.java index c62ac01ddd..98dd6fb34a 100644 --- a/OsmAnd/src/net/osmand/plus/settings/CoordinatesFormatFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/CoordinatesFormatFragment.java @@ -2,12 +2,6 @@ package net.osmand.plus.settings; import android.content.Context; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentManager; -import android.support.v7.preference.CheckBoxPreference; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; -import android.support.v7.preference.PreferenceViewHolder; import android.text.SpannableStringBuilder; import android.text.Spanned; import android.text.TextPaint; @@ -15,6 +9,13 @@ import android.text.style.ClickableSpan; import android.view.View; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentManager; +import androidx.preference.CheckBoxPreference; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; +import androidx.preference.PreferenceViewHolder; + import net.osmand.Location; import net.osmand.data.PointDescription; import net.osmand.plus.ApplicationMode; diff --git a/OsmAnd/src/net/osmand/plus/settings/DataStorageFragment.java b/OsmAnd/src/net/osmand/plus/settings/DataStorageFragment.java index 4415163b38..147928ec6a 100644 --- a/OsmAnd/src/net/osmand/plus/settings/DataStorageFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/DataStorageFragment.java @@ -8,19 +8,20 @@ import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.preference.CheckBoxPreference; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; -import android.support.v7.preference.PreferenceViewHolder; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; +import androidx.preference.CheckBoxPreference; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; +import androidx.preference.PreferenceViewHolder; + import net.osmand.AndroidUtils; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; @@ -40,9 +41,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.lang.ref.WeakReference; import java.text.DecimalFormat; -import java.text.MessageFormat; import java.util.ArrayList; -import java.util.Locale; import static net.osmand.plus.settings.DataStorageHelper.INTERNAL_STORAGE; import static net.osmand.plus.settings.DataStorageHelper.MANUALLY_SPECIFIED; @@ -50,8 +49,8 @@ import static net.osmand.plus.settings.DataStorageHelper.OTHER_MEMORY; import static net.osmand.plus.settings.DataStorageHelper.TILES_MEMORY; import static net.osmand.plus.settings.bottomsheets.ChangeDataStorageBottomSheet.CHOSEN_DIRECTORY; import static net.osmand.plus.settings.bottomsheets.ChangeDataStorageBottomSheet.MOVE_DATA; -import static net.osmand.plus.settings.bottomsheets.SelectFolderBottomSheet.PATH_CHANGED; import static net.osmand.plus.settings.bottomsheets.SelectFolderBottomSheet.NEW_PATH; +import static net.osmand.plus.settings.bottomsheets.SelectFolderBottomSheet.PATH_CHANGED; public class DataStorageFragment extends BaseSettingsFragment implements DataStorageHelper.UpdateMemoryInfoUIAdapter { public final static int PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE = 500; diff --git a/OsmAnd/src/net/osmand/plus/settings/DataStorageMenuItem.java b/OsmAnd/src/net/osmand/plus/settings/DataStorageMenuItem.java index cd49cfd21d..630529164f 100644 --- a/OsmAnd/src/net/osmand/plus/settings/DataStorageMenuItem.java +++ b/OsmAnd/src/net/osmand/plus/settings/DataStorageMenuItem.java @@ -2,7 +2,8 @@ package net.osmand.plus.settings; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.IdRes; + +import androidx.annotation.IdRes; public class DataStorageMenuItem implements Parcelable, Cloneable { diff --git a/OsmAnd/src/net/osmand/plus/settings/DialogsAndNotificationsSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/DialogsAndNotificationsSettingsFragment.java index 54c5adfcab..e6309bb14a 100644 --- a/OsmAnd/src/net/osmand/plus/settings/DialogsAndNotificationsSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/DialogsAndNotificationsSettingsFragment.java @@ -1,10 +1,11 @@ package net.osmand.plus.settings; -import android.support.v7.preference.Preference; -import android.support.v7.preference.SwitchPreferenceCompat; import android.view.LayoutInflater; import android.view.View; +import androidx.preference.Preference; +import androidx.preference.SwitchPreferenceCompat; + import net.osmand.plus.R; public class DialogsAndNotificationsSettingsFragment extends BaseSettingsFragment { diff --git a/OsmAnd/src/net/osmand/plus/settings/DuplicatesSettingsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/DuplicatesSettingsAdapter.java index ff49348940..be8b05e1da 100644 --- a/OsmAnd/src/net/osmand/plus/settings/DuplicatesSettingsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/DuplicatesSettingsAdapter.java @@ -1,13 +1,14 @@ package net.osmand.plus.settings; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.AndroidUtils; import net.osmand.map.ITileSource; import net.osmand.plus.ApplicationMode; @@ -22,7 +23,6 @@ import net.osmand.plus.quickaction.QuickAction; import net.osmand.plus.render.RenderingIcons; import net.osmand.util.Algorithms; - import java.io.File; import java.util.List; diff --git a/OsmAnd/src/net/osmand/plus/settings/ExportImportSettingsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/ExportImportSettingsAdapter.java index 74aa1ac59e..77233a1c8d 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ExportImportSettingsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/ExportImportSettingsAdapter.java @@ -1,8 +1,6 @@ package net.osmand.plus.settings; import android.content.res.ColorStateList; -import android.support.v4.content.ContextCompat; -import android.support.v4.widget.CompoundButtonCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -11,6 +9,9 @@ import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; +import androidx.core.content.ContextCompat; +import androidx.core.widget.CompoundButtonCompat; + import net.osmand.AndroidUtils; import net.osmand.map.ITileSource; import net.osmand.plus.ApplicationMode; @@ -32,8 +33,8 @@ import java.util.ArrayList; import java.util.List; import static net.osmand.view.ThreeStateCheckbox.State.CHECKED; -import static net.osmand.view.ThreeStateCheckbox.State.UNCHECKED; import static net.osmand.view.ThreeStateCheckbox.State.MISC; +import static net.osmand.view.ThreeStateCheckbox.State.UNCHECKED; class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { diff --git a/OsmAnd/src/net/osmand/plus/settings/ExportProfileBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/ExportProfileBottomSheet.java index 2c58ee66a6..bd5d430317 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ExportProfileBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/ExportProfileBottomSheet.java @@ -7,16 +7,17 @@ import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.widget.ExpandableListView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java index c9b3959867..3800689bce 100644 --- a/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java @@ -6,14 +6,6 @@ import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentManager; -import android.support.v7.app.AlertDialog; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceViewHolder; -import android.support.v7.preference.SwitchPreferenceCompat; -import android.support.v7.widget.AppCompatCheckedTextView; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -21,6 +13,15 @@ import android.widget.ArrayAdapter; import android.widget.CompoundButton; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.AppCompatCheckedTextView; +import androidx.appcompat.widget.SwitchCompat; +import androidx.fragment.app.FragmentManager; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; +import androidx.preference.SwitchPreferenceCompat; + import net.osmand.data.PointDescription; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java index 662274dde7..102616c8f1 100644 --- a/OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java @@ -2,13 +2,14 @@ package net.osmand.plus.settings; import android.app.Activity; import android.content.Context; -import android.support.v4.app.FragmentManager; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceViewHolder; -import android.support.v7.preference.SwitchPreferenceCompat; import android.util.Pair; import android.widget.ImageView; +import androidx.fragment.app.FragmentManager; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; +import androidx.preference.SwitchPreferenceCompat; + import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/settings/ImportDuplicatesFragment.java b/OsmAnd/src/net/osmand/plus/settings/ImportDuplicatesFragment.java index 2b4fe6990d..f05b8216c0 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ImportDuplicatesFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ImportDuplicatesFragment.java @@ -2,22 +2,21 @@ package net.osmand.plus.settings; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.AppBarLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.view.ViewCompat; -import android.support.v4.widget.NestedScrollView; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.widget.LinearLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.Toolbar; +import androidx.core.widget.NestedScrollView; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.AndroidUtils; import net.osmand.map.ITileSource; import net.osmand.plus.AppInitializer; diff --git a/OsmAnd/src/net/osmand/plus/settings/ImportSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ImportSettingsFragment.java index bf25711b99..563e634d4e 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ImportSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ImportSettingsFragment.java @@ -4,19 +4,19 @@ import android.content.Context; import android.content.DialogInterface; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.AppBarLayout; -import android.support.v4.app.FragmentManager; -import android.support.v4.view.ViewCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ExpandableListView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; +import androidx.core.view.ViewCompat; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.map.ITileSource; import net.osmand.map.TileSourceManager; diff --git a/OsmAnd/src/net/osmand/plus/settings/LiveMonitoringFragment.java b/OsmAnd/src/net/osmand/plus/settings/LiveMonitoringFragment.java index fcd0461332..ae047b2596 100644 --- a/OsmAnd/src/net/osmand/plus/settings/LiveMonitoringFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/LiveMonitoringFragment.java @@ -2,14 +2,15 @@ package net.osmand.plus.settings; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.preference.Preference; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.widget.TextView; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentManager; +import androidx.preference.Preference; + import net.osmand.AndroidUtils; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java index ca6f0dcdab..2143d12698 100644 --- a/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java @@ -3,20 +3,22 @@ package net.osmand.plus.settings; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.ColorRes; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceCategory; -import android.support.v7.preference.PreferenceViewHolder; import android.view.View; +import androidx.annotation.ColorRes; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; +import androidx.preference.Preference; +import androidx.preference.PreferenceCategory; +import androidx.preference.PreferenceViewHolder; + import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; -import net.osmand.plus.SettingsHelper.*; +import net.osmand.plus.SettingsHelper.SettingsItem; +import net.osmand.plus.SettingsHelper.SettingsItemType; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.helpers.AndroidUiHelper; diff --git a/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java index 313243a1c8..848229be3e 100644 --- a/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java @@ -1,6 +1,6 @@ package net.osmand.plus.settings; -import android.support.v7.preference.Preference; +import androidx.preference.Preference; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java index 7aca4c3483..b0cd78e02b 100644 --- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java @@ -2,8 +2,9 @@ package net.osmand.plus.settings; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.v7.preference.Preference; -import android.support.v7.preference.SwitchPreferenceCompat; + +import androidx.preference.Preference; +import androidx.preference.SwitchPreferenceCompat; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java index fb8c17708d..7b0ade0bab 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java @@ -10,14 +10,6 @@ import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.LayerDrawable; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.drawable.DrawableCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceViewHolder; import android.text.Editable; import android.text.InputType; import android.text.TextWatcher; @@ -30,6 +22,15 @@ import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; diff --git a/OsmAnd/src/net/osmand/plus/settings/ProxySettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ProxySettingsFragment.java index a7479f63cc..ef48ee3019 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ProxySettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ProxySettingsFragment.java @@ -1,14 +1,15 @@ package net.osmand.plus.settings; import android.graphics.drawable.Drawable; -import android.support.v4.content.ContextCompat; -import android.support.v7.preference.Preference; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.widget.TextView; import android.widget.Toast; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.preference.Preference; + import net.osmand.AndroidUtils; import net.osmand.osm.io.NetworkUtils; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index ee1b308c39..86686526b6 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -6,19 +6,18 @@ import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; -import android.support.v7.preference.PreferenceViewHolder; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.SeekBar; import android.widget.TextView; -import net.osmand.GPXUtilities; -import net.osmand.Location; +import androidx.appcompat.app.AlertDialog; +import androidx.core.content.ContextCompat; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; +import androidx.preference.PreferenceViewHolder; + import net.osmand.StateChangedListener; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmAndFormatter; diff --git a/OsmAnd/src/net/osmand/plus/settings/ScreenAlertsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ScreenAlertsFragment.java index 5f54066b5b..4e2a1dd8a1 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ScreenAlertsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ScreenAlertsFragment.java @@ -3,16 +3,17 @@ package net.osmand.plus.settings; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.v4.content.ContextCompat; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceViewHolder; -import android.support.v7.preference.SwitchPreferenceCompat; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; +import androidx.preference.SwitchPreferenceCompat; + import net.osmand.AndroidUtils; import net.osmand.plus.ApplicationMode; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/settings/TurnScreenOnFragment.java b/OsmAnd/src/net/osmand/plus/settings/TurnScreenOnFragment.java index cf0c1ca130..85eee40cd1 100644 --- a/OsmAnd/src/net/osmand/plus/settings/TurnScreenOnFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/TurnScreenOnFragment.java @@ -1,15 +1,16 @@ package net.osmand.plus.settings; import android.graphics.drawable.ColorDrawable; -import android.support.v4.content.ContextCompat; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceViewHolder; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; + import net.osmand.AndroidUtils; import net.osmand.plus.ApplicationMode; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java index 0d2c10adc7..93e91d73b4 100644 --- a/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java @@ -2,10 +2,11 @@ package net.osmand.plus.settings; import android.content.Context; import android.graphics.drawable.Drawable; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceViewHolder; import android.widget.ImageView; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; + import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java b/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java index ef9c6e38f2..efd6c7bd79 100644 --- a/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java @@ -7,17 +7,18 @@ import android.content.Intent; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.media.AudioManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceViewHolder; -import android.support.v7.preference.SwitchPreferenceCompat; -import android.support.v7.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; +import androidx.preference.SwitchPreferenceCompat; + import net.osmand.AndroidUtils; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BasePreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BasePreferenceBottomSheet.java index c40c2739dd..43e8af27f4 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BasePreferenceBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BasePreferenceBottomSheet.java @@ -1,11 +1,12 @@ package net.osmand.plus.settings.bottomsheets; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v7.preference.DialogPreference.TargetFragment; -import android.support.v7.preference.Preference; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.preference.DialogPreference.TargetFragment; +import androidx.preference.Preference; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java index 18657b620c..7eb843fea6 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java @@ -4,12 +4,13 @@ import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeDataStorageBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeDataStorageBottomSheet.java index 6df896b194..fd28c3b974 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeDataStorageBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeDataStorageBottomSheet.java @@ -2,14 +2,15 @@ package net.osmand.plus.settings.bottomsheets; import android.content.Context; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.style.ForegroundColorSpan; import android.view.View; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.PlatformUtil; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeGeneralProfilesPrefBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeGeneralProfilesPrefBottomSheet.java index f4851ab5a6..5f28621ef1 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeGeneralProfilesPrefBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeGeneralProfilesPrefBottomSheet.java @@ -1,12 +1,13 @@ package net.osmand.plus.settings.bottomsheets; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/EditTextPreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/EditTextPreferenceBottomSheet.java index 3868fcc6f2..3438f22da1 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/EditTextPreferenceBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/EditTextPreferenceBottomSheet.java @@ -2,14 +2,15 @@ package net.osmand.plus.settings.bottomsheets; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; import android.view.View; import android.widget.EditText; import android.widget.RelativeLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.plus.ApplicationMode; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/MultiSelectPreferencesBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/MultiSelectPreferencesBottomSheet.java index 49a7664e98..09973463c5 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/MultiSelectPreferencesBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/MultiSelectPreferencesBottomSheet.java @@ -1,12 +1,13 @@ package net.osmand.plus.settings.bottomsheets; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/OsmLoginDataBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/OsmLoginDataBottomSheet.java index 8865458e85..24bea5af6a 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/OsmLoginDataBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/OsmLoginDataBottomSheet.java @@ -3,14 +3,15 @@ package net.osmand.plus.settings.bottomsheets; import android.content.Context; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v7.preference.Preference; import android.view.View; import android.widget.EditText; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.preference.Preference; + import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ResetProfilePrefsBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ResetProfilePrefsBottomSheet.java index 70bd98036e..dc8109fed1 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ResetProfilePrefsBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ResetProfilePrefsBottomSheet.java @@ -6,10 +6,11 @@ import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; + +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; import net.osmand.plus.ApplicationMode; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/SelectFolderBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/SelectFolderBottomSheet.java index a64724f140..8dda02c00f 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/SelectFolderBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/SelectFolderBottomSheet.java @@ -2,13 +2,14 @@ package net.osmand.plus.settings.bottomsheets; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; import android.view.View; import android.widget.EditText; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.PlatformUtil; import net.osmand.plus.R; import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/SingleSelectPreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/SingleSelectPreferenceBottomSheet.java index 833276f3cb..ff7bef4d5f 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/SingleSelectPreferenceBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/SingleSelectPreferenceBottomSheet.java @@ -2,12 +2,13 @@ package net.osmand.plus.settings.bottomsheets; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.plus.ApplicationMode; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/settings/preferences/EditTextPreferenceEx.java b/OsmAnd/src/net/osmand/plus/settings/preferences/EditTextPreferenceEx.java index c4fa1d674c..3677c73452 100644 --- a/OsmAnd/src/net/osmand/plus/settings/preferences/EditTextPreferenceEx.java +++ b/OsmAnd/src/net/osmand/plus/settings/preferences/EditTextPreferenceEx.java @@ -1,9 +1,10 @@ package net.osmand.plus.settings.preferences; import android.content.Context; -import android.support.v7.preference.EditTextPreference; import android.util.AttributeSet; +import androidx.preference.EditTextPreference; + public class EditTextPreferenceEx extends EditTextPreference { private String description; diff --git a/OsmAnd/src/net/osmand/plus/settings/preferences/ListPreferenceEx.java b/OsmAnd/src/net/osmand/plus/settings/preferences/ListPreferenceEx.java index 9b96d5f354..de1aaafe54 100644 --- a/OsmAnd/src/net/osmand/plus/settings/preferences/ListPreferenceEx.java +++ b/OsmAnd/src/net/osmand/plus/settings/preferences/ListPreferenceEx.java @@ -2,10 +2,11 @@ package net.osmand.plus.settings.preferences; import android.content.Context; import android.content.res.TypedArray; -import android.support.v7.preference.DialogPreference; -import android.support.v7.preference.PreferenceDataStore; import android.util.AttributeSet; +import androidx.preference.DialogPreference; +import androidx.preference.PreferenceDataStore; + import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandSettings.PreferencesDataStore; diff --git a/OsmAnd/src/net/osmand/plus/settings/preferences/MultiSelectBooleanPreference.java b/OsmAnd/src/net/osmand/plus/settings/preferences/MultiSelectBooleanPreference.java index ea15a80d42..f1a5135cb9 100644 --- a/OsmAnd/src/net/osmand/plus/settings/preferences/MultiSelectBooleanPreference.java +++ b/OsmAnd/src/net/osmand/plus/settings/preferences/MultiSelectBooleanPreference.java @@ -1,10 +1,11 @@ package net.osmand.plus.settings.preferences; import android.content.Context; -import android.support.v14.preference.MultiSelectListPreference; -import android.support.v7.preference.PreferenceDataStore; import android.util.AttributeSet; +import androidx.preference.MultiSelectListPreference; +import androidx.preference.PreferenceDataStore; + import net.osmand.plus.OsmandSettings.PreferencesDataStore; import java.util.HashSet; diff --git a/OsmAnd/src/net/osmand/plus/settings/preferences/SwitchPreferenceEx.java b/OsmAnd/src/net/osmand/plus/settings/preferences/SwitchPreferenceEx.java index 0c6f797308..18b46138c4 100644 --- a/OsmAnd/src/net/osmand/plus/settings/preferences/SwitchPreferenceEx.java +++ b/OsmAnd/src/net/osmand/plus/settings/preferences/SwitchPreferenceEx.java @@ -1,9 +1,10 @@ package net.osmand.plus.settings.preferences; import android.content.Context; -import android.support.v7.preference.SwitchPreferenceCompat; import android.util.AttributeSet; +import androidx.preference.SwitchPreferenceCompat; + public class SwitchPreferenceEx extends SwitchPreferenceCompat { private String description; diff --git a/OsmAnd/src/net/osmand/plus/skimapsplugin/SkiMapsPlugin.java b/OsmAnd/src/net/osmand/plus/skimapsplugin/SkiMapsPlugin.java index b188b3b33d..8d49d2dc91 100644 --- a/OsmAnd/src/net/osmand/plus/skimapsplugin/SkiMapsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/skimapsplugin/SkiMapsPlugin.java @@ -1,14 +1,14 @@ package net.osmand.plus.skimapsplugin; import android.app.Activity; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; -import net.osmand.plus.settings.BaseSettingsFragment; import java.util.Collections; import java.util.List; diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java b/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java index b733d3e94f..f564fc05a4 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java @@ -3,13 +3,14 @@ package net.osmand.plus.srtmplugin; import android.app.Activity; import android.content.Context; import android.content.DialogInterface; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; import android.view.ContextThemeWrapper; import android.view.View; import android.widget.ArrayAdapter; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.data.LatLon; import net.osmand.plus.ApplicationMode; @@ -29,7 +30,6 @@ import net.osmand.plus.download.DownloadIndexesThread; import net.osmand.plus.download.DownloadResources; import net.osmand.plus.download.IndexItem; import net.osmand.plus.inapp.InAppPurchaseHelper; -import net.osmand.plus.settings.BaseSettingsFragment; import net.osmand.plus.views.OsmandMapTileView; import net.osmand.render.RenderingRuleProperty; import net.osmand.util.Algorithms; diff --git a/OsmAnd/src/net/osmand/plus/views/AidlMapLayer.java b/OsmAnd/src/net/osmand/plus/views/AidlMapLayer.java index a324c1dbef..b6eb8dd177 100644 --- a/OsmAnd/src/net/osmand/plus/views/AidlMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/AidlMapLayer.java @@ -11,10 +11,11 @@ import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; import android.net.Uri; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.AndroidUtils; import net.osmand.aidl.AidlMapLayerWrapper; import net.osmand.aidl.AidlMapPointWrapper; diff --git a/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java b/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java index bcdef370ee..0323498479 100644 --- a/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java +++ b/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java @@ -1,11 +1,12 @@ package net.osmand.plus.views; import android.os.SystemClock; -import android.support.v4.util.Pair; import android.view.animation.AccelerateDecelerateInterpolator; import android.view.animation.DecelerateInterpolator; import android.view.animation.LinearInterpolator; +import androidx.core.util.Pair; + import net.osmand.PlatformUtil; import net.osmand.core.android.MapRendererView; import net.osmand.data.RotatedTileBox; diff --git a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java index 7b56728c37..c9e785f9eb 100644 --- a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java @@ -9,10 +9,6 @@ import android.graphics.Paint; import android.graphics.PointF; import android.graphics.Rect; import android.os.Vibrator; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresPermission; -import android.support.v4.content.ContextCompat; import android.text.TextUtils; import android.view.GestureDetector; import android.view.MotionEvent; @@ -21,6 +17,11 @@ import android.widget.ArrayAdapter; import android.widget.FrameLayout.LayoutParams; import android.widget.ImageView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresPermission; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; import net.osmand.NativeLibrary.RenderedObject; @@ -48,7 +49,6 @@ import net.osmand.data.TransportStop; import net.osmand.osm.PoiCategory; import net.osmand.osm.PoiFilter; import net.osmand.osm.PoiType; -import net.osmand.osm.edit.OsmMapUtils; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/views/DownloadedRegionsLayer.java b/OsmAnd/src/net/osmand/plus/views/DownloadedRegionsLayer.java index f9a23bc7d3..b3b5528c2e 100644 --- a/OsmAnd/src/net/osmand/plus/views/DownloadedRegionsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/DownloadedRegionsLayer.java @@ -8,11 +8,12 @@ import android.graphics.Paint.Join; import android.graphics.Paint.Style; import android.graphics.Path; import android.graphics.PointF; -import android.support.annotation.NonNull; import android.text.TextPaint; import android.util.DisplayMetrics; import android.view.WindowManager; +import androidx.annotation.NonNull; + import net.osmand.IndexConstants; import net.osmand.binary.BinaryMapDataObject; import net.osmand.binary.BinaryMapIndexReader.TagValuePair; diff --git a/OsmAnd/src/net/osmand/plus/views/FavouritesLayer.java b/OsmAnd/src/net/osmand/plus/views/FavouritesLayer.java index e6ad889b5f..3f9671d23c 100644 --- a/OsmAnd/src/net/osmand/plus/views/FavouritesLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/FavouritesLayer.java @@ -8,12 +8,13 @@ import android.graphics.Paint; import android.graphics.PointF; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.util.Pair; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index 43c3fcb164..b2e135346a 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -16,12 +16,13 @@ import android.graphics.Rect; import android.graphics.RectF; import android.graphics.drawable.LayerDrawable; import android.os.AsyncTask; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.util.Pair; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import net.osmand.GPXUtilities; import net.osmand.GPXUtilities.GPXFile; import net.osmand.GPXUtilities.TrkSegment; diff --git a/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java b/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java index 1ab8daa1e6..002de90d66 100644 --- a/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java @@ -7,8 +7,9 @@ import android.graphics.ColorMatrix; import android.graphics.ColorMatrixColorFilter; import android.graphics.Paint; import android.graphics.PointF; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java index 76243f665f..a3c3ff181b 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java @@ -13,12 +13,6 @@ import android.graphics.ColorFilter; import android.graphics.PointF; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; -import android.support.v4.view.ViewCompat; -import android.support.v4.view.ViewPropertyAnimatorCompat; -import android.support.v4.view.ViewPropertyAnimatorListener; -import android.support.v7.app.AlertDialog; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; @@ -27,6 +21,13 @@ import android.widget.LinearLayout; import android.widget.SeekBar; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.core.app.ActivityCompat; +import androidx.core.view.ViewCompat; +import androidx.core.view.ViewPropertyAnimatorCompat; +import androidx.core.view.ViewPropertyAnimatorListener; + import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.core.android.MapRendererContext; diff --git a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java index 1fdd1a1e0a..807201c56f 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java @@ -2,13 +2,14 @@ package net.osmand.plus.views; import android.graphics.Canvas; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageButton; import android.widget.LinearLayout; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import net.osmand.data.RotatedTileBox; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; @@ -36,7 +37,24 @@ import net.osmand.plus.views.mapwidgets.RouteInfoWidgetsFactory.RulerWidget; import net.osmand.plus.views.mapwidgets.RouteInfoWidgetsFactory.TimeControlWidgetState; import net.osmand.plus.views.mapwidgets.TextInfoWidget; -import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.*; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_ALTITUDE; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_BATTERY; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_BEARING; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_COMPASS; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_DISTANCE; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_GPS_INFO; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_INTERMEDIATE_DISTANCE; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_INTERMEDIATE_TIME; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_MARKER_1; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_MARKER_2; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_MAX_SPEED; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_NEXT_NEXT_TURN; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_NEXT_TURN; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_NEXT_TURN_SMALL; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_PLAIN_TIME; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_RULER; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_SPEED; +import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_TIME; public class MapInfoLayer extends OsmandMapLayer { private final MapActivity map; diff --git a/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java b/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java index d8ce1883a1..2f11363cb8 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java @@ -12,23 +12,25 @@ import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; import android.os.Handler; import android.os.Message; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v4.content.ContextCompat; import android.text.TextPaint; import android.text.TextUtils; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + +import com.google.android.material.snackbar.Snackbar; + +import net.osmand.GPXUtilities.TrkSegment; import net.osmand.Location; import net.osmand.data.Amenity; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.data.QuadPoint; import net.osmand.data.RotatedTileBox; -import net.osmand.GPXUtilities.TrkSegment; import net.osmand.plus.MapMarkersHelper; import net.osmand.plus.MapMarkersHelper.MapMarker; import net.osmand.plus.OsmAndConstants; diff --git a/OsmAnd/src/net/osmand/plus/views/MapQuickActionLayer.java b/OsmAnd/src/net/osmand/plus/views/MapQuickActionLayer.java index 2236ca25d5..30859cd46c 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapQuickActionLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapQuickActionLayer.java @@ -9,10 +9,6 @@ import android.graphics.Canvas; import android.graphics.PointF; import android.os.Build; import android.os.Vibrator; -import android.support.annotation.DimenRes; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; -import android.support.v4.util.Pair; import android.view.MotionEvent; import android.view.View; import android.view.ViewAnimationUtils; @@ -20,6 +16,11 @@ import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.ImageView; +import androidx.annotation.DimenRes; +import androidx.core.content.ContextCompat; +import androidx.core.util.Pair; +import androidx.fragment.app.Fragment; + import com.getkeepsafe.taptargetview.TapTarget; import com.getkeepsafe.taptargetview.TapTargetView; diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java index 8e02df7c76..1ced6f9e16 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java @@ -17,11 +17,12 @@ import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; import android.graphics.RectF; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.v4.graphics.ColorUtils; import android.util.Pair; import android.view.MotionEvent; +import androidx.annotation.NonNull; +import androidx.core.graphics.ColorUtils; + import net.osmand.binary.BinaryMapIndexReader; import net.osmand.data.Amenity; import net.osmand.data.LatLon; diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index 723e683f13..1ecc28240f 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -12,8 +12,6 @@ import android.graphics.PointF; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.Drawable; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.Toolbar; import android.text.util.Linkify; import android.util.TypedValue; import android.view.View; @@ -23,6 +21,9 @@ import android.widget.LinearLayout.LayoutParams; import android.widget.ScrollView; import android.widget.TextView; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; + import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; import net.osmand.ValueHolder; diff --git a/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java b/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java index fa7b29ad16..d32400ccc4 100644 --- a/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java @@ -10,8 +10,9 @@ import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.RectF; import android.graphics.drawable.LayerDrawable; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.drawable.DrawableCompat; + +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; import net.osmand.Location; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java b/OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java index 38875d3344..87a48227d1 100644 --- a/OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java @@ -8,9 +8,10 @@ import android.graphics.Paint; import android.graphics.Paint.Align; import android.graphics.Paint.Style; import android.graphics.PointF; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/views/Renderable.java b/OsmAnd/src/net/osmand/plus/views/Renderable.java index 7ef7d3bc27..5204ca9332 100644 --- a/OsmAnd/src/net/osmand/plus/views/Renderable.java +++ b/OsmAnd/src/net/osmand/plus/views/Renderable.java @@ -2,7 +2,8 @@ package net.osmand.plus.views; import android.graphics.Canvas; import android.graphics.Paint; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.GPXUtilities.WptPt; import net.osmand.data.QuadRect; diff --git a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java index 3996cbde5c..8024ce3a30 100644 --- a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java @@ -12,11 +12,12 @@ import android.graphics.PointF; import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.LayerDrawable; -import android.support.annotation.ColorInt; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.util.Pair; +import androidx.annotation.ColorInt; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.PlatformUtil; diff --git a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java index 1ee602c712..4286e1ac75 100644 --- a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java @@ -16,11 +16,12 @@ import android.graphics.Shader; import android.graphics.Typeface; import android.os.Handler; import android.os.Message; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; import android.view.MotionEvent; import android.view.View; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.data.LatLon; diff --git a/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java b/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java index ee19fce4f0..676837dd8f 100644 --- a/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java @@ -9,10 +9,11 @@ import android.graphics.Path; import android.graphics.PointF; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; -import android.support.v4.content.ContextCompat; import android.util.DisplayMetrics; import android.view.WindowManager; +import androidx.core.content.ContextCompat; + import net.osmand.ResultMatcher; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; diff --git a/OsmAnd/src/net/osmand/plus/views/TurnPathHelper.java b/OsmAnd/src/net/osmand/plus/views/TurnPathHelper.java index 5fdd5ea83c..a52c043a44 100644 --- a/OsmAnd/src/net/osmand/plus/views/TurnPathHelper.java +++ b/OsmAnd/src/net/osmand/plus/views/TurnPathHelper.java @@ -12,7 +12,8 @@ import android.graphics.PointF; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import net.osmand.plus.R; import net.osmand.router.TurnType; diff --git a/OsmAnd/src/net/osmand/plus/views/controls/DelayAutoCompleteTextView.java b/OsmAnd/src/net/osmand/plus/views/controls/DelayAutoCompleteTextView.java index f255a9ddbf..8ccfa91c42 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/DelayAutoCompleteTextView.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/DelayAutoCompleteTextView.java @@ -5,7 +5,7 @@ import android.os.Handler; import android.os.Message; import android.util.AttributeSet; -public class DelayAutoCompleteTextView extends android.support.v7.widget.AppCompatAutoCompleteTextView { +public class DelayAutoCompleteTextView extends androidx.appcompat.widget.AppCompatAutoCompleteTextView { private static final int MESSAGE_TEXT_CHANGED = 100; private static final int DEFAULT_AUTOCOMPLETE_DELAY = 1000; diff --git a/OsmAnd/src/net/osmand/plus/views/controls/DynamicListView.java b/OsmAnd/src/net/osmand/plus/views/controls/DynamicListView.java index 7350e6cdb4..a90d5ed65c 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/DynamicListView.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/DynamicListView.java @@ -28,8 +28,6 @@ import android.graphics.Paint; import android.graphics.Rect; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.v4.view.ViewCompat; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.view.GestureDetector; @@ -41,6 +39,9 @@ import android.widget.AbsListView; import android.widget.HeaderViewListAdapter; import android.widget.ListAdapter; +import androidx.annotation.NonNull; +import androidx.core.view.ViewCompat; + import com.github.ksoichiro.android.observablescrollview.ObservableListView; import java.util.List; diff --git a/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java b/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java index c6f713d5f1..53b228c6a7 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java @@ -29,14 +29,6 @@ import android.graphics.Typeface; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.v4.util.Pair; -import android.support.v4.view.ViewCompat; -import android.support.v4.view.ViewPager; -import android.support.v4.view.ViewPager.OnPageChangeListener; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.util.TypedValue; @@ -48,6 +40,15 @@ import android.widget.HorizontalScrollView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.core.util.Pair; +import androidx.core.view.ViewCompat; +import androidx.viewpager.widget.ViewPager; +import androidx.viewpager.widget.ViewPager.OnPageChangeListener; + import net.osmand.plus.R; import net.osmand.plus.helpers.FontCache; diff --git a/OsmAnd/src/net/osmand/plus/views/controls/ReorderItemTouchHelperCallback.java b/OsmAnd/src/net/osmand/plus/views/controls/ReorderItemTouchHelperCallback.java index 832f7a10fa..bdaf12d571 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/ReorderItemTouchHelperCallback.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/ReorderItemTouchHelperCallback.java @@ -1,7 +1,7 @@ package net.osmand.plus.views.controls; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.RecyclerView; public class ReorderItemTouchHelperCallback extends ItemTouchHelper.Callback { diff --git a/OsmAnd/src/net/osmand/plus/views/controls/SwipeDismissListViewTouchListener.java b/OsmAnd/src/net/osmand/plus/views/controls/SwipeDismissListViewTouchListener.java index 620f7d9446..f944f2dbbb 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/SwipeDismissListViewTouchListener.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/SwipeDismissListViewTouchListener.java @@ -24,9 +24,6 @@ import android.graphics.Rect; import android.os.Build; import android.os.Handler; import android.os.Message; -import android.support.annotation.NonNull; -import android.support.v4.view.ViewCompat; -import android.support.v4.view.ViewPropertyAnimatorListener; import android.view.Gravity; import android.view.LayoutInflater; import android.view.MotionEvent; @@ -42,6 +39,10 @@ import android.widget.ListView; import android.widget.PopupWindow; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.core.view.ViewCompat; +import androidx.core.view.ViewPropertyAnimatorListener; + import net.osmand.plus.R; import java.util.ArrayList; diff --git a/OsmAnd/src/net/osmand/plus/views/controls/WrapContentHeightViewPager.java b/OsmAnd/src/net/osmand/plus/views/controls/WrapContentHeightViewPager.java index 57f86db8b1..1b272dc407 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/WrapContentHeightViewPager.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/WrapContentHeightViewPager.java @@ -1,13 +1,14 @@ package net.osmand.plus.views.controls; import android.content.Context; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; import android.util.AttributeSet; import android.view.Gravity; import android.view.MotionEvent; import android.view.View; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; + public class WrapContentHeightViewPager extends ViewPager { private boolean swipeable = true; diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java index 54be82b4f7..0503231cd9 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java @@ -11,15 +11,6 @@ import android.graphics.Paint; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.drawable.DrawableCompat; -import android.support.v7.widget.SwitchCompat; import android.text.ClipboardManager; import android.util.TypedValue; import android.view.View; @@ -31,6 +22,16 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; + +import com.google.android.material.snackbar.Snackbar; import com.jwetherell.openmap.common.LatLonPoint; import com.jwetherell.openmap.common.UTMPoint; diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapWidgetRegistry.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapWidgetRegistry.java index 915886b105..855c8e0b94 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapWidgetRegistry.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapWidgetRegistry.java @@ -1,9 +1,6 @@ package net.osmand.plus.views.mapwidgets; import android.content.Context; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -11,6 +8,10 @@ import android.view.View; import android.widget.ArrayAdapter; import android.widget.LinearLayout; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; + import net.osmand.plus.ApplicationMode; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java index d0aa388446..6633b970a0 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java @@ -13,10 +13,11 @@ import android.graphics.Path; import android.graphics.PointF; import android.graphics.Rect; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorRes; -import android.support.annotation.NonNull; import android.text.TextPaint; +import androidx.annotation.ColorRes; +import androidx.annotation.NonNull; + import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java index 1f3c3bb76a..ed1aea7c51 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java @@ -15,17 +15,17 @@ import android.graphics.RectF; import android.graphics.drawable.Drawable; import android.hardware.GeomagneticField; import android.os.BatteryManager; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; import android.text.format.DateFormat; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; + import net.osmand.AndroidUtils; import net.osmand.Location; -import net.osmand.StateChangedListener; import net.osmand.binary.RouteDataObject; import net.osmand.data.LatLon; import net.osmand.data.RotatedTileBox; diff --git a/OsmAnd/src/net/osmand/plus/voice/AbstractPrologCommandPlayer.java b/OsmAnd/src/net/osmand/plus/voice/AbstractPrologCommandPlayer.java index 9aedd2a6e4..beb63ee098 100644 --- a/OsmAnd/src/net/osmand/plus/voice/AbstractPrologCommandPlayer.java +++ b/OsmAnd/src/net/osmand/plus/voice/AbstractPrologCommandPlayer.java @@ -1,11 +1,11 @@ package net.osmand.plus.voice; import android.content.Context; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationManagerCompat; - import android.media.AudioManager; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationManagerCompat; + import net.osmand.IndexConstants; import net.osmand.PlatformUtil; import net.osmand.StateChangedListener; diff --git a/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java index e6fde98d2f..3073366605 100644 --- a/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java @@ -10,9 +10,10 @@ import android.os.Build; 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.widget.Toast; +import androidx.appcompat.app.AlertDialog; + import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/widgets/EditTextEx.java b/OsmAnd/src/net/osmand/plus/widgets/EditTextEx.java index 7be3a55470..24cfe8d8dd 100644 --- a/OsmAnd/src/net/osmand/plus/widgets/EditTextEx.java +++ b/OsmAnd/src/net/osmand/plus/widgets/EditTextEx.java @@ -1,10 +1,11 @@ package net.osmand.plus.widgets; import android.content.Context; -import android.support.v7.widget.AppCompatEditText; import android.text.InputFilter.LengthFilter; import android.util.AttributeSet; +import androidx.appcompat.widget.AppCompatEditText; + public class EditTextEx extends AppCompatEditText { diff --git a/OsmAnd/src/net/osmand/plus/widgets/EmptyStateRecyclerView.java b/OsmAnd/src/net/osmand/plus/widgets/EmptyStateRecyclerView.java index ee2b129c72..36449e6cb8 100644 --- a/OsmAnd/src/net/osmand/plus/widgets/EmptyStateRecyclerView.java +++ b/OsmAnd/src/net/osmand/plus/widgets/EmptyStateRecyclerView.java @@ -1,11 +1,12 @@ package net.osmand.plus.widgets; import android.content.Context; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; import android.util.AttributeSet; import android.view.View; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; + public class EmptyStateRecyclerView extends RecyclerView { private View emptyView; diff --git a/OsmAnd/src/net/osmand/plus/widgets/IconPopupMenu.java b/OsmAnd/src/net/osmand/plus/widgets/IconPopupMenu.java index 4c1b8714d2..7f5e00c728 100644 --- a/OsmAnd/src/net/osmand/plus/widgets/IconPopupMenu.java +++ b/OsmAnd/src/net/osmand/plus/widgets/IconPopupMenu.java @@ -1,16 +1,17 @@ package net.osmand.plus.widgets; import android.content.Context; -import android.support.v7.view.SupportMenuInflater; -import android.support.v7.view.menu.MenuBuilder; -import android.support.v7.view.menu.MenuPopupHelper; -import android.support.v7.view.menu.MenuPresenter; -import android.support.v7.view.menu.SubMenuBuilder; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; +import androidx.appcompat.view.SupportMenuInflater; +import androidx.appcompat.view.menu.MenuBuilder; +import androidx.appcompat.view.menu.MenuPopupHelper; +import androidx.appcompat.view.menu.MenuPresenter; +import androidx.appcompat.view.menu.SubMenuBuilder; + /** * Copied from android.support.v7.widget.PopupMenu. * "mPopup.setForceShowIcon(true);" in the constructor does the trick :) diff --git a/OsmAnd/src/net/osmand/plus/widgets/InterceptorFrameLayout.java b/OsmAnd/src/net/osmand/plus/widgets/InterceptorFrameLayout.java index 7f3ef67c3a..b4c6e44f32 100644 --- a/OsmAnd/src/net/osmand/plus/widgets/InterceptorFrameLayout.java +++ b/OsmAnd/src/net/osmand/plus/widgets/InterceptorFrameLayout.java @@ -3,12 +3,13 @@ package net.osmand.plus.widgets; import android.annotation.TargetApi; import android.content.Context; import android.os.Build; -import android.support.v4.view.MotionEventCompat; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.ViewConfiguration; import android.widget.FrameLayout; +import androidx.core.view.MotionEventCompat; + import net.osmand.plus.widgets.tools.SwipeDismissTouchListener; public class InterceptorFrameLayout extends FrameLayout { diff --git a/OsmAnd/src/net/osmand/plus/widgets/OsmandTextFieldBoxes.java b/OsmAnd/src/net/osmand/plus/widgets/OsmandTextFieldBoxes.java index 7449a29a0c..1703cdc47d 100644 --- a/OsmAnd/src/net/osmand/plus/widgets/OsmandTextFieldBoxes.java +++ b/OsmAnd/src/net/osmand/plus/widgets/OsmandTextFieldBoxes.java @@ -1,11 +1,12 @@ package net.osmand.plus.widgets; import android.content.Context; -import android.support.v4.view.ViewCompat; import android.util.AttributeSet; import android.view.View; import android.view.inputmethod.InputMethodManager; +import androidx.core.view.ViewCompat; + import net.osmand.plus.R; import studio.carbonylgroup.textfieldboxes.ExtendedEditText; diff --git a/OsmAnd/src/net/osmand/plus/widgets/TextViewEx.java b/OsmAnd/src/net/osmand/plus/widgets/TextViewEx.java index 4a08f1d5f7..8755462ac6 100644 --- a/OsmAnd/src/net/osmand/plus/widgets/TextViewEx.java +++ b/OsmAnd/src/net/osmand/plus/widgets/TextViewEx.java @@ -6,10 +6,11 @@ import android.content.Context; import android.content.res.TypedArray; import android.graphics.Typeface; import android.os.Build; -import android.support.v7.text.AllCapsTransformationMethod; import android.util.AttributeSet; import android.widget.TextView; +import androidx.appcompat.text.AllCapsTransformationMethod; + import net.osmand.plus.R; import net.osmand.plus.helpers.FontCache; diff --git a/OsmAnd/src/net/osmand/plus/widgets/tools/ExtendedBottomSheetBehavior.java b/OsmAnd/src/net/osmand/plus/widgets/tools/ExtendedBottomSheetBehavior.java index ac49d0fe78..eded286b13 100644 --- a/OsmAnd/src/net/osmand/plus/widgets/tools/ExtendedBottomSheetBehavior.java +++ b/OsmAnd/src/net/osmand/plus/widgets/tools/ExtendedBottomSheetBehavior.java @@ -20,16 +20,6 @@ import android.content.Context; import android.content.res.TypedArray; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.IntDef; -import android.support.annotation.NonNull; -import android.support.annotation.RestrictTo; -import android.support.annotation.VisibleForTesting; -import android.support.design.R; -import android.support.design.widget.CoordinatorLayout; -import android.support.v4.math.MathUtils; -import android.support.v4.view.AbsSavedState; -import android.support.v4.view.ViewCompat; -import android.support.v4.widget.ViewDragHelper; import android.util.AttributeSet; import android.util.TypedValue; import android.view.MotionEvent; @@ -39,11 +29,23 @@ import android.view.ViewConfiguration; import android.view.ViewGroup; import android.view.ViewParent; +import androidx.annotation.IntDef; +import androidx.annotation.NonNull; +import androidx.annotation.RestrictTo; +import androidx.annotation.VisibleForTesting; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import androidx.core.math.MathUtils; +import androidx.core.view.ViewCompat; +import androidx.customview.view.AbsSavedState; +import androidx.customview.widget.ViewDragHelper; + +import com.google.android.material.R; + import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.ref.WeakReference; -import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP; +import static androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP; /** diff --git a/OsmAnd/src/net/osmand/plus/widgets/tools/SwipeDismissTouchListener.java b/OsmAnd/src/net/osmand/plus/widgets/tools/SwipeDismissTouchListener.java index cb3b1910b8..6c70bb1943 100644 --- a/OsmAnd/src/net/osmand/plus/widgets/tools/SwipeDismissTouchListener.java +++ b/OsmAnd/src/net/osmand/plus/widgets/tools/SwipeDismissTouchListener.java @@ -2,8 +2,6 @@ package net.osmand.plus.widgets.tools; import android.app.ListActivity; import android.app.ListFragment; -import android.support.v4.view.ViewCompat; -import android.support.v4.view.ViewPropertyAnimatorListener; import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; @@ -11,6 +9,9 @@ import android.view.ViewConfiguration; import android.widget.AdapterView; import android.widget.ListView; +import androidx.core.view.ViewCompat; +import androidx.core.view.ViewPropertyAnimatorListener; + /** * A {@link View.OnTouchListener} that makes any {@link View} dismissable when the * user swipes (drags her finger) horizontally across the view. diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleBaseDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleBaseDialogFragment.java index 29edf65af9..a5db2651e9 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleBaseDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleBaseDialogFragment.java @@ -2,14 +2,15 @@ package net.osmand.plus.wikipedia; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.ColorRes; -import android.support.annotation.NonNull; import android.util.Log; import android.view.View; import android.webkit.WebSettings; import android.webkit.WebView; import android.widget.TextView; +import androidx.annotation.ColorRes; +import androidx.annotation.NonNull; + import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.plus.OsmandSettings; diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java index 2857330a82..9caf70d5b9 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java @@ -6,13 +6,14 @@ import android.content.Context; import android.content.DialogInterface; import android.net.Uri; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; import android.text.Html; import android.util.Log; import android.view.ContextThemeWrapper; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentActivity; + import net.osmand.IndexConstants; import net.osmand.ResultMatcher; import net.osmand.data.Amenity; diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaArticleWikiLinkFragment.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaArticleWikiLinkFragment.java index 05bc9d49c0..1c34b823ab 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaArticleWikiLinkFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaArticleWikiLinkFragment.java @@ -4,10 +4,11 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentManager; import android.view.View; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentManager; + import net.osmand.plus.R; import net.osmand.plus.base.MenuBottomSheetDialogFragment; import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java index 081df3df40..f2f162a76e 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java @@ -9,15 +9,6 @@ import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.customtabs.CustomTabsIntent; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.PopupMenu; -import android.support.v7.widget.Toolbar; import android.text.TextUtils; import android.view.Gravity; import android.view.LayoutInflater; @@ -29,6 +20,16 @@ import android.webkit.WebView; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.PopupMenu; +import androidx.appcompat.widget.Toolbar; +import androidx.browser.customtabs.CustomTabsIntent; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.data.Amenity; diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaOptionsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaOptionsBottomSheetDialogFragment.java index e2c1e50a38..d70f7bc427 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaOptionsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaOptionsBottomSheetDialogFragment.java @@ -1,12 +1,13 @@ package net.osmand.plus.wikipedia; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v7.widget.PopupMenu; import android.view.Gravity; import android.view.MenuItem; import android.view.View; +import androidx.appcompat.widget.PopupMenu; +import androidx.fragment.app.Fragment; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.OsmandSettings.WikiArticleShowImages; diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaWebViewClient.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaWebViewClient.java index 4a4ed76517..ccc40c5ad4 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaWebViewClient.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaWebViewClient.java @@ -3,10 +3,11 @@ package net.osmand.plus.wikipedia; import android.content.Context; import android.content.Intent; import android.net.Uri; -import android.support.v4.app.FragmentActivity; import android.webkit.WebView; import android.webkit.WebViewClient; +import androidx.fragment.app.FragmentActivity; + import net.osmand.data.Amenity; import static net.osmand.plus.wikipedia.WikiArticleHelper.WIKI_DOMAIN; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/WikiBaseDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/WikiBaseDialogFragment.java index d74a355a76..49bdb1087b 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/WikiBaseDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/WikiBaseDialogFragment.java @@ -4,22 +4,23 @@ import android.app.Dialog; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.Toolbar; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; + import net.osmand.plus.R; import net.osmand.plus.base.BaseOsmAndDialogFragment; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageShowPicturesDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageShowPicturesDialogFragment.java index 23a5b8404d..1e08145c82 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageShowPicturesDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageShowPicturesDialogFragment.java @@ -3,10 +3,6 @@ package net.osmand.plus.wikivoyage; import android.app.Activity; import android.os.Build; import android.os.Bundle; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -15,6 +11,11 @@ import android.view.Window; import android.view.WindowManager; import android.widget.TextView; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; + import net.osmand.AndroidUtils; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings.WikiArticleShowImages; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java index c697860589..46f4b79750 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java @@ -3,17 +3,18 @@ package net.osmand.plus.wikivoyage; import android.content.Intent; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; import android.util.Log; import android.webkit.WebView; import android.webkit.WebViewClient; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + +import net.osmand.GPXUtilities; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; -import net.osmand.GPXUtilities; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWelcomeDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWelcomeDialogFragment.java index 421a551d15..d0ffa7cab4 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWelcomeDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWelcomeDialogFragment.java @@ -2,16 +2,17 @@ package net.osmand.plus.wikivoyage; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.ImageView.ScaleType; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.plus.R; import net.osmand.plus.helpers.AndroidUiHelper; import net.osmand.plus.wikivoyage.explore.WikivoyageExploreActivity; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java index f7558a05b4..4a822cf8c0 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java @@ -4,8 +4,6 @@ import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -14,6 +12,9 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; + import net.osmand.plus.R; import net.osmand.plus.activities.OsmandBaseExpandableListAdapter; import net.osmand.plus.base.MenuBottomSheetDialogFragment; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java index c27858ce3d..7886783081 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java @@ -5,14 +5,6 @@ import android.content.Intent; import android.content.res.ColorStateList; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentManager.BackStackEntry; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.PopupMenu; -import android.support.v7.widget.Toolbar; import android.text.TextUtils; import android.view.Gravity; import android.view.LayoutInflater; @@ -25,6 +17,15 @@ import android.webkit.WebSettings; import android.webkit.WebView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.PopupMenu; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentManager.BackStackEntry; + import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleNavigationFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleNavigationFragment.java index b54a588ca8..99314a56f2 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleNavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleNavigationFragment.java @@ -1,14 +1,8 @@ package net.osmand.plus.wikivoyage.article; import android.content.Context; -import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -19,6 +13,12 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import net.osmand.plus.R; import net.osmand.plus.activities.OsmandBaseExpandableListAdapter; import net.osmand.plus.base.MenuBottomSheetDialogFragment; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleWikiLinkFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleWikiLinkFragment.java index 9ff2338c46..c6daef5bf8 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleWikiLinkFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleWikiLinkFragment.java @@ -5,11 +5,12 @@ import android.content.Intent; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; import android.view.View; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.base.MenuBottomSheetDialogFragment; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelArticle.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelArticle.java index 61d618e220..a9de4e92a2 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelArticle.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelArticle.java @@ -1,18 +1,20 @@ package net.osmand.plus.wikivoyage.data; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.net.URLEncoder; - -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.Size; import android.text.TextUtils; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.Size; + import net.osmand.GPXUtilities.GPXFile; import org.apache.commons.codec.binary.Hex; import org.apache.commons.codec.digest.DigestUtils; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.net.URLEncoder; + public class TravelArticle { private static final String IMAGE_ROOT_URL = "https://upload.wikimedia.org/wikipedia/commons/"; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelDbHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelDbHelper.java index f001dd90d9..020d43d598 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelDbHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelDbHelper.java @@ -1,19 +1,20 @@ package net.osmand.plus.wikivoyage.data; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.Collator; import net.osmand.CollatorStringMatcher; import net.osmand.CollatorStringMatcher.StringMatcherMode; +import net.osmand.GPXUtilities; +import net.osmand.GPXUtilities.GPXFile; import net.osmand.IndexConstants; import net.osmand.Location; import net.osmand.OsmAndCollator; import net.osmand.PlatformUtil; import net.osmand.data.LatLon; -import net.osmand.GPXUtilities; -import net.osmand.GPXUtilities.GPXFile; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.api.SQLiteAPI.SQLiteConnection; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java index 1cb42d1b4a..6127c3e5d5 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java @@ -1,8 +1,8 @@ package net.osmand.plus.wikivoyage.data; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.osmand.plus.OsmandApplication; import net.osmand.plus.api.SQLiteAPI.SQLiteConnection; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageJsonParser.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageJsonParser.java index db40a2ee7c..ad65ba6347 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageJsonParser.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageJsonParser.java @@ -1,8 +1,9 @@ package net.osmand.plus.wikivoyage.data; -import android.support.annotation.Nullable; import android.util.Log; +import androidx.annotation.Nullable; + import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java index a6892c847b..29951db19a 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java @@ -1,12 +1,13 @@ package net.osmand.plus.wikivoyage.explore; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.R; import net.osmand.plus.wikivoyage.explore.travelcards.ArticleTravelCard; import net.osmand.plus.wikivoyage.explore.travelcards.ArticleTravelCard.ArticleTravelVH; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java index 7ab7166b8c..72a235c956 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java @@ -4,16 +4,17 @@ import android.app.Activity; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentManager; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.util.Pair; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.data.LatLon; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesRvAdapter.java index 264d9f723c..109c8796b4 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesRvAdapter.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesRvAdapter.java @@ -1,26 +1,26 @@ package net.osmand.plus.wikivoyage.explore; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; + +import com.google.android.material.snackbar.Snackbar; import com.squareup.picasso.Callback; import com.squareup.picasso.Picasso; import com.squareup.picasso.RequestCreator; -import net.osmand.AndroidUtils; import net.osmand.PicassoUtils; -import net.osmand.plus.UiUtilities; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; import net.osmand.plus.widgets.tools.CropCircleTransformation; import net.osmand.plus.wikivoyage.WikivoyageUtils; import net.osmand.plus.wikivoyage.data.TravelArticle; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java index 259b48669f..513830e888 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java @@ -2,16 +2,17 @@ package net.osmand.plus.wikivoyage.explore; import android.app.Activity; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentManager; -import android.support.v7.util.DiffUtil; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.DiffUtil; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java index 3941f44906..ba69075550 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java @@ -7,23 +7,25 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.BottomNavigationView; -import android.support.design.widget.BottomNavigationView.OnNavigationItemSelectedListener; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.view.View; import android.view.Window; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + +import com.google.android.material.bottomnavigation.BottomNavigationView; +import com.google.android.material.bottomnavigation.BottomNavigationView.OnNavigationItemSelectedListener; + import net.osmand.AndroidUtils; import net.osmand.plus.LockableViewPager; import net.osmand.plus.OnDialogFragmentResultListener; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageOptionsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageOptionsBottomSheetDialogFragment.java index 6fc7737c4e..4c32edf4f2 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageOptionsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageOptionsBottomSheetDialogFragment.java @@ -4,13 +4,14 @@ import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.PopupMenu; import android.view.Gravity; import android.view.MenuItem; import android.view.View; import android.webkit.WebView; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.PopupMenu; + import net.osmand.PicassoUtils; import net.osmand.plus.OnDialogFragmentResultListener; import net.osmand.plus.OsmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/ArticleTravelCard.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/ArticleTravelCard.java index 2d7b2be9b1..5b782c5757 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/ArticleTravelCard.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/ArticleTravelCard.java @@ -1,13 +1,14 @@ package net.osmand.plus.wikivoyage.explore.travelcards; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentManager; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.RecyclerView; + import com.squareup.picasso.Callback; import com.squareup.picasso.Picasso; import com.squareup.picasso.RequestCreator; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/BaseTravelCard.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/BaseTravelCard.java index 3fcab8b95e..f64d44617a 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/BaseTravelCard.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/BaseTravelCard.java @@ -1,12 +1,13 @@ package net.osmand.plus.wikivoyage.explore.travelcards; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; + +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/HeaderTravelCard.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/HeaderTravelCard.java index 6a40252a3f..b015e9a8ae 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/HeaderTravelCard.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/HeaderTravelCard.java @@ -1,10 +1,11 @@ package net.osmand.plus.wikivoyage.explore.travelcards; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/OpenBetaTravelCard.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/OpenBetaTravelCard.java index a5836b8baf..9ed0824250 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/OpenBetaTravelCard.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/OpenBetaTravelCard.java @@ -1,12 +1,13 @@ package net.osmand.plus.wikivoyage.explore.travelcards; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentManager; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.chooseplan.ChoosePlanDialogFragment; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/StartEditingTravelCard.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/StartEditingTravelCard.java index f36d01f069..ee3a9aad1a 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/StartEditingTravelCard.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/StartEditingTravelCard.java @@ -3,14 +3,13 @@ package net.osmand.plus.wikivoyage.explore.travelcards; import android.app.Activity; import android.content.Context; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.customtabs.CustomTabsIntent; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.wikipedia.WikipediaDialogFragment; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelDownloadUpdateCard.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelDownloadUpdateCard.java index 5c24f944f3..d466ffb7dc 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelDownloadUpdateCard.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelDownloadUpdateCard.java @@ -1,15 +1,17 @@ package net.osmand.plus.wikivoyage.explore.travelcards; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.download.IndexItem; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelNeededMapsCard.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelNeededMapsCard.java index 65a1562295..505a2095f6 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelNeededMapsCard.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelNeededMapsCard.java @@ -1,8 +1,6 @@ package net.osmand.plus.wikivoyage.explore.travelcards; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; @@ -10,13 +8,16 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ProgressBar; import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.Version; import net.osmand.plus.download.DownloadActivityType; import net.osmand.plus.download.DownloadIndexesThread; import net.osmand.plus.download.IndexItem; -import net.osmand.plus.wikivoyage.explore.travelcards.TravelDownloadUpdateCard.DownloadUpdateVH; import java.lang.ref.WeakReference; import java.util.List; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/menu/WikivoyageWptPtMenuBuilder.java b/OsmAnd/src/net/osmand/plus/wikivoyage/menu/WikivoyageWptPtMenuBuilder.java index 855492be92..9bc991422d 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/menu/WikivoyageWptPtMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/menu/WikivoyageWptPtMenuBuilder.java @@ -1,8 +1,9 @@ package net.osmand.plus.wikivoyage.menu; -import android.support.annotation.NonNull; import android.view.View; +import androidx.annotation.NonNull; + import net.osmand.GPXUtilities.WptPt; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/menu/WikivoyageWptPtMenuController.java b/OsmAnd/src/net/osmand/plus/wikivoyage/menu/WikivoyageWptPtMenuController.java index 7331623a6c..b923e617a3 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/menu/WikivoyageWptPtMenuController.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/menu/WikivoyageWptPtMenuController.java @@ -1,9 +1,9 @@ package net.osmand.plus.wikivoyage.menu; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; +import androidx.annotation.NonNull; + import net.osmand.GPXUtilities.GPXFile; import net.osmand.GPXUtilities.Metadata; import net.osmand.GPXUtilities.WptPt; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java index 0292be57ed..b86bb6794e 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java @@ -2,16 +2,17 @@ package net.osmand.plus.wikivoyage.search; import android.graphics.drawable.LayerDrawable; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; + import com.squareup.picasso.Picasso; import com.squareup.picasso.RequestCreator; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/search/WikivoyageSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/search/WikivoyageSearchDialogFragment.java index d6aba04e03..826d938562 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/search/WikivoyageSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/search/WikivoyageSearchDialogFragment.java @@ -1,12 +1,6 @@ package net.osmand.plus.wikivoyage.search; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentManager; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; @@ -17,6 +11,13 @@ import android.widget.EditText; import android.widget.ImageButton; import android.widget.ProgressBar; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.Toolbar; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import net.osmand.ResultMatcher; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; diff --git a/OsmAnd/src/net/osmand/view/ComplexButton.java b/OsmAnd/src/net/osmand/view/ComplexButton.java index 4ccd53ea4c..a7afdc5353 100644 --- a/OsmAnd/src/net/osmand/view/ComplexButton.java +++ b/OsmAnd/src/net/osmand/view/ComplexButton.java @@ -4,14 +4,15 @@ import android.content.Context; import android.content.res.TypedArray; import android.graphics.Color; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.osmand.plus.R; import net.osmand.plus.widgets.TextViewEx; diff --git a/OsmAnd/src/net/osmand/view/ThreeStateCheckbox.java b/OsmAnd/src/net/osmand/view/ThreeStateCheckbox.java index 7671759032..6b1e3c8071 100644 --- a/OsmAnd/src/net/osmand/view/ThreeStateCheckbox.java +++ b/OsmAnd/src/net/osmand/view/ThreeStateCheckbox.java @@ -1,10 +1,11 @@ package net.osmand.view; import android.content.Context; -import android.support.v7.widget.AppCompatCheckBox; import android.util.AttributeSet; import android.widget.CompoundButton; +import androidx.appcompat.widget.AppCompatCheckBox; + import net.osmand.plus.R; public class ThreeStateCheckbox extends AppCompatCheckBox { diff --git a/OsmAndCore-sample/build.gradle b/OsmAndCore-sample/build.gradle index 8ca5541258..7a8f84669e 100644 --- a/OsmAndCore-sample/build.gradle +++ b/OsmAndCore-sample/build.gradle @@ -121,9 +121,9 @@ repositories { dependencies { implementation project(path: ':OsmAnd-java', configuration: 'android') - implementation 'com.android.support:multidex:1.0.3' - implementation 'com.android.support:appcompat-v7:27.1.1' - implementation 'com.android.support:design:27.1.1' + implementation 'androidx.multidex:multidex:2.0.0' + implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'com.google.android.material:material:1.0.0' implementation 'commons-logging:commons-logging-api:1.1' implementation 'com.moparisthebest:junidecode:0.1.1' diff --git a/OsmAndCore-sample/res/layout/search_dialog_fragment.xml b/OsmAndCore-sample/res/layout/search_dialog_fragment.xml index 80b9d76798..0d7bb58ec6 100644 --- a/OsmAndCore-sample/res/layout/search_dialog_fragment.xml +++ b/OsmAndCore-sample/res/layout/search_dialog_fragment.xml @@ -10,12 +10,12 @@ android:layout_height="match_parent" android:orientation="vertical"> - - - + - + - - - -