From ec8a3f1f0f7aa252fba6159654028df861c3fabd Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 5 Apr 2016 11:01:58 +0300 Subject: [PATCH] Update methods --- .../src/net/osmand/plus/base/BottomSheetDialogFragment.java | 1 + OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java | 6 +++--- .../net/osmand/plus/mapcontextmenu/BaseMenuController.java | 2 +- .../osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/base/BottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/base/BottomSheetDialogFragment.java index 72d5c545db..f002223a31 100644 --- a/OsmAnd/src/net/osmand/plus/base/BottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/BottomSheetDialogFragment.java @@ -27,6 +27,7 @@ public abstract class BottomSheetDialogFragment extends DialogFragment { int themeId = isLightTheme ? R.style.OsmandLightTheme_BottomSheet : R.style.OsmandDarkTheme_BottomSheet; final Dialog dialog = new Dialog(getActivity(), themeId); + dialog.setCanceledOnTouchOutside(true); dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE); dialog.getWindow().getAttributes().windowAnimations = R.style.Animations_PopUpMenu_Bottom; dialog.setCanceledOnTouchOutside(true); diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java index 46e0fa3dfd..84edd2ee4f 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java @@ -703,12 +703,12 @@ public class WaypointHelper { ApplicationMode appMode = app.getSettings().getApplicationMode(); return uiCtx.getResources().getDrawable(appMode.getResourceLocationDay()); } else { - return iconsCache.getIcon(R.drawable.list_startpoint, 0, 0f); + return iconsCache.getIcon(R.drawable.list_startpoint, 0); } } else if (((TargetPoint) point).intermediate) { - return iconsCache.getIcon(R.drawable.list_intermediate, 0, 0f); + return iconsCache.getIcon(R.drawable.list_intermediate, 0); } else { - return iconsCache.getIcon(R.drawable.list_destination, 0, 0f); + return iconsCache.getIcon(R.drawable.list_destination, 0); } } else if (type == FAVORITES || type == WAYPOINTS) { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/BaseMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/BaseMenuController.java index b05b674a15..cd9d59711b 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/BaseMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/BaseMenuController.java @@ -74,7 +74,7 @@ public abstract class BaseMenuController { protected Drawable getIconOrig(int iconId) { IconsCache iconsCache = getMapActivity().getMyApplication().getIconsCache(); - return iconsCache.getIcon(iconId, 0, 0f); + return iconsCache.getIcon(iconId, 0); } protected Drawable getIcon(int iconId) { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java index 32d45f3407..fa08e10e41 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java @@ -411,7 +411,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { ApplicationMode appMode = mapActivity.getMyApplication().getSettings().getApplicationMode(); fromIcon.setImageDrawable(mapActivity.getResources().getDrawable(appMode.getResourceLocationDay())); } else { - fromIcon.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getIcon(R.drawable.list_startpoint, 0, 0f)); + fromIcon.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getIcon(R.drawable.list_startpoint, 0)); } } @@ -475,7 +475,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { private Drawable getIconOrig(int iconId) { IconsCache iconsCache = mapActivity.getMyApplication().getIconsCache(); - return iconsCache.getIcon(iconId, 0, 0f); + return iconsCache.getIcon(iconId, 0); } private OnItemClickListener getOnFavoriteClickListener(final boolean target, final FavouritesAdapter favouritesAdapter,