hullabaloon
1/18/2018 - 5:27 PM

Picasso

Picasso

Picasso.with(context)
                        .load(model.getNewsImage())
                        .placeholder(R.drawable.laliga)
                        .error(R.drawable.premier_league) // will be displayed if the image cannot be loaded
                        .into(holder.newsImage, new com.squareup.picasso.Callback() {
                            @Override
                            public void onSuccess() {
                                //Success image already loaded into the view
                            }

                            @Override
                            public void onError() {
                                //Error placeholder image already loaded into the view, do further handling of this situation here

                            }
                        });