Add icon
This commit is contained in:
parent
d99c5a9dca
commit
303638b2aa
6 changed files with 10 additions and 6 deletions
BIN
OsmAnd/res/drawable-hdpi/mx_name_finder.png
Normal file
BIN
OsmAnd/res/drawable-hdpi/mx_name_finder.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB |
BIN
OsmAnd/res/drawable-mdpi/mx_name_finder.png
Normal file
BIN
OsmAnd/res/drawable-mdpi/mx_name_finder.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 811 B |
BIN
OsmAnd/res/drawable-xhdpi/mx_name_finder.png
Normal file
BIN
OsmAnd/res/drawable-xhdpi/mx_name_finder.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -23,6 +23,7 @@ import net.osmand.access.NavigationInfo;
|
|||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.AmenityType;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.osm.MapRenderingTypes;
|
||||
import net.osmand.plus.NameFinderPoiFilter;
|
||||
import net.osmand.plus.OsmAndFormatter;
|
||||
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
||||
|
@ -806,9 +807,14 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
|||
direction.setImageResource(R.drawable.closed_poi);
|
||||
}
|
||||
}
|
||||
String i = amenity.getType().getDefaultTag().toLowerCase() + "_" + amenity.getSubType().toLowerCase();
|
||||
if(RenderingIcons.containsBigIcon(i)) {
|
||||
icon.setImageResource(RenderingIcons.getBigIconResourceId(i));
|
||||
StringBuilder tag = new StringBuilder();
|
||||
StringBuilder value = new StringBuilder();
|
||||
MapRenderingTypes.getDefault().getAmenityTagValue(amenity.getType(), amenity.getSubType(),
|
||||
tag, value);
|
||||
if(RenderingIcons.containsBigIcon(tag.toString() + "_" + value.toString())) {
|
||||
icon.setImageResource(RenderingIcons.getBigIconResourceId(tag.toString() + "_" + value.toString()));
|
||||
} else if(RenderingIcons.containsBigIcon(value.toString())) {
|
||||
icon.setImageResource(RenderingIcons.getBigIconResourceId(value.toString()));
|
||||
} else {
|
||||
icon.setImageDrawable(null);
|
||||
}
|
||||
|
|
|
@ -150,14 +150,12 @@ public class SearchPoiFilterActivity extends SherlockListFragment implements Se
|
|||
if(model.getFilterId().equals(PoiFilter.CUSTOM_FILTER_ID)) {
|
||||
icon.setImageResource(android.R.drawable.ic_input_get);
|
||||
} else if (model.getFilterId().equals(PoiFilter.BY_NAME_FILTER_ID)) {
|
||||
//label.setTypeface(Typeface.DEFAULT, Typeface.ITALIC);
|
||||
icon.setImageResource(android.R.drawable.ic_search_category_default);
|
||||
} else {
|
||||
// label.setTypeface(Typeface.DEFAULT);
|
||||
if(RenderingIcons.containsBigIcon(model.getSimplifiedId())) {
|
||||
icon.setImageDrawable(RenderingIcons.getBigIcon(getActivity(), model.getSimplifiedId()));
|
||||
} else {
|
||||
icon.setImageResource(model.isStandardFilter() ? R.drawable.folder : R.drawable.list_favorite);
|
||||
icon.setImageResource(R.drawable.mx_user_defined);
|
||||
}
|
||||
}
|
||||
ImageView editIcon = (ImageView) row.findViewById(R.id.folder_edit_icon);
|
||||
|
|
Loading…
Reference in a new issue