From f7f29c5b0bc1125fa4c0e8848b5c2a6cbb1ea8d0 Mon Sep 17 00:00:00 2001 From: Chumva Date: Fri, 30 Aug 2019 15:58:36 +0300 Subject: [PATCH] Profile settings third part --- OsmAnd/AndroidManifest.xml | 9 + .../bg_transparent_rounded_profile.xml | 14 +- .../res/layout/fragment_selected_profile.xml | 1174 ++++++++--------- .../res/layout/global_preference_toolbar.xml | 7 + .../layout/preference_dialog_and_switch.xml | 67 + OsmAnd/res/layout/preference_info.xml | 30 + OsmAnd/res/layout/preference_switch.xml | 60 + OsmAnd/res/layout/preference_top_switch.xml | 42 + OsmAnd/res/layout/preference_with_descr.xml | 2 +- .../res/layout/profile_preference_toolbar.xml | 2 +- .../layout/profile_preference_toolbar_big.xml | 5 +- OsmAnd/res/layout/profiles_list_fragment.xml | 102 +- .../res/layout/simple_preference_category.xml | 4 +- OsmAnd/res/values/colors.xml | 2 + OsmAnd/res/values/strings.xml | 67 +- OsmAnd/res/values/styles.xml | 17 +- OsmAnd/res/xml/configure_profile.xml | 4 +- OsmAnd/res/xml/general_profile_settings.xml | 56 +- OsmAnd/res/xml/global_settings.xml | 49 + OsmAnd/res/xml/map_during_navigation.xml | 27 +- OsmAnd/res/xml/navigation_settings.xml | 160 ++- OsmAnd/res/xml/navigation_settings_new.xml | 59 + OsmAnd/res/xml/proxy_preferences.xml | 32 + OsmAnd/res/xml/route_parameters.xml | 30 +- OsmAnd/res/xml/screen_alerts.xml | 15 +- OsmAnd/res/xml/settings_main_screen.xml | 47 +- OsmAnd/res/xml/turn_screen_on.xml | 16 +- OsmAnd/res/xml/vehicle_parameters.xml | 12 +- OsmAnd/res/xml/voice_announces.xml | 37 +- OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java | 42 +- .../src/net/osmand/plus/OsmandSettings.java | 201 ++- .../osmand/plus/activities/MapActivity.java | 16 +- .../plus/activities/MapActivityActions.java | 72 +- .../plus/activities/SettingsActivity.java | 3 +- .../plus/activities/SettingsBaseActivity.java | 4 +- .../activities/SettingsGeneralActivity.java | 2 +- .../SettingsNavigationActivity.java | 71 +- .../osmand/plus/base/BaseOsmAndFragment.java | 5 - .../SettingsDevelopmentActivity.java | 10 + .../AppModesBottomSheetDialogFragment.java | 28 +- .../profiles/AppProfileArrayAdapter.java | 4 +- .../plus/profiles/EditProfileActivity.java | 74 ++ .../profiles/EditProfileFragment.java | 34 +- .../profiles/ProfileDataObject.java | 2 +- .../profiles/ProfileMenuAdapter.java | 4 +- .../profiles/RoutingProfileDataObject.java | 5 +- ...electProfileBottomSheetDialogFragment.java | 42 +- .../profiles/SettingsProfileActivity.java | 44 + .../profiles/SettingsProfileFragment.java | 32 +- .../MapRouteInfoMenu.java | 4 +- .../plus/settings/BaseSettingsFragment.java | 337 ++--- .../BooleanPreferenceBottomSheet.java | 119 ++ .../settings/ConfigureProfileFragment.java | 26 +- .../EditTextPreferenceBottomSheet.java | 115 ++ .../plus/settings/GeneralProfileSettings.java | 327 +++++ .../plus/settings/GlobalSettingsFragment.java | 547 ++++++++ .../settings/MapDuringNavigationFragment.java | 156 ++- .../MultiSelectPreferencesBottomSheet.java | 182 +++ .../plus/settings/NavigationFragment.java | 69 +- .../plus/settings/ProfileGeneralSettings.java | 298 ----- .../plus/settings/ProxySettingsFragment.java | 101 ++ .../settings/RouteParametersFragment.java | 231 ++-- .../plus/settings/ScreenAlertsFragment.java | 56 +- .../plus/settings/SettingsMainFragment.java | 96 +- .../SingleSelectPreferenceBottomSheet.java | 155 +++ .../plus/settings/TurnScreenOnFragment.java | 81 +- .../settings/VehicleParametersFragment.java | 212 ++- .../plus/settings/VoiceAnnouncesFragment.java | 277 ++-- .../preferences/EditTextPreferenceEx.java | 38 + .../preferences/ListPreferenceEx.java | 147 +++ .../preferences/SwitchPreferenceEx.java | 41 + .../views/mapwidgets/MapWidgetRegistry.java | 1 + 72 files changed, 4257 insertions(+), 2202 deletions(-) create mode 100644 OsmAnd/res/layout/preference_dialog_and_switch.xml create mode 100644 OsmAnd/res/layout/preference_info.xml create mode 100644 OsmAnd/res/layout/preference_switch.xml create mode 100644 OsmAnd/res/layout/preference_top_switch.xml create mode 100644 OsmAnd/res/xml/global_settings.xml create mode 100644 OsmAnd/res/xml/navigation_settings_new.xml create mode 100644 OsmAnd/res/xml/proxy_preferences.xml rename OsmAnd/src/net/osmand/plus/{settings => }/profiles/AppModesBottomSheetDialogFragment.java (81%) rename OsmAnd/src/net/osmand/plus/{settings => }/profiles/AppProfileArrayAdapter.java (96%) create mode 100644 OsmAnd/src/net/osmand/plus/profiles/EditProfileActivity.java rename OsmAnd/src/net/osmand/plus/{settings => }/profiles/EditProfileFragment.java (95%) rename OsmAnd/src/net/osmand/plus/{settings => }/profiles/ProfileDataObject.java (96%) rename OsmAnd/src/net/osmand/plus/{settings => }/profiles/ProfileMenuAdapter.java (98%) rename OsmAnd/src/net/osmand/plus/{settings => }/profiles/RoutingProfileDataObject.java (75%) rename OsmAnd/src/net/osmand/plus/{settings => }/profiles/SelectProfileBottomSheetDialogFragment.java (90%) create mode 100644 OsmAnd/src/net/osmand/plus/profiles/SettingsProfileActivity.java rename OsmAnd/src/net/osmand/plus/{settings => }/profiles/SettingsProfileFragment.java (82%) create mode 100644 OsmAnd/src/net/osmand/plus/settings/BooleanPreferenceBottomSheet.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/EditTextPreferenceBottomSheet.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettings.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/MultiSelectPreferencesBottomSheet.java delete mode 100644 OsmAnd/src/net/osmand/plus/settings/ProfileGeneralSettings.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/ProxySettingsFragment.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/SingleSelectPreferenceBottomSheet.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/preferences/EditTextPreferenceEx.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/preferences/ListPreferenceEx.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/preferences/SwitchPreferenceEx.java diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml index 0193a6a4ad..1810b1fbe4 100644 --- a/OsmAnd/AndroidManifest.xml +++ b/OsmAnd/AndroidManifest.xml @@ -897,6 +897,15 @@ + + + + diff --git a/OsmAnd/res/drawable/bg_transparent_rounded_profile.xml b/OsmAnd/res/drawable/bg_transparent_rounded_profile.xml index 5f8144c422..0a02cc78c0 100644 --- a/OsmAnd/res/drawable/bg_transparent_rounded_profile.xml +++ b/OsmAnd/res/drawable/bg_transparent_rounded_profile.xml @@ -1,9 +1,9 @@ - - - - - - + android:color="#D9F0B400"> + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/fragment_selected_profile.xml b/OsmAnd/res/layout/fragment_selected_profile.xml index 0518a9ba99..3cfd869bf6 100644 --- a/OsmAnd/res/layout/fragment_selected_profile.xml +++ b/OsmAnd/res/layout/fragment_selected_profile.xml @@ -1,635 +1,615 @@ - + android:background="?attr/activity_background_color"> - + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/setting_profile_item_height" + android:layout_gravity="top" + android:focusable="true" + android:focusableInTouchMode="true"> - - - - - - - - - + android:orientation="vertical"> - - - - - - - - - - - - - - - - - - - - - + android:layout_height="64dp" + android:paddingStart="@dimen/content_padding" + android:paddingEnd="@dimen/content_padding_small" + android:paddingLeft="@dimen/content_padding" + android:paddingRight="@dimen/content_padding_small" + android:orientation="horizontal"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:layout_marginEnd="@dimen/bottom_sheet_icon_margin" + android:layout_marginRight="@dimen/bottom_sheet_icon_margin" + android:layout_gravity="center_vertical" + android:tint="?attr/default_icon_color" + tools:src="@drawable/ic_action_coordinates_latitude"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -