-1

I'm using Android Studio to make an app where you can create your own animal, and I want to know how I can layer pictures on clicking a button, if it can be done. For example, suppose I want to create a teddy bear- I will first click a button to display the bear's plain body, then clicking another button should layer a transparent image of the eyes over the same body (and so on for the nose, mouth, clothes, etc.) I have attached two images as examples of which pictures should appear one over the other when their respective buttons are clicked.

IMAGE 1: This is the body of the bear that will appear when I click the button that says "body"

IMAGE 2: A transparent image of the eyes, dimensions same as the previous image. On clicking the button "eyes" this image should be overlayed onto the previous one

This is the body of the bear that will appear when I click a button that says "body" A transparent image of the eyes, dimensions same as the previous pic. On clicking the button "eyes" this image should be overlayed onto the previous one

Community
  • 1
  • 1

1 Answers1

0

There are many ways of doing it, but I assume you know about OpenGL. That is the standard graphics renderer. With it you can layer as many images as you want.

For instance, you can load the images into the sampler and click-by-click you render the collection of images (given the positioning is taken care of).

Armen Avetisyan
  • 1,140
  • 10
  • 29