I'm doing some examples with volley library for which there is so few docs/examples
public class MainActivity extends Activity {
private ImageView mImageView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mImageView=(ImageView) findViewById(R.id.imageView1);
RequestQueue queue = Volley.newRequestQueue(this);
ImageLoader imageLoader = new ImageLoader(queue,new BitmapLruCache());
imageLoader.get("http://s017.radikal.ru/i413/1209/e7/648aa22cb947.jpg", ImageLoader.getImageListener(mImageView, R.drawable.ic_launcher, R.drawable.ic_launcher));
}
This loads an Image from the url directly into ImageView. But what if I want to crop it before put it on an ImageView?
Can this ImageLoader place image to a Bitmap somehow?
Do you wanna this?
imageLoader.get(newsItem.getThumbUrl(), new ImageLoader.ImageListener() {
@Override
public void onResponse(ImageLoader.ImageContainer response, boolean isImmediate) {
}
@Override
public void onErrorResponse(VolleyError error) {
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With