Add a new section in the quick action list "Configure screen"

https://github.com/osmandapp/OsmAnd/issues/10196
This commit is contained in:
androiddevkotlin 2021-03-03 13:52:44 +02:00
parent 31f08d05b5
commit 58569b1cc5
3 changed files with 5 additions and 1 deletions

View file

@ -66,6 +66,8 @@ public class QuickActionRegistry {
nameRes(R.string.quick_action_add_configure_map).category(QuickActionType.CONFIGURE_MAP);
public static final QuickActionType TYPE_NAVIGATION = new QuickActionType(0, "").
nameRes(R.string.quick_action_add_navigation).category(QuickActionType.NAVIGATION);
public static final QuickActionType TYPE_CONFIGURE_SCREEN = new QuickActionType(0, "").
nameRes(R.string.map_widget_config).category(QuickActionType.CONFIGURE_SCREEN);
private final OsmandSettings settings;
@ -248,6 +250,7 @@ public class QuickActionRegistry {
filterQuickActions(TYPE_ADD_ITEMS, result);
filterQuickActions(TYPE_CONFIGURE_MAP, result);
filterQuickActions(TYPE_NAVIGATION, result);
filterQuickActions(TYPE_CONFIGURE_SCREEN, result);
return result;
}

View file

@ -10,6 +10,7 @@ public class QuickActionType {
public static final int CREATE_CATEGORY = 0;
public static final int CONFIGURE_MAP = 1;
public static final int NAVIGATION = 2;
public static final int CONFIGURE_SCREEN = 3;
private final int id;
private final String stringId;

View file

@ -16,7 +16,7 @@ public class ShowHideCoordinatesWidgetAction extends QuickAction {
"coordinates.showhide", ShowHideCoordinatesWidgetAction.class)
.nameRes(R.string.quick_action_showhide_coordinates_widget)
.iconRes(R.drawable.ic_action_coordinates_widget).nonEditable()
.category(QuickActionType.CONFIGURE_MAP);
.category(QuickActionType.CONFIGURE_SCREEN);
public ShowHideCoordinatesWidgetAction() {
super(TYPE);