img タグを含む html-content 文字列があります。私が使用する画像のURLを持つために:
Spanned htmlSpan = Html.fromHtml(item.message, imgGetter, null);
descriptionView.setText(htmlSpan);
Html.ImageGetter は、DrawablegetDrawable
オブジェクトを返すメソッドを実装する必要があります
Html.ImageGetter imgGetter = new Html.ImageGetter() {
public Drawable getDrawable(String source) {
aq.ajax(Cfg.SITE_URL+source, Drawable.class, new AjaxCallback<Drawable> (){
@Override
public void callback(String url, Drawable d, AjaxStatus status) {
//Something here
}
});
return result; // nothing for result now
}
};
私は助けが必要です。これを整理する方法は?
UPD: aq はaq = new AQuery(this);
https://code.google.com/p/android-query/wiki/AsyncAPIです