From 765402b4e80a1ee0758bbd25de5d968c893fbd01 Mon Sep 17 00:00:00 2001 From: Chumva Date: Fri, 8 Jun 2018 15:08:12 +0300 Subject: [PATCH] move context to first place --- OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java | 4 ++-- .../net/osmand/plus/quickaction/actions/MapOverlayAction.java | 2 +- .../net/osmand/plus/quickaction/actions/MapSourceAction.java | 2 +- .../net/osmand/plus/quickaction/actions/MapStyleAction.java | 2 +- .../osmand/plus/quickaction/actions/MapUnderlayAction.java | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java b/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java index 58581de3cd..76a3ce9e57 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java @@ -139,7 +139,7 @@ public abstract class SwitchableAction extends QuickAction { public void onBindViewHolder(final Adapter.ItemHolder holder, final int position) { final T item = itemsList.get(position); - holder.title.setText(getItemName(item, context)); + holder.title.setText(getItemName(context, item)); holder.handleView.setOnTouchListener(new View.OnTouchListener() { @Override @@ -278,7 +278,7 @@ public abstract class SwitchableAction extends QuickAction { protected abstract void saveListToParams(List list); - protected abstract String getItemName(T item, Context context); + protected abstract String getItemName(Context context, T item); protected abstract @StringRes diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapOverlayAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapOverlayAction.java index 58d6e6210c..b0ec9e3bd9 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapOverlayAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapOverlayAction.java @@ -70,7 +70,7 @@ public class MapOverlayAction extends SwitchableAction> { } @Override - protected String getItemName(Pair item, Context context) { + protected String getItemName(Context context, Pair item) { return item.second; } diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapSourceAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapSourceAction.java index 6123015b91..d791d9d074 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapSourceAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapSourceAction.java @@ -189,7 +189,7 @@ public class MapSourceAction extends SwitchableAction> { } @Override - protected String getItemName(Pair item, Context context) { + protected String getItemName(Context context, Pair item) { return item.second; } diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java index 8cf8ab2286..7d3baec077 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java @@ -201,7 +201,7 @@ public class MapStyleAction extends SwitchableAction { } @Override - protected String getItemName(String item, Context context) { + protected String getItemName(Context context, String item) { if (context != null) { return getTranslatedItemName(context, item); } else { diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapUnderlayAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapUnderlayAction.java index 93771f68c4..db2af27323 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapUnderlayAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapUnderlayAction.java @@ -70,7 +70,7 @@ public class MapUnderlayAction extends SwitchableAction> { } @Override - protected String getItemName(Pair item, Context context) { + protected String getItemName(Context context, Pair item) { return item.second; }