update icons
This commit is contained in:
parent
98ba2a7b40
commit
a8d3c9d812
3 changed files with 17 additions and 4 deletions
|
@ -3,6 +3,9 @@
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView android:id="@+id/poi_direction" android:layout_width="26dp" android:layout_height="26dp"
|
||||||
|
android:layout_marginLeft="2dp" android:layout_marginTop="2dp"
|
||||||
|
android:paddingTop="0dp" />
|
||||||
<ImageView android:id="@+id/poi_icon" android:layout_width="26dp" android:layout_height="26dp"
|
<ImageView android:id="@+id/poi_icon" android:layout_width="26dp" android:layout_height="26dp"
|
||||||
android:layout_marginLeft="2dp" android:layout_marginTop="2dp"
|
android:layout_marginLeft="2dp" android:layout_marginTop="2dp"
|
||||||
android:paddingTop="0dp" />
|
android:paddingTop="0dp" />
|
||||||
|
|
|
@ -547,6 +547,8 @@ public class MapActivityLayers {
|
||||||
Item it = adapter.item(f.getName());
|
Item it = adapter.item(f.getName());
|
||||||
if(RenderingIcons.containsBigIcon(f.getSimplifiedId())) {
|
if(RenderingIcons.containsBigIcon(f.getSimplifiedId())) {
|
||||||
it.icon(RenderingIcons.getBigIconResourceId(f.getSimplifiedId()));
|
it.icon(RenderingIcons.getBigIconResourceId(f.getSimplifiedId()));
|
||||||
|
} else {
|
||||||
|
it.icon(RenderingIcons.getBigIconResourceId("user_defined"));
|
||||||
}
|
}
|
||||||
it.reg();
|
it.reg();
|
||||||
userDefined.add(f);
|
userDefined.add(f);
|
||||||
|
|
|
@ -36,6 +36,7 @@ import net.osmand.plus.activities.EditPOIFilterActivity;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.MapActivityActions;
|
import net.osmand.plus.activities.MapActivityActions;
|
||||||
import net.osmand.plus.activities.OsmandListActivity;
|
import net.osmand.plus.activities.OsmandListActivity;
|
||||||
|
import net.osmand.plus.render.RenderingIcons;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
import net.osmand.util.OpeningHoursParser;
|
import net.osmand.util.OpeningHoursParser;
|
||||||
import net.osmand.util.OpeningHoursParser.OpeningHours;
|
import net.osmand.util.OpeningHoursParser.OpeningHours;
|
||||||
|
@ -765,6 +766,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
}
|
}
|
||||||
float[] mes = null;
|
float[] mes = null;
|
||||||
TextView label = (TextView) row.findViewById(R.id.poi_label);
|
TextView label = (TextView) row.findViewById(R.id.poi_label);
|
||||||
|
ImageView direction = (ImageView) row.findViewById(R.id.poi_direction);
|
||||||
ImageView icon = (ImageView) row.findViewById(R.id.poi_icon);
|
ImageView icon = (ImageView) row.findViewById(R.id.poi_icon);
|
||||||
Amenity amenity = getItem(position);
|
Amenity amenity = getItem(position);
|
||||||
net.osmand.Location loc = location;
|
net.osmand.Location loc = location;
|
||||||
|
@ -794,16 +796,22 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
float a = h != null ? h : 0;
|
float a = h != null ? h : 0;
|
||||||
draw.setAngle(mes[1] - a + 180);
|
draw.setAngle(mes[1] - a + 180);
|
||||||
draw.setOpenedColor(opened);
|
draw.setOpenedColor(opened);
|
||||||
icon.setImageDrawable(draw);
|
direction.setImageDrawable(draw);
|
||||||
} else {
|
} else {
|
||||||
if(opened == -1){
|
if(opened == -1){
|
||||||
icon.setImageResource(R.drawable.poi);
|
direction.setImageResource(R.drawable.poi);
|
||||||
} else if(opened == 0){
|
} else if(opened == 0){
|
||||||
icon.setImageResource(R.drawable.opened_poi);
|
direction.setImageResource(R.drawable.opened_poi);
|
||||||
} else {
|
} else {
|
||||||
icon.setImageResource(R.drawable.closed_poi);
|
direction.setImageResource(R.drawable.closed_poi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
String i = amenity.getType().getDefaultTag().toLowerCase() + "_" + amenity.getSubType().toLowerCase();
|
||||||
|
if(RenderingIcons.containsBigIcon(i)) {
|
||||||
|
icon.setImageResource(RenderingIcons.getBigIconResourceId(i));
|
||||||
|
} else {
|
||||||
|
icon.setImageDrawable(null);
|
||||||
|
}
|
||||||
|
|
||||||
String distance = " ";
|
String distance = " ";
|
||||||
if(mes != null){
|
if(mes != null){
|
||||||
|
|
Loading…
Reference in a new issue