From cfdbe089454fa67b9196084482e6e83ce985c0f6 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Thu, 10 May 2018 14:53:32 +0200 Subject: [PATCH] Fix #5159 --- .../net/osmand/plus/download/ui/UpdatesIndexFragment.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java index 0d288b29b8..b4f2176ab8 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java @@ -2,6 +2,7 @@ package net.osmand.plus.download.ui; import android.app.Activity; import android.content.Context; +import android.icu.text.Collator; import android.os.Bundle; import android.support.v4.view.MenuItemCompat; import android.support.v7.app.ActionBar; @@ -15,7 +16,6 @@ import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; - import net.osmand.map.OsmandRegions; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; @@ -94,11 +94,12 @@ public class UpdatesIndexFragment extends OsmAndListFragment implements Download OsmandSettings settings = getMyApplication().getSettings(); listAdapter = new UpdateIndexAdapter(a, R.layout.download_index_list_item, indexItems, !InAppPurchaseHelper.isSubscribedToLiveUpdates(getMyApplication()) || settings.SHOULD_SHOW_FREE_VERSION_BANNER.get()); + final Collator collator = Collator.getInstance(); listAdapter.sort(new Comparator() { @Override public int compare(IndexItem indexItem, IndexItem indexItem2) { - return indexItem.getVisibleName(getMyApplication(), osmandRegions) - .compareTo(indexItem2.getVisibleName(getMyApplication(), osmandRegions)); + return collator.compare(indexItem.getVisibleName(getMyApplication(), osmandRegions), + indexItem2.getVisibleName(getMyApplication(), osmandRegions)); } }); setListAdapter(listAdapter);