从阵列的成像图载入图片,并显示下一个或previous用鳍状肢

编程入门 行业动态 更新时间:2024-10-25 00:34:00
本文介绍了从阵列的成像图载入图片,并显示下一个或previous用鳍状肢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个静态数组。

private Integer[] mThumbIds = { R.drawable.sample_0, R.drawable.sample_1, R.drawable.sample_2, R.drawable.sample_3, R.drawable.sample_4, R.drawable.sample_5, R.drawable.sample_6, R.drawable.sample_7, R.drawable.sample_0 }

现在我有一个和鳍(或其他)显示了previous或下一张图片的帮助下,以显示图像视图中的一个这些图像。第一个问题,如何在图像视图加载这些图像。这将是对我好,如果你能提供一些示例code。谢谢你。

Now I have to show these images in image view one by one and with the help of flipper(or anything else) show the previous or next image. First question how to load these images in image view. It would be good for me if you can provide some sample code. Thank you.

推荐答案

您可以使用数组像这样显示图像。

you can display image using array like this way.

int id= mThumbIds[5]; youImageView.setBackgroundDrawable(getResources().getDrawable(id))

更多推荐

从阵列的成像图载入图片,并显示下一个或previous用鳍状肢

本文发布于:2023-10-04 03:45:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1467112.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:阵列   图片   用鳍状肢   previous

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!