如何在Android中连续显示来自单个arraylist的图像和视频? [英] How to display both images and videos from a single arraylist serially in android ?

查看:69
本文介绍了如何在Android中连续显示来自单个arraylist的图像和视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Android应用程序,其中的图像和视频都来自Rest WebService,我必须根据来自服务器的数据显示两者。我可以获取所有数据并将视频和图像网址存储在一个arraylist中。现在的问题是,当在arraylist中混合多个视频和多个图像时,我如何逐个显示所有这些图像。意味着它们是随机出现的?

I am developing an Android application in which both images and videos are coming from Rest WebService and I have to display both according to the data coming from server . I can fetch all the data and store both video and image urls in an arraylist . Now the problem is that when there is the mixture of More Than one Video And More than one image in arraylist how can i display all of them one by one . Means they are coming randomly ??

推荐答案

在这种情况下你知道即将到来的数据是图像还是视频?
In this case do you know whether the coming data is image or video?


这篇关于如何在Android中连续显示来自单个arraylist的图像和视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆