我正在开发一个 Android 应用程序,它应该在RecyclerView
. 然后一个新的活动将播放所选缩略图的视频。如何设置com.vimeo.networking.model.Picture
为安卓ImageView
?
我的代码:
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) {
}
});
}
setImageBitmap()
和setImageDrawable()
投掷_
java.lang.ClassCastException