region names - geographical sorting

This commit is contained in:
sonora 2012-01-14 10:56:26 +01:00
parent 771b724941
commit 7bdb75e20c
2 changed files with 31 additions and 31 deletions

View file

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources>
<string name="index_name_voice">_Voice packs (recorded)</string>
<string name="index_name_tts_voice">_Voice packs (TTS)</string>
<string name="index_name_us">North America - United States</string>
<string name="index_name_north_america">North America - other maps</string>
<string name="index_name_central_america">Central America</string>
@ -13,8 +11,10 @@
<string name="index_name_africa">Africa</string>
<string name="index_name_asia">Asia</string>
<string name="index_name_australia">Australia</string>
<string name="index_name_other">Worldwide and topic maps</string>
<string name="index_name_other">Other (Worldwide and topic maps)</string>
<string name="index_name_wiki">Worldwide Wikipedia</string>
<string name="index_name_voice">_Voice packs (recorded)</string>
<string name="index_name_tts_voice">_Voice packs (TTS)</string>
<string name="amenity_type_wikiosm">Wikipedia (offline)</string>
<string name="amenity_type_user_defined">User defined</string>

View file

@ -684,50 +684,50 @@ public class DownloadIndexActivity extends ExpandableListActivity {
final Map<String, IndexItemCategory> cats = new TreeMap<String, DownloadIndexActivity.IndexItemCategory>();
for(IndexItem i : indexItems){
int nameId = R.string.index_name_other;
int order = 100;
int order = 80;
String lc = i.getFileName().toLowerCase();
if(lc.endsWith(".voice.zip")) {
nameId = R.string.index_name_voice;
order = 1;
order = 95;
} else if(lc.contains(".ttsvoice.zip")) {
nameId = R.string.index_name_tts_voice;
order = 3;
} else if(lc.contains("_wiki_")) {
nameId = R.string.index_name_wiki;
order = 5;
} else if(lc.startsWith("germany_")) {
nameId = R.string.index_name_germany;
order = 40;
} else if(lc.startsWith("france_")) {
nameId = R.string.index_name_france;
order = 45;
} else if(lc.startsWith("russia_")) {
nameId = R.string.index_name_russia;
order = 50;
order = 96;
} else if(lc.startsWith("us")) {
nameId = R.string.index_name_us;
order = 60;
} else if(lc.contains("_europe_")) {
nameId = R.string.index_name_europe;
order = 10;
} else if(lc.contains("_asia_")) {
nameId = R.string.index_name_asia;
order = 80;
} else if(lc.contains("_northamerica_")) {
nameId = R.string.index_name_north_america;
order = 65;
order = 19;
} else if(lc.contains("_centralamerica_") || lc.contains("central-america")) {
nameId = R.string.index_name_central_america;
order = 70;
order = 20;
} else if(lc.contains("_southamerica_") || lc.contains("south-america")) {
nameId = R.string.index_name_south_america;
order = 75;
} else if(lc.contains("australia")) {
nameId = R.string.index_name_australia;
order = 80;
order = 30;
} else if(lc.startsWith("france_")) {
nameId = R.string.index_name_france;
order = 40;
} else if(lc.startsWith("germany_")) {
nameId = R.string.index_name_germany;
order = 41;
} else if(lc.contains("_europe_")) {
nameId = R.string.index_name_europe;
order = 48;
} else if(lc.startsWith("russia_")) {
nameId = R.string.index_name_russia;
order = 49;
} else if(lc.contains("africa")) {
nameId = R.string.index_name_africa;
order = 85;
order = 50;
} else if(lc.contains("_asia_")) {
nameId = R.string.index_name_asia;
order = 60;
} else if(lc.contains("australia")) {
nameId = R.string.index_name_australia;
order = 70;
} else if(lc.contains("_wiki_")) {
nameId = R.string.index_name_wiki;
order = 90;
}
String name = getString(nameId);