Import: show quantity of items on the second line "None > 0/10"

This commit is contained in:
androiddevkkotlin 2020-12-14 00:14:33 +02:00
parent bb1ee7e74d
commit 0855c21717
2 changed files with 5 additions and 3 deletions

View file

@ -126,7 +126,7 @@ public abstract class BaseSettingsListFragment extends BaseOsmAndFragment implem
}
});
adapter = new ExportSettingsAdapter(app, this, nightMode);
adapter = new ExportSettingsAdapter(app, exportMode, this, nightMode);
adapter.updateSettingsItems(dataList, selectedItemsMap);
expandableList.setAdapter(adapter);
updateAvailableSpace();

View file

@ -43,6 +43,7 @@ public class ExportSettingsAdapter extends OsmandBaseExpandableListAdapter {
private final OsmandApplication app;
private final UiUtilities uiUtilities;
private final boolean exportMode;
private List<ExportSettingsCategory> itemsTypes;
private Map<ExportSettingsType, List<?>> selectedItemsMap;
@ -59,8 +60,9 @@ public class ExportSettingsAdapter extends OsmandBaseExpandableListAdapter {
private final int childViewHeight;
private final int listBottomPadding;
ExportSettingsAdapter(OsmandApplication app, OnItemSelectedListener listener, boolean nightMode) {
ExportSettingsAdapter(OsmandApplication app, boolean exportMode, OnItemSelectedListener listener, boolean nightMode) {
this.app = app;
this.exportMode = exportMode;
this.listener = listener;
this.nightMode = nightMode;
uiUtilities = app.getUIUtilities();
@ -279,7 +281,7 @@ public class ExportSettingsAdapter extends OsmandBaseExpandableListAdapter {
}
}
String description;
if (selectedTypes == 0) {
if (selectedTypes == 0 && exportMode) {
description = app.getString(R.string.shared_string_none);
} else if (selectedTypes == items.getTypes().size()) {
description = app.getString(R.string.shared_string_all);