я м загрузки изображений из описания RSS с помощьюИспользование AsyncTask для загрузки изображений
String description2 = des.get(position).toString();
Spanned description = Html.fromHtml(description2, new ImageGetter() {
@Override
public Drawable getDrawable(String source) {
Drawable d = null;
try {
InputStream src = imageFetch(source);
d = Drawable.createFromStream(src, "src");
if(d != null){
d.setBounds(0,0,d.getIntrinsicWidth(),
d.getIntrinsicHeight());
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return d;
}
public InputStream imageFetch(String source)
throws MalformedURLException,IOException {
URL url = new URL(source);
Object o = url.getContent();
InputStream content = (InputStream)o;
// add delay here (see comment at the end)
return content;
}
},null);
Как я могу поместить их в AsyncTask, для того, чтобы получить прогресс бар, пока изображения не скачать? Благодаря!
Посмотрите на [Android HTML ImageGetter как AsyncTask] (http://stackoverflow.com/questions/7424512/Android-HTML-imagegetter-а-AsyncTask) – user370305