move context to first place
This commit is contained in:
parent
c3c32ad78f
commit
e9982bd79c
5 changed files with 6 additions and 6 deletions
|
@ -139,7 +139,7 @@ public abstract class SwitchableAction<T> 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<T> extends QuickAction {
|
|||
|
||||
protected abstract void saveListToParams(List<T> list);
|
||||
|
||||
protected abstract String getItemName(T item, Context context);
|
||||
protected abstract String getItemName(Context context, T item);
|
||||
|
||||
protected abstract
|
||||
@StringRes
|
||||
|
|
|
@ -70,7 +70,7 @@ public class MapOverlayAction extends SwitchableAction<Pair<String, String>> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected String getItemName(Pair<String, String> item, Context context) {
|
||||
protected String getItemName(Context context, Pair<String, String> item) {
|
||||
return item.second;
|
||||
}
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ public class MapSourceAction extends SwitchableAction<Pair<String, String>> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected String getItemName(Pair<String, String> item, Context context) {
|
||||
protected String getItemName(Context context, Pair<String, String> item) {
|
||||
return item.second;
|
||||
}
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ public class MapStyleAction extends SwitchableAction<String> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected String getItemName(String item, Context context) {
|
||||
protected String getItemName(Context context, String item) {
|
||||
if (context != null) {
|
||||
return getTranslatedItemName(context, item);
|
||||
} else {
|
||||
|
|
|
@ -70,7 +70,7 @@ public class MapUnderlayAction extends SwitchableAction<Pair<String, String>> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected String getItemName(Pair<String, String> item, Context context) {
|
||||
protected String getItemName(Context context, Pair<String, String> item) {
|
||||
return item.second;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue