Add orange color

This commit is contained in:
Victor Shcherb 2012-08-31 00:12:21 +02:00
parent a628c3f6dc
commit 97bac1931d
6 changed files with 6 additions and 7 deletions

View file

@ -103,6 +103,7 @@ public class DownloadOsmandIndexesHelper {
IndexFileList result = new IndexFileList();
log.debug("Start loading list of index files"); //$NON-NLS-1$
try {
log.info("http://download.osmand.net/get_indexes?" + versionAsUrl);
URL url = new URL("http://download.osmand.net/get_indexes?" + versionAsUrl ); //$NON-NLS-1$
XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();
parser.setInput(url.openStream(), "UTF-8"); //$NON-NLS-1$

View file

@ -650,7 +650,7 @@ public class FavouritesActivity extends OsmandExpandableListActivity {
lastKnownMapLocation.getLatitude(), lastKnownMapLocation.getLongitude()));
String distance = OsmAndFormatter.getFormattedDistance(dist, FavouritesActivity.this) + " ";
label.setText(distance + model.getName(), TextView.BufferType.SPANNABLE);
((Spannable) label.getText()).setSpan(new ForegroundColorSpan(R.color.color_distance), 0, distance.length() - 1, 0);
((Spannable) label.getText()).setSpan(new ForegroundColorSpan(getResources().getColor(R.color.color_distance)), 0, distance.length() - 1, 0);
final CheckBox ch = (CheckBox) row.findViewById(R.id.check_item);
if(selectionMode && model.isStored()){
ch.setVisibility(View.VISIBLE);

View file

@ -174,9 +174,7 @@ public class FavouritesListActivity extends ListActivity implements SearchActivi
}
label.setText(distance + getName(model), BufferType.SPANNABLE);
((Spannable) label.getText()).setSpan(new ForegroundColorSpan(R.color.color_distance), 0, distance.length(), 0);
label.setText(getName(model));
((Spannable) label.getText()).setSpan(new ForegroundColorSpan(getResources().getColor(R.color.color_distance)), 0, distance.length(), 0);
final CheckBox ch = (CheckBox) row.findViewById(R.id.check_item);
row.findViewById(R.id.favourite_icon).setVisibility(View.VISIBLE);
ch.setVisibility(View.GONE);

View file

@ -136,7 +136,7 @@ public class SearchHistoryActivity extends ListActivity implements SearchActivi
distance = OsmAndFormatter.getFormattedDistance(dist, SearchHistoryActivity.this) + " ";
}
label.setText(distance + model.name, BufferType.SPANNABLE);
((Spannable) label.getText()).setSpan(new ForegroundColorSpan(R.color.color_distance), 0, distance.length(), 0);
((Spannable) label.getText()).setSpan(new ForegroundColorSpan(getResources().getColor(R.color.color_distance)), 0, distance.length(), 0);
icon.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

View file

@ -756,7 +756,7 @@ public class SearchPOIActivity extends OsmandListActivity implements SensorEvent
}
String poiType = OsmAndFormatter.getPoiStringWithoutType(amenity, settings.usingEnglishNames());
label.setText(distance + poiType, TextView.BufferType.SPANNABLE);
((Spannable) label.getText()).setSpan(new ForegroundColorSpan(R.color.color_distance), 0, distance.length() - 1, 0);
((Spannable) label.getText()).setSpan(new ForegroundColorSpan(getResources().getColor(R.color.color_distance)), 0, distance.length() - 1, 0);
return (row);
}

View file

@ -492,7 +492,7 @@ public class SearchTransportActivity extends ListActivity implements SearchActiv
int dist = locationToStart == null ? 0 : (int) (MapUtils.getDistance(stop.getStart().getLocation(), locationToStart));
String distance = OsmAndFormatter.getFormattedDistance(dist, SearchTransportActivity.this) + " "; //$NON-NLS-1$
label.setText(distance + labelW.toString(), TextView.BufferType.SPANNABLE);
((Spannable) label.getText()).setSpan(new ForegroundColorSpan(R.color.color_distance), 0, distance.length() - 1, 0);
((Spannable) label.getText()).setSpan(new ForegroundColorSpan(getResources().getColor(R.color.color_distance)), 0, distance.length() - 1, 0);
return (row);
}
}