Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
e384647a89
4 changed files with 12 additions and 10 deletions
|
@ -14,6 +14,7 @@
|
||||||
android:id="@+id/poi_icon"
|
android:id="@+id/poi_icon"
|
||||||
android:layout_width="26dp"
|
android:layout_width="26dp"
|
||||||
android:layout_height="26dp"
|
android:layout_height="26dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginRight="@dimen/favorites_icon_right_margin"
|
android:layout_marginRight="@dimen/favorites_icon_right_margin"
|
||||||
tools:visiblity="visible"/>
|
tools:visiblity="visible"/>
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,6 @@ import gnu.trove.set.hash.TLongHashSet;
|
||||||
*/
|
*/
|
||||||
public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompassListener, OsmAndLocationListener {
|
public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompassListener, OsmAndLocationListener {
|
||||||
|
|
||||||
private static final int COMPASS_REFRESH_MSG_ID = OsmAndConstants.UI_HANDLER_SEARCH + 3;
|
|
||||||
public static final String AMENITY_FILTER = "net.osmand.amenity_filter"; //$NON-NLS-1$
|
public static final String AMENITY_FILTER = "net.osmand.amenity_filter"; //$NON-NLS-1$
|
||||||
public static final String SEARCH_LAT = SearchActivity.SEARCH_LAT; //$NON-NLS-1$
|
public static final String SEARCH_LAT = SearchActivity.SEARCH_LAT; //$NON-NLS-1$
|
||||||
public static final String SEARCH_LON = SearchActivity.SEARCH_LON; //$NON-NLS-1$
|
public static final String SEARCH_LON = SearchActivity.SEARCH_LON; //$NON-NLS-1$
|
||||||
|
@ -96,10 +95,6 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
private static final int SHOW_ON_MAP = 1;
|
private static final int SHOW_ON_MAP = 1;
|
||||||
private static final int FILTER = 2;
|
private static final int FILTER = 2;
|
||||||
|
|
||||||
private static final int ORIENTATION_0 = 0;
|
|
||||||
private static final int ORIENTATION_90 = 3;
|
|
||||||
private static final int ORIENTATION_270 = 1;
|
|
||||||
private static final int ORIENTATION_180 = 2;
|
|
||||||
|
|
||||||
private PoiLegacyFilter filter;
|
private PoiLegacyFilter filter;
|
||||||
private AmenityAdapter amenityAdapter;
|
private AmenityAdapter amenityAdapter;
|
||||||
|
@ -782,7 +777,9 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DirectionDrawable draw = new DirectionDrawable(SearchPOIActivity.this, width, height,
|
DirectionDrawable draw = new DirectionDrawable(SearchPOIActivity.this, width, height,
|
||||||
R.drawable.ic_destination_arrow_white, R.color.color_distance);
|
R.drawable.ic_destination_arrow_white,
|
||||||
|
|
||||||
|
R.color.color_distance);
|
||||||
int screenOrientation = DashLocationFragment.getScreenOrientation(SearchPOIActivity.this);
|
int screenOrientation = DashLocationFragment.getScreenOrientation(SearchPOIActivity.this);
|
||||||
if (loc != null) {
|
if (loc != null) {
|
||||||
float a = heading != null ? heading : 0;
|
float a = heading != null ? heading : 0;
|
||||||
|
@ -799,8 +796,6 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
icon.setImageResource(RenderingIcons.getBigIconResourceId(st.getKeyName()));
|
icon.setImageResource(RenderingIcons.getBigIconResourceId(st.getKeyName()));
|
||||||
} else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) {
|
} else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) {
|
||||||
icon.setImageResource(RenderingIcons.getBigIconResourceId(st.getOsmTag() + "_" + st.getOsmValue()));
|
icon.setImageResource(RenderingIcons.getBigIconResourceId(st.getOsmTag() + "_" + st.getOsmValue()));
|
||||||
} else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) {
|
|
||||||
icon.setImageResource(RenderingIcons.getBigIconResourceId(st.getOsmValue()));
|
|
||||||
} else {
|
} else {
|
||||||
icon.setImageDrawable(null);
|
icon.setImageDrawable(null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -684,8 +684,6 @@ public class WaypointHelper {
|
||||||
} else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) {
|
} else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) {
|
||||||
return uiCtx.getResources().getDrawable(
|
return uiCtx.getResources().getDrawable(
|
||||||
RenderingIcons.getBigIconResourceId(st.getOsmTag() + "_" + st.getOsmValue()));
|
RenderingIcons.getBigIconResourceId(st.getOsmTag() + "_" + st.getOsmValue()));
|
||||||
} else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) {
|
|
||||||
return uiCtx.getResources().getDrawable(RenderingIcons.getBigIconResourceId(st.getOsmValue()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -50,6 +50,14 @@ public class DirectionDrawable extends Drawable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOpenedColor(int opened) {
|
public void setOpenedColor(int opened) {
|
||||||
|
if(arrowImage != null) {
|
||||||
|
IconsCache iconsCache = ((OsmandApplication) ctx.getApplicationContext()).getIconsCache();
|
||||||
|
if (opened == 0) {
|
||||||
|
arrowImage = iconsCache.getIcon(resourceId, R.color.color_ok);
|
||||||
|
} else if (opened == -1) {
|
||||||
|
arrowImage = iconsCache.getIcon(resourceId, R.color.color_warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (opened == 0) {
|
if (opened == 0) {
|
||||||
paintRouteDirection.setColor(ctx.getResources().getColor(R.color.color_ok));
|
paintRouteDirection.setColor(ctx.getResources().getColor(R.color.color_ok));
|
||||||
} else if (opened == -1) {
|
} else if (opened == -1) {
|
||||||
|
|
Loading…
Reference in a new issue