0

I have two images(above, below) place on each other. I want to hide the part of the above image where user touchs. At the end above image will completely remove and below image completely become visible.

How will I achieve this thing in Android. I am really clueless. Please help

Zeeshan Mirza
  • 4,549
  • 3
  • 22
  • 32
  • Check out this one: http://stackoverflow.com/questions/8220354/android-touch-to-erase-portions-of-foreground-imageview-to-expose-background-v – lindatseng Aug 27 '13 at 18:07
  • Its just a hint type. It might help you. Add onTouchListener to you ImageView then get the x,y coordinates and use the makeRect method to show that part of the image. – arshu Aug 27 '13 at 18:08

1 Answers1

1

example:

button = (Button) findViewById(R.id.button);
leftButton.setOnClickListener(new Button.OnClickListener() {  
    public void onClick(View v)
        {
            image.setVisibility(View.INVISIBLE); //to set the image as invisible
            image.setVisibility(View.VISIBLE); // to set it back to visible
        }
     });

hope this will help you.

Wannabe
  • 727
  • 1
  • 6
  • 21