Add colors
This commit is contained in:
parent
2f873703c9
commit
4eb39fc8da
2 changed files with 11 additions and 3 deletions
|
@ -238,6 +238,9 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
|||
final Map<String, String> listAlreadyDownloaded = listAlreadyDownloadedWithAlternatives();
|
||||
final List<IndexItem> filtered = new ArrayList<IndexItem>();
|
||||
for (IndexItem fileItem : listAdapter.getIndexFiles()) {
|
||||
if(fileItem.isAlreadyDownloaded(listAlreadyDownloaded)){
|
||||
filtered.add(fileItem);
|
||||
}
|
||||
if (listAlreadyDownloaded.containsKey(fileItem.getTargetFileName())) {
|
||||
filtered.add(fileItem);
|
||||
}
|
||||
|
@ -455,6 +458,7 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
|||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.BACKUP_PATH),BINARY_MAP_INDEX_EXT, files);
|
||||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.APP_DIR),BINARY_MAP_INDEX_EXT, files);
|
||||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.APP_DIR),EXTRA_EXT, files);
|
||||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.SRTM_PATH),BINARY_MAP_INDEX_EXT, files);
|
||||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.VOICE_PATH),"", files);
|
||||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.VOICE_PATH),"", files);
|
||||
return files;
|
||||
|
|
|
@ -239,12 +239,16 @@ public class DownloadIndexAdapter extends OsmandBaseExpandableListAdapter implem
|
|||
});
|
||||
|
||||
if (indexFileNames != null) {
|
||||
String sfName = e.getTargetFileName();
|
||||
if (!indexFileNames.containsKey(sfName)) {
|
||||
|
||||
if (!e.isAlreadyDownloaded(indexFileNames)) {
|
||||
item.setTextColor(downloadActivity.getResources().getColor(R.color.index_unknown));
|
||||
item.setTypeface(Typeface.DEFAULT, Typeface.NORMAL);
|
||||
} else {
|
||||
if (e.getDate() != null) {
|
||||
if(e.getType() == DownloadActivityType.SRTM_FILE){
|
||||
item.setTextColor(downloadActivity.getResources().getColor(R.color.act_index_uptodate)); // GREEN
|
||||
item.setTypeface(Typeface.DEFAULT, Typeface.NORMAL);
|
||||
} else if (e.getDate() != null) {
|
||||
String sfName = e.getTargetFileName();
|
||||
if (e.getDate().equals(indexActivatedFileNames.get(sfName))) {
|
||||
item.setText(item.getText() + "\n" + downloadActivity.getResources().getString(R.string.local_index_installed) + " : "
|
||||
+ indexActivatedFileNames.get(sfName));
|
||||
|
|
Loading…
Reference in a new issue