aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/cgeotrackable.java
diff options
context:
space:
mode:
authorbananeweizen <bananeweizen@gmx.de>2011-10-30 14:50:09 +0100
committerbananeweizen <bananeweizen@gmx.de>2011-10-30 14:50:09 +0100
commitd46438381be1e4bf4186e0a426ebed66655266b9 (patch)
treeb3aa7af3df4f33a7c9dda79148613db635144a33 /main/src/cgeo/geocaching/cgeotrackable.java
parent6c74f71960125b5fefc6fbeb4b3d510ae2f921e8 (diff)
downloadcgeo-d46438381be1e4bf4186e0a426ebed66655266b9.zip
cgeo-d46438381be1e4bf4186e0a426ebed66655266b9.tar.gz
cgeo-d46438381be1e4bf4186e0a426ebed66655266b9.tar.bz2
fix #731: OOM in images when downloading
Diffstat (limited to 'main/src/cgeo/geocaching/cgeotrackable.java')
-rw-r--r--main/src/cgeo/geocaching/cgeotrackable.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/cgeotrackable.java b/main/src/cgeo/geocaching/cgeotrackable.java
index 4037853..453be7b 100644
--- a/main/src/cgeo/geocaching/cgeotrackable.java
+++ b/main/src/cgeo/geocaching/cgeotrackable.java
@@ -1,6 +1,7 @@
package cgeo.geocaching;
import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.network.HtmlImage;
import org.apache.commons.lang3.StringUtils;
@@ -226,7 +227,7 @@ public class cgeotrackable extends AbstractActivity {
((LinearLayout) findViewById(R.id.goal_box)).setVisibility(View.VISIBLE);
TextView descView = (TextView) findViewById(R.id.goal);
descView.setVisibility(View.VISIBLE);
- descView.setText(Html.fromHtml(trackable.getGoal(), new cgHtmlImg(cgeotrackable.this, geocode, true, 0, false), null), TextView.BufferType.SPANNABLE);
+ descView.setText(Html.fromHtml(trackable.getGoal(), new HtmlImage(cgeotrackable.this, geocode, true, 0, false), null), TextView.BufferType.SPANNABLE);
descView.setMovementMethod(LinkMovementMethod.getInstance());
}
@@ -235,7 +236,7 @@ public class cgeotrackable extends AbstractActivity {
((LinearLayout) findViewById(R.id.details_box)).setVisibility(View.VISIBLE);
TextView descView = (TextView) findViewById(R.id.details);
descView.setVisibility(View.VISIBLE);
- descView.setText(Html.fromHtml(trackable.getDetails(), new cgHtmlImg(cgeotrackable.this, geocode, true, 0, false), null), TextView.BufferType.SPANNABLE);
+ descView.setText(Html.fromHtml(trackable.getDetails(), new HtmlImage(cgeotrackable.this, geocode, true, 0, false), null), TextView.BufferType.SPANNABLE);
descView.setMovementMethod(LinkMovementMethod.getInstance());
}
@@ -273,7 +274,7 @@ public class cgeotrackable extends AbstractActivity {
public void run() {
BitmapDrawable image = null;
try {
- cgHtmlImg imgGetter = new cgHtmlImg(cgeotrackable.this, geocode, true, 0, false);
+ HtmlImage imgGetter = new HtmlImage(cgeotrackable.this, geocode, true, 0, false);
image = imgGetter.getDrawable(trackable.getImage());
Message message = handler.obtainMessage(0, image);
@@ -520,7 +521,7 @@ public class cgeotrackable extends AbstractActivity {
});
}
- ((TextView) rowView.findViewById(R.id.log)).setText(Html.fromHtml(log.log, new cgHtmlImg(cgeotrackable.this, null, false, 0, false), null), TextView.BufferType.SPANNABLE);
+ ((TextView) rowView.findViewById(R.id.log)).setText(Html.fromHtml(log.log, new HtmlImage(cgeotrackable.this, null, false, 0, false), null), TextView.BufferType.SPANNABLE);
((TextView) rowView.findViewById(R.id.author)).setOnClickListener(new userActions());
listView.addView(rowView);
@@ -572,7 +573,7 @@ public class cgeotrackable extends AbstractActivity {
BitmapDrawable image = null;
try {
- cgHtmlImg imgGetter = new cgHtmlImg(cgeotrackable.this, trackable.getGeocode(), false, 0, false);
+ HtmlImage imgGetter = new HtmlImage(cgeotrackable.this, trackable.getGeocode(), false, 0, false);
image = imgGetter.getDrawable(url);
Message message = handler.obtainMessage(0, image);