Khalid Habib
Khalid Habib

Reputation: 1156

How to add and overlap two images with X,Y cordinates

enter image description here

I want to add two images on an activity and then I want to relocate image-2 over image-1 Is there any possibility of using x-axis and y-axis or any other method to accomplish this task?

Updated Requirement : My requirement is that I will take some user input and based on those inputs, the image will move. As you can see the rows in the attached image, I want move pin image from one row to another as per inputs.

Upvotes: 1

Views: 161

Answers (1)

Harsha
Harsha

Reputation: 669

Easiest way to accomplish this is by Placing two images in the middle of frame layout, and in java after getting reference to those images, use the method bringtofront();

eg: ImageView image2=findviewbyID(R.id.image2);

image2.bringtofront();

Upvotes: 1

Related Questions