I am attempting to use Picasso to get three Bitmap
images from a URL
public void onCreate(Bundle savedInstanceState) {
super.onC
This is the same answer of Juan José Melero Gómez but with kotlin:
val imageBitmap = Picasso.get().load(post.path_image).into(object: Target {
override fun onPrepareLoad(placeHolderDrawable: Drawable?) {
Log.(TAG, "Getting ready to get the image");
//Here you should place a loading gif in the ImageView
//while image is being obtained.
}
override fun onBitmapFailed(e: Exception?, errorDrawable: Drawable?) {
Log.e(TAG, "The image was not obtained");
}
override fun onBitmapLoaded(bitmap: Bitmap?, from: Picasso.LoadedFrom?) {
Log.i(TAG, "The image was obtained correctly");
}
})