diff --git a/OsmAnd/res/layout/bottom_sheet_item_description_with_padding.xml b/OsmAnd/res/layout/bottom_sheet_item_description_with_padding.xml
new file mode 100644
index 0000000000..b6516e85ff
--- /dev/null
+++ b/OsmAnd/res/layout/bottom_sheet_item_description_with_padding.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
\ 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 8d062117ae..1b4fc65968 100644
--- a/OsmAnd/res/layout/global_preferences_toolbar_with_switch.xml
+++ b/OsmAnd/res/layout/global_preferences_toolbar_with_switch.xml
@@ -34,8 +34,9 @@
+
+
diff --git a/OsmAnd/res/layout/preference_button.xml b/OsmAnd/res/layout/preference_button.xml
index 66d59b377b..5d5deb7500 100644
--- a/OsmAnd/res/layout/preference_button.xml
+++ b/OsmAnd/res/layout/preference_button.xml
@@ -28,25 +28,37 @@
+ android:layout_marginLeft="@dimen/content_padding"
+ android:layout_marginStart="@dimen/content_padding"
+ android:orientation="vertical">
-
+
+
+ android:layout_height="1dp"
+ android:visibility="gone"
+ android:background="?attr/dashboard_divider" />
diff --git a/OsmAnd/res/layout/quick_action_list.xml b/OsmAnd/res/layout/quick_action_list.xml
index 7c6f0b8c12..02c9e637ac 100644
--- a/OsmAnd/res/layout/quick_action_list.xml
+++ b/OsmAnd/res/layout/quick_action_list.xml
@@ -1,6 +1,5 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_height="match_parent"
+ android:layout_below="@id/appbar"
+ android:clipToPadding="false" />
+ app:srcCompat="@drawable/ic_action_plus" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/quick_action_list_header.xml b/OsmAnd/res/layout/quick_action_list_header.xml
index 16bdd6c486..37bf925e37 100644
--- a/OsmAnd/res/layout/quick_action_list_header.xml
+++ b/OsmAnd/res/layout/quick_action_list_header.xml
@@ -1,21 +1,23 @@
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/bottom_sheet_list_item_height"
+ android:background="?attr/bg_color"
+ android:paddingStart="@dimen/content_padding"
+ android:paddingLeft="@dimen/content_padding"
+ android:paddingEnd="@dimen/content_padding"
+ android:paddingRight="@dimen/content_padding">
-
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/quick_action_list_item.xml b/OsmAnd/res/layout/quick_action_list_item.xml
index 1661bc06cd..df86cc46dc 100644
--- a/OsmAnd/res/layout/quick_action_list_item.xml
+++ b/OsmAnd/res/layout/quick_action_list_item.xml
@@ -1,92 +1,138 @@
+ xmlns:osmand="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:background="?attr/bg_color"
+ android:orientation="vertical">
-
+
-
+
+
+
+
+
+ android:layout_marginLeft="@dimen/content_padding"
+ android:layout_marginStart="@dimen/content_padding"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
-
+ android:minHeight="@dimen/setting_profile_item_height"
+ android:orientation="horizontal">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_height="1dp"
+ android:background="?attr/dashboard_divider" />
-
-
+ android:background="?attr/dashboard_divider" />
\ No newline at end of file
diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml
index 72f5e2b989..da3ab7066b 100644
--- a/OsmAnd/res/values-ar/strings.xml
+++ b/OsmAnd/res/values-ar/strings.xml
@@ -2107,8 +2107,7 @@
إضافة للمفضلة
إضافة إجراء
حذف إجراء
- هل تريد حذف الإجراء
-\n \"%s\" ؟
+ هل تريد حذف الإجراء\n \"%s\" ؟
اسم الإجراء
إضافة خطأ إلى OSM
عرض مربع حوار الأماكن المفضلة
diff --git a/OsmAnd/res/values-b+kab/strings.xml b/OsmAnd/res/values-b+kab/strings.xml
index e931417beb..fdf37cff65 100644
--- a/OsmAnd/res/values-b+kab/strings.xml
+++ b/OsmAnd/res/values-b+kab/strings.xml
@@ -1054,12 +1054,10 @@
Sken %1$S
Inurifen
Sken inurifen
- Tebɣiḍ ad tekseḍ tigawt-agi\?
Kkes tigawt
Tigawt
Taɣect:
Rnu
- Agdil
Ali
Ṣeggem akken iwat anadi-ik
Rnu ugar...
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 65a1231387..3cb9e2e346 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -11,6 +11,10 @@
Thx - Hardy
-->
+ Selected: %d
+ Are you sure you want to irrevocably delete %d quick actions?
+ Delete all?
+ You can Export or Import quick actions with application profiles.
Unsupported type
World overview map (detailed)
Could not find any such profiles.
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
index 75330977de..842ed8af57 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
@@ -730,13 +730,15 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
prevActivityIntent = null;
return;
}
- if (getMapView().getLayerByClass(MapQuickActionLayer.class).onBackPressed()) {
- return;
- }
QuickActionListFragment quickActionListFragment = getQuickActionListFragment();
- if (quickActionListFragment != null && quickActionListFragment.isVisible()
- && quickActionListFragment.fromDashboard()) {
- this.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_SCREEN, null);
+ if (quickActionListFragment != null && quickActionListFragment.isVisible()) {
+ if (quickActionListFragment.fromDashboard()) {
+ this.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_SCREEN, null);
+ } else {
+ getMapView().getLayerByClass(MapQuickActionLayer.class).onBackPressed();
+ }
+ } else if (getMapView().getLayerByClass(MapQuickActionLayer.class).onBackPressed()) {
+ return;
}
ImportSettingsFragment importSettingsFragment = getImportSettingsFragment();
if (importSettingsFragment != null) {
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/ConfirmationBottomSheet.java b/OsmAnd/src/net/osmand/plus/quickaction/ConfirmationBottomSheet.java
new file mode 100644
index 0000000000..87af1a0442
--- /dev/null
+++ b/OsmAnd/src/net/osmand/plus/quickaction/ConfirmationBottomSheet.java
@@ -0,0 +1,101 @@
+package net.osmand.plus.quickaction;
+
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+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.OsmandApplication;
+import net.osmand.plus.R;
+import net.osmand.plus.UiUtilities;
+import net.osmand.plus.base.MenuBottomSheetDialogFragment;
+import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription;
+import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem;
+
+public class ConfirmationBottomSheet extends MenuBottomSheetDialogFragment {
+
+ private static final String TITLE_KEY = "title";
+ private static final String MESSAGE_KEY = "message";
+ private static final String RIGHT_BUTTON_TITLE_KEY = "right_button_title";
+
+ private String title;
+ private CharSequence message;
+ private int rightButtonTitle;
+
+ public static final String TAG = ConfirmationBottomSheet.class.getSimpleName();
+
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
+ OsmandApplication app = requiredMyApplication();
+ if (savedInstanceState != null) {
+ title = savedInstanceState.getString(TITLE_KEY);
+ message = savedInstanceState.getCharSequence(MESSAGE_KEY);
+ rightButtonTitle = savedInstanceState.getInt(RIGHT_BUTTON_TITLE_KEY);
+ }
+ View view = super.onCreateView(inflater, parent, savedInstanceState);
+ UiUtilities.setupDialogButton(nightMode, rightButton,
+ UiUtilities.DialogButtonType.SECONDARY, rightButtonTitle);
+ TextView tvRightButton = rightButton.findViewById(R.id.button_text);
+ int colorDelete = ContextCompat.getColor(app, R.color.color_osm_edit_delete);
+ tvRightButton.setTextColor(colorDelete);
+ return view;
+ }
+
+ @Override
+ public void createMenuItems(Bundle savedInstanceState) {
+ items.add(new TitleItem(title));
+ items.add(new BottomSheetItemWithDescription.Builder()
+ .setDescription(message)
+ .setLayoutId(R.layout.bottom_sheet_item_preference_descr)
+ .create());
+ }
+
+ @Override
+ protected void onRightBottomButtonClick() {
+ Fragment target = getTargetFragment();
+ if (target instanceof OnConfirmButtonClickListener) {
+ ((OnConfirmButtonClickListener) target).onConfirmButtonClick();
+ }
+ dismiss();
+ }
+
+ @Override
+ protected int getRightBottomButtonTextId() {
+ return rightButtonTitle;
+ }
+
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ outState.putString(TITLE_KEY, title);
+ outState.putCharSequence(MESSAGE_KEY, message);
+ outState.putInt(RIGHT_BUTTON_TITLE_KEY, rightButtonTitle);
+ }
+
+ public static void showInstance(@NonNull FragmentManager fm,
+ Fragment targetFragment,
+ @NonNull String title,
+ @NonNull CharSequence message,
+ int rightButtonTitle,
+ boolean usedOnMap) {
+ ConfirmationBottomSheet f = new ConfirmationBottomSheet();
+ f.title = title;
+ f.message = message;
+ f.rightButtonTitle = rightButtonTitle;
+ f.setTargetFragment(targetFragment, 0);
+ f.setUsedOnMap(usedOnMap);
+ f.show(fm, ConfirmationBottomSheet.TAG);
+ }
+
+ public interface OnConfirmButtonClickListener {
+ void onConfirmButtonClick();
+ }
+}
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
index 9fdc94c8df..7d013003d5 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
@@ -1,7 +1,6 @@
package net.osmand.plus.quickaction;
import android.app.Dialog;
-import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
@@ -34,13 +33,14 @@ import net.osmand.plus.activities.MapActivity;
import java.util.List;
-import static net.osmand.plus.quickaction.QuickActionListFragment.showConfirmActionDeleteDialog;
+import static net.osmand.plus.quickaction.QuickActionListFragment.showConfirmDeleteAnActionBottomSheet;
/**
* Created by rosty on 12/27/16.
*/
-public class CreateEditActionDialog extends DialogFragment implements CallbackWithObject