安卓:如何显示ImageSwitcher图片 [英] Android: how to show images in ImageSwitcher

查看:340
本文介绍了安卓:如何显示ImageSwitcher图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经包含在SD卡文件的数组:我想展现一个ImageSwitcher一个项目,但找不到SetImageBitmap但只有SetImageResource,但我还没有这些的res文件夹。
我该怎么办呢?

I have an array of files contained in the sdcard: i would like to show an item in a ImageSwitcher but could not find the SetImageBitmap but only SetImageResource, but i have not these in res folder. How can i do it?

推荐答案

使用低于code,而不是setImageBitmap。我认为你必须在阵列的文件。

use this below code instead of setImageBitmap. I think you have files in array.

imgSwitcher.setImageURI(Uri.fromFile(filename));

这篇关于安卓:如何显示ImageSwitcher图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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