Lazy Loading on TextView compound
Hi,
I use many Text View compound and i need cache for image
Is it possible to create method like this ?
public void displayImage(String uri, TextView textView, int compoundPosition);
Hi, I won't add additional method because you can use following solution (e.g. for top compound):
ImageSize targetSize = new ImageSize(50, 50); // choose your size
loadImage(uri, targetSize, displayOptions, new SimpleImageLoadingListener() {
@Override
void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
Drawable topImage = new BitmapDrawable(loadedImage);
textView.setCompoundDrawablesWithIntrinsicBounds(null, topImage, null null);
}
});
Sorry but when i try your method u get an error like this : error: no suitable method found for displayImage(String,TextView, SimpleImageLoadingListener)
SimpleImageLoadingListener methods get a View but all methods in ImageLoader take only an ImageView then it can't work.
Sorry, use loadImage(...) method instead. I changed my previous post.
thanks
Hey I was using something like with with RoundedBitmapDisplayer.roundCorners() function. The new RoundedBitmapDisplayer do not have this helper method and I cannot use it because it does not support loading compound drawable.
What to do besides copy and pasting RoundedDrawable class? Maybe you can make it public?
I can.