在Android中互相绘制图像 [英] Draw images on top of each other in android

查看:85
本文介绍了在Android中互相绘制图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想随机排列一些图像.

I have some images that I want to put on top of each other on random order.

如果可以使用一个ImageView还是我需要根据图像数量创建多个图像视图?

If it possible using one ImageView or do I need to create multiple image views based on number of images?

推荐答案

您没有完全指定所需的内容.如果要将图像放置在不同的位置(在X和Y轴上),这意味着在顶部观看照片时,您可以看到其他图像的一部分,然后您必须创建不同的ImageViews或将其绘制在画布上(我认为这样会更好).

You don't completely specify what you want.... if you want the images to be placed in different positions (in the X and Y axis), meaning that while watching the photo on the top you can see part of the other images, then you have to create different ImageViews, or drawing them on a canvas (I think this one is much better).

如果图像只是一个在另一个之上(将一个隐藏在底部),则只需使用一个ImageView.

If the images are just one on top of the other (hiding the one on the bottom), you just have to use one ImageView.

这篇关于在Android中互相绘制图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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