From 1599db1f57070f57022ad233cd27fa9a4218a9b6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Jun 2014 17:34:32 +0300 Subject: [PATCH] added some comments --- OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java b/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java index a0f6c7f09b..6edf928361 100644 --- a/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java +++ b/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java @@ -114,6 +114,7 @@ public class TourViewActivity extends SherlockFragmentActivity { protected void onResume() { super.onResume(); + //this flag needed to start indexing tours is user downloaded some and returned to activity if (afterDownload){ if (customization.getTourInformations().isEmpty()){ customization.onIndexingFiles(IProgress.EMPTY_PROGRESS,new LinkedHashMap()); @@ -176,6 +177,7 @@ public class TourViewActivity extends SherlockFragmentActivity { public Drawable getDrawable(String s) { Bitmap file = customization.getSelectedTour().getImageBitmapFromPath(s); Drawable bmp = new BitmapDrawable(getResources(),file); + //if image is thicker than screen - it may cause some problems, so we need to scale it int imagewidth = bmp.getIntrinsicWidth(); if (size.x-1 > imagewidth) { bmp.setBounds(0,0, bmp.getIntrinsicWidth(), bmp.getIntrinsicHeight());