diff --git a/OsmAnd/res/layout/bottom_buttons.xml b/OsmAnd/res/layout/bottom_buttons.xml
new file mode 100644
index 0000000000..6c40ad7130
--- /dev/null
+++ b/OsmAnd/res/layout/bottom_buttons.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/bottom_sheet_menu_base.xml b/OsmAnd/res/layout/bottom_sheet_menu_base.xml
index 19aa0c91b7..323d5569e1 100644
--- a/OsmAnd/res/layout/bottom_sheet_menu_base.xml
+++ b/OsmAnd/res/layout/bottom_sheet_menu_base.xml
@@ -26,32 +26,6 @@
android:orientation="vertical"
android:visibility="gone" />
-
-
-
-
-
-
-
-
-
+
diff --git a/OsmAnd/res/layout/edit_profiles_list_fragment.xml b/OsmAnd/res/layout/edit_profiles_list_fragment.xml
index 53d992555a..36eaaaf6cc 100644
--- a/OsmAnd/res/layout/edit_profiles_list_fragment.xml
+++ b/OsmAnd/res/layout/edit_profiles_list_fragment.xml
@@ -36,32 +36,17 @@
android:id="@+id/buttons_shadow"
android:layout_width="match_parent"
android:layout_height="10dp"
- android:layout_gravity="bottom"
android:background="@drawable/bg_contextmenu_shadow_top_light" />
+ android:background="?attr/list_background_color">
-
-
-
-
+ layout="@layout/bottom_buttons"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/dialog_button_ex_height" />
diff --git a/OsmAnd/res/layout/preference_cancel_save_button.xml b/OsmAnd/res/layout/preference_cancel_save_button.xml
deleted file mode 100644
index ac9d07b7b1..0000000000
--- a/OsmAnd/res/layout/preference_cancel_save_button.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OsmAnd/res/layout/preference_dropdown_list.xml b/OsmAnd/res/layout/preference_dropdown_list.xml
index 39b91cc8c7..b8bf803801 100644
--- a/OsmAnd/res/layout/preference_dropdown_list.xml
+++ b/OsmAnd/res/layout/preference_dropdown_list.xml
@@ -1,54 +1,55 @@
-
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
-
+
-
+
-
- tools:text="Car"/>
+
-
+
-
+
+
+
-
\ No newline at end of file
diff --git a/OsmAnd/res/layout/preference_text_field.xml b/OsmAnd/res/layout/preference_text_field.xml
index 64a1c20e1f..c8fd71c944 100644
--- a/OsmAnd/res/layout/preference_text_field.xml
+++ b/OsmAnd/res/layout/preference_text_field.xml
@@ -1,30 +1,31 @@
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:orientation="horizontal">
-
+
-
+
+
+
-
\ No newline at end of file
diff --git a/OsmAnd/res/xml/navigation_settings_new.xml b/OsmAnd/res/xml/navigation_settings_new.xml
index 27fe337ccc..50df1cdf35 100644
--- a/OsmAnd/res/xml/navigation_settings_new.xml
+++ b/OsmAnd/res/xml/navigation_settings_new.xml
@@ -11,13 +11,13 @@
android:title="@string/nav_type_hint"
tools:icon="@drawable/ic_action_car_dark" />
-
+
> widgetsAvailabilityMap = new LinkedHashMap<>();
private static List defaultValues = new ArrayList<>();
- private static List customValues = new ArrayList<>();
private static List values = new ArrayList<>();
private static List cachedFilteredValues = new ArrayList<>();
@@ -194,6 +193,9 @@ public class ApplicationMode {
private ApplicationMode reg() {
values.add(applicationMode);
defaultValues.add(applicationMode);
+ if (applicationMode.getOrder() == 0 && !values.isEmpty()) {
+ applicationMode.setOrder(values.size());
+ }
return applicationMode;
}
@@ -213,7 +215,9 @@ public class ApplicationMode {
m.locationIconDayLost = m.parentAppMode.locationIconDayLost;
m.locationIconNightLost = m.parentAppMode.locationIconNightLost;
values.add(applicationMode);
- customValues.add(applicationMode);
+ if (applicationMode.getOrder() == 0 && !values.isEmpty()) {
+ applicationMode.setOrder(values.size());
+ }
return applicationMode;
}
@@ -412,7 +416,13 @@ public class ApplicationMode {
}
public static List getCustomValues() {
- return customValues;
+ List customModes = new ArrayList<>();
+ for (ApplicationMode mode : values) {
+ if (mode.isCustomProfile()) {
+ customModes.add(mode);
+ }
+ }
+ return customModes;
}
// returns modifiable ! Set to exclude non-wanted derived
@@ -656,12 +666,11 @@ public class ApplicationMode {
public static void reorderAppModes() {
Comparator comparator = new Comparator() {
@Override
- public int compare(ApplicationMode o1, ApplicationMode o2) {
- return (o1.order < o2.order) ? -1 : ((o1.order == o2.order) ? 0 : 1);
+ public int compare(ApplicationMode mode1, ApplicationMode mode2) {
+ return (mode1.order < mode2.order) ? -1 : ((mode1.order == mode2.order) ? 0 : 1);
}
};
Collections.sort(values, comparator);
- Collections.sort(customValues, comparator);
Collections.sort(defaultValues, comparator);
Collections.sort(cachedFilteredValues, comparator);
}
@@ -672,9 +681,11 @@ public class ApplicationMode {
ApplicationModeBuilder b = createCustomMode(valueOfStringKey(mb.parent, null),
mb.userProfileName, mb.stringKey);
- b.setRouteService(mb.routeService).setRoutingProfile(mb.routingProfile);
+ b.setRouteService(mb.routeService);
+ b.setRoutingProfile(mb.routingProfile);
b.icon(app, mb.iconName);
b.setColor(mb.iconColor);
+ b.setOrder(mb.order);
return b;
}
@@ -687,6 +698,7 @@ public class ApplicationMode {
mb.stringKey = stringKey;
mb.routeService = routeService;
mb.routingProfile = routingProfile;
+ mb.order = order;
Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
return gson.toJson(mb);
}
@@ -734,7 +746,7 @@ public class ApplicationMode {
Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
List defaultModeBeans = createApplicationModeBeans(defaultValues);
- List customModeBeans = createApplicationModeBeans(customValues);
+ List customModeBeans = createApplicationModeBeans(getCustomValues());
String defaultProfiles = gson.toJson(defaultModeBeans);
String customProfiles = gson.toJson(customModeBeans);
@@ -744,7 +756,7 @@ public class ApplicationMode {
}
private static void saveAppModesToSettings(OsmandSettings settings, boolean saveCustomModes) {
- List appModes = saveCustomModes ? customValues : defaultValues;
+ List appModes = saveCustomModes ? getCustomValues() : defaultValues;
List modeBeans = createApplicationModeBeans(appModes);
Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
@@ -802,14 +814,18 @@ public class ApplicationMode {
it.remove();
}
}
- customValues.remove(md);
cachedFilteredValues.remove(md);
saveAppModesToSettings(app.getSettings(), md.isCustomProfile());
}
public static void deleteCustomModes(List modes, OsmandApplication app) {
- values.removeAll(modes);
- customValues.removeAll(modes);
+ Iterator it = values.iterator();
+ while (it.hasNext()) {
+ ApplicationMode m = it.next();
+ if (modes.contains(m)) {
+ it.remove();
+ }
+ }
cachedFilteredValues.removeAll(modes);
saveAppModesToSettings(app.getSettings(), true);
}
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
index 907779eb4b..13fdaa5270 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
@@ -68,7 +68,7 @@ import net.osmand.plus.measurementtool.command.ClearPointsCommand;
import net.osmand.plus.measurementtool.command.MovePointCommand;
import net.osmand.plus.measurementtool.command.RemovePointCommand;
import net.osmand.plus.measurementtool.command.ReorderPointCommand;
-import net.osmand.plus.profiles.ReorderItemTouchHelperCallback;
+import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback;
import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory;
import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarController;
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java b/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java
index cd5fb5c3de..9e0b157c9e 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java
@@ -20,7 +20,7 @@ import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.measurementtool.NewGpxData.ActionType;
-import net.osmand.plus.profiles.ReorderItemTouchHelperCallback;
+import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback;
import java.util.Collections;
import java.util.List;
diff --git a/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java b/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java
index 901562e2e1..c3ceb7dc3a 100644
--- a/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java
+++ b/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java
@@ -29,6 +29,7 @@ import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.base.BaseOsmAndFragment;
import net.osmand.plus.settings.BaseSettingsFragment;
+import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback;
import java.util.ArrayList;
import java.util.Collections;
@@ -47,20 +48,23 @@ public class EditProfilesFragment extends BaseOsmAndFragment {
private EditProfilesAdapter adapter;
+ private boolean nightMode;
+ private boolean wasDrawerDisabled;
+
@Nullable
@Override
public View onCreateView(@NonNull final LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- final MapActivity mapActivity = (MapActivity) requireActivity();
+ OsmandApplication app = requireMyApplication();
if (savedInstanceState != null && savedInstanceState.containsKey(APP_MODES_ORDER_KEY) && savedInstanceState.containsKey(DELETED_APP_MODES_KEY)) {
appModesOrders = (HashMap) savedInstanceState.getSerializable(APP_MODES_ORDER_KEY);
deletedModesKeys = savedInstanceState.getStringArrayList(DELETED_APP_MODES_KEY);
} else {
- List appModes = ApplicationMode.allPossibleValues();
- for (int i = 0; i < appModes.size(); i++) {
- ApplicationMode mode = appModes.get(i);
- appModesOrders.put(mode.getStringKey(), i);
+ for (ApplicationMode mode : ApplicationMode.allPossibleValues()) {
+ appModesOrders.put(mode.getStringKey(), mode.getOrder());
}
}
+ nightMode = !app.getSettings().isLightContent();
+
View mainView = inflater.inflate(R.layout.edit_profiles_list_fragment, container, false);
AndroidUtils.addStatusBarPadding21v(getContext(), mainView);
@@ -82,7 +86,7 @@ public class EditProfilesFragment extends BaseOsmAndFragment {
RecyclerView recyclerView = mainView.findViewById(R.id.profiles_list);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
- adapter = new EditProfilesAdapter(mapActivity);
+ adapter = new EditProfilesAdapter(app);
updateItems();
final ItemTouchHelper touchHelper = new ItemTouchHelper(new ReorderItemTouchHelperCallback(adapter));
@@ -125,7 +129,7 @@ public class EditProfilesFragment extends BaseOsmAndFragment {
recyclerView.setAdapter(adapter);
- View cancelButton = mainView.findViewById(R.id.cancel_button);
+ View cancelButton = mainView.findViewById(R.id.dismiss_button);
UiUtilities.setupDialogButton(false, cancelButton, UiUtilities.DialogButtonType.SECONDARY, R.string.shared_string_cancel);
cancelButton.setOnClickListener(new View.OnClickListener() {
@Override
@@ -137,8 +141,11 @@ public class EditProfilesFragment extends BaseOsmAndFragment {
}
});
- View applyButton = mainView.findViewById(R.id.apply_button);
+ mainView.findViewById(R.id.buttons_divider).setVisibility(View.VISIBLE);
+
+ View applyButton = mainView.findViewById(R.id.right_bottom_button);
UiUtilities.setupDialogButton(false, applyButton, UiUtilities.DialogButtonType.PRIMARY, R.string.shared_string_apply);
+ applyButton.setVisibility(View.VISIBLE);
applyButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -185,6 +192,41 @@ public class EditProfilesFragment extends BaseOsmAndFragment {
outState.putStringArrayList(DELETED_APP_MODES_KEY, deletedModesKeys);
}
+ @Override
+ public void onResume() {
+ super.onResume();
+ MapActivity mapActivity = getMapActivity();
+ if (mapActivity != null) {
+ wasDrawerDisabled = mapActivity.isDrawerDisabled();
+ if (!wasDrawerDisabled) {
+ mapActivity.disableDrawer();
+ }
+ }
+ }
+
+ public void onPause() {
+ super.onPause();
+ MapActivity mapActivity = getMapActivity();
+ if (mapActivity != null && !wasDrawerDisabled) {
+ mapActivity.enableDrawer();
+ }
+ }
+
+ @Override
+ public int getStatusBarColorId() {
+ return nightMode ? R.color.status_bar_color_dark : R.color.status_bar_color_light;
+ }
+
+ @Nullable
+ public MapActivity getMapActivity() {
+ FragmentActivity activity = getActivity();
+ if (activity instanceof MapActivity) {
+ return (MapActivity) activity;
+ } else {
+ return null;
+ }
+ }
+
public List getProfiles(boolean deleted) {
List profiles = new ArrayList<>();
for (ApplicationMode mode : ApplicationMode.allPossibleValues()) {
@@ -271,9 +313,9 @@ public class EditProfilesFragment extends BaseOsmAndFragment {
private boolean nightMode;
- EditProfilesAdapter(MapActivity mapActivity) {
+ EditProfilesAdapter(OsmandApplication app) {
setHasStableIds(true);
- app = mapActivity.getMyApplication();
+ this.app = app;
uiUtilities = app.getUIUtilities();
nightMode = !app.getSettings().isLightContent();
}
@@ -390,11 +432,16 @@ public class EditProfilesFragment extends BaseOsmAndFragment {
Object itemFrom = getItem(from);
Object itemTo = getItem(to);
if (itemFrom instanceof EditProfileDataObject && itemTo instanceof EditProfileDataObject) {
- EditProfileDataObject profileDataObjectFrom = (EditProfileDataObject) itemFrom;
- EditProfileDataObject profileDataObjectTo = (EditProfileDataObject) itemTo;
- int tmp = profileDataObjectFrom.getOrder();
- appModesOrders.put(profileDataObjectFrom.getStringKey(), profileDataObjectTo.getOrder());
- appModesOrders.put(profileDataObjectTo.getStringKey(), tmp);
+ EditProfileDataObject profileFrom = (EditProfileDataObject) itemFrom;
+ EditProfileDataObject profileTo = (EditProfileDataObject) itemTo;
+
+ int orderFrom = profileFrom.getOrder();
+ int orderTo = profileTo.getOrder();
+
+ profileFrom.setOrder(orderTo);
+ profileTo.setOrder(orderFrom);
+ appModesOrders.put(profileFrom.getStringKey(), orderTo);
+ appModesOrders.put(profileTo.getStringKey(), orderFrom);
Collections.swap(items, from, to);
notifyItemMoved(from, to);
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java
index 66bce540dd..998a1464a1 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java
@@ -28,9 +28,9 @@ 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.profiles.ReorderItemTouchHelperCallback;
-import net.osmand.plus.profiles.ReorderItemTouchHelperCallback.UnmovableItem;
-import net.osmand.plus.profiles.ReorderItemTouchHelperCallback.OnItemMoveCallback;
+import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback;
+import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback.UnmovableItem;
+import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback.OnItemMoveCallback;
import java.util.ArrayList;
import java.util.Collections;
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java b/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java
index abad8a7432..3c8dcd9464 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java
@@ -20,7 +20,7 @@ import android.widget.TextView;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dialogs.SelectMapViewQuickActionsBottomSheet;
-import net.osmand.plus.profiles.ReorderItemTouchHelperCallback;
+import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback;
import java.util.ArrayList;
import java.util.Collections;
diff --git a/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java
index ebe67d362e..fc21889ed7 100644
--- a/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java
@@ -40,6 +40,7 @@ public class MainSettingsFragment extends BaseSettingsFragment {
private static final String CREATE_PROFILE = "create_profile";
private static final String IMPORT_PROFILE = "import_profile";
private static final String REORDER_PROFILES = "reorder_profiles";
+
private List allAppModes;
private Set availableAppModes;
private SelectProfileListener selectProfileListener = null;
@@ -89,7 +90,7 @@ public class MainSettingsFragment extends BaseSettingsFragment {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
- ApplicationMode applicationMode = ApplicationMode.valueOfStringKey(preference.getKey(), null);
+ ApplicationMode applicationMode = ApplicationMode.valueOfStringKey(preference.getKey(), null);
if (applicationMode != null) {
if (newValue instanceof Boolean) {
boolean isChecked = (Boolean) newValue;
@@ -121,7 +122,7 @@ public class MainSettingsFragment extends BaseSettingsFragment {
}
private void setupConfigureProfilePref() {
- ApplicationMode selectedMode = app.getSettings().APPLICATION_MODE.get();
+ ApplicationMode selectedMode = app.getSettings().APPLICATION_MODE.get();
String title = selectedMode.toHumanString(getContext());
String profileType = getAppModeDescription(getContext(), selectedMode);
int iconRes = selectedMode.getIconRes();
diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java
index e66b307e2f..de19501412 100644
--- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java
@@ -27,8 +27,9 @@ public class NavigationFragment extends BaseSettingsFragment {
public static final String TAG = NavigationFragment.class.getSimpleName();
public static final String NAVIGATION_TYPE = "navigation_type";
+
private SelectProfileBottomSheetDialogFragment.SelectProfileListener navTypeListener;
- List routingProfileDataObjects;
+ private List routingProfileDataObjects;
private Preference navigationType;
@Override
diff --git a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java
index 45b6b56001..089cdd8b97 100644
--- a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java
@@ -20,7 +20,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
-import android.widget.Button;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView;
@@ -30,6 +29,7 @@ import net.osmand.PlatformUtil;
import net.osmand.plus.ApplicationMode;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
+import net.osmand.plus.UiUtilities.DialogButtonType;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.profiles.SelectProfileBottomSheetDialogFragment;
import net.osmand.plus.profiles.SettingsProfileFragment;
@@ -134,12 +134,22 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = super.onCreateView(inflater, container, savedInstanceState);
if (view != null) {
- FrameLayout frameLayout = view.findViewById(android.R.id.list_container);
- View inflatedLayout = UiUtilities.getInflater(getContext(), isNightMode())
- .inflate(R.layout.preference_cancel_save_button, frameLayout, false);
- frameLayout.addView(inflatedLayout);
- Button cancelButton = inflatedLayout.findViewById(R.id.cancel_button);
- Button saveButton = inflatedLayout.findViewById(R.id.save_profile_btn);
+ FrameLayout preferencesContainer = view.findViewById(android.R.id.list_container);
+ LayoutInflater themedInflater = UiUtilities.getInflater(getContext(), isNightMode());
+ View buttonsContainer = themedInflater.inflate(R.layout.bottom_buttons, preferencesContainer, false);
+
+ preferencesContainer.addView(buttonsContainer);
+ View cancelButton = buttonsContainer.findViewById(R.id.dismiss_button);
+ View saveButton = buttonsContainer.findViewById(R.id.right_bottom_button);
+
+ saveButton.setVisibility(View.VISIBLE);
+ buttonsContainer.findViewById(R.id.buttons_divider).setVisibility(View.VISIBLE);
+
+ AndroidUtils.setBackground(getContext(), buttonsContainer, isNightMode(), R.color.list_background_color_light, R.color.list_background_color_dark);
+
+ UiUtilities.setupDialogButton(false, cancelButton, DialogButtonType.SECONDARY, R.string.shared_string_cancel);
+ UiUtilities.setupDialogButton(false, saveButton, DialogButtonType.PRIMARY, R.string.shared_string_save);
+
cancelButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
diff --git a/OsmAnd/src/net/osmand/plus/profiles/ReorderItemTouchHelperCallback.java b/OsmAnd/src/net/osmand/plus/views/controls/ReorderItemTouchHelperCallback.java
similarity index 97%
rename from OsmAnd/src/net/osmand/plus/profiles/ReorderItemTouchHelperCallback.java
rename to OsmAnd/src/net/osmand/plus/views/controls/ReorderItemTouchHelperCallback.java
index c6b72e413a..832f7a10fa 100644
--- a/OsmAnd/src/net/osmand/plus/profiles/ReorderItemTouchHelperCallback.java
+++ b/OsmAnd/src/net/osmand/plus/views/controls/ReorderItemTouchHelperCallback.java
@@ -1,4 +1,4 @@
-package net.osmand.plus.profiles;
+package net.osmand.plus.views.controls;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;