How can load images from an url with ion ? Image should be a bitmap.
Example: Bitmap image=Ion.with(this).load('url')
How can I achive this ?
Library:https://github.com/koush/ion
How can load images from an url with ion ? Image should be a bitmap.
Example: Bitmap image=Ion.with(this).load('url')
How can I achive this ?
Library:https://github.com/koush/ion
You should probably do it asynchronously. Here is an example:
Ion.with(this).load("url").withBitmap().asBitmap()
.setCallback(new FutureCallback<Bitmap>() {
@Override
public void onCompleted(Exception e, Bitmap result) {
// do something with your bitmap
}
});
It can also be loaded synchronously if needed. For example:
Bitmap image = Ion.with(this)
.load("url")
.withBitmap()
.asBitmap()
.get();