I am developing an Android app which should display a list of video thumbnails in RecyclerView
. A new activity will then play the video for selected thumbnail.
How do I set com.vimeo.networking.model.Picture
to Android ImageView
?
My code:
mVimeoClient.fetchNetworkContent(VIDEO_URI, new ModelCallback<VideoList>(VideoList.class) {
@Override
public void success(VideoList videoList) {
ArrayList<Video> videoArrayList = videoList.data;
Video video = videoArrayList.get(0);
ArrayList<com.vimeo.networking.model.Picture> arrayListPics = video.pictures.sizes;
// imageView.setImageDrawable((Drawable) pictureAL.get(0));
imageView.setImageBitmap( (Bitmap) arrayListPics.get(0));
}
@Override
public void failure(VimeoError error) {
}
});
}
The setImageBitmap()
And setImageDrawable()
throws
java.lang.ClassCastException