Draw images one above the other in android

I have some images that I want to stack on top of each other at random.

If it is possible to use a single ImageView or do I need to create several representations of images depending on the number of images?

+1
source share
2 answers

You do not fully specify what you want .... if you want the images to be placed in different positions (on the X and Y axis), which means that while viewing the photo from above you can see some other images, then you need to create different ImageViews or draw them on canvas (I think this is much better).

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

+3
source

LayerDrawable can meet your requirement, you can link to this post overlay two images on Android to install the image

+1
source

Source: https://habr.com/ru/post/907671/


All Articles