two views ontouchlistener same area how to?

Posted by user553465 on Stack Overflow See other posts from Stack Overflow or by user553465
Published on 2010-12-24T17:49:02Z Indexed on 2010/12/24 17:54 UTC
Read the original article Hit count: 366

I have a two ImageView.

1.ImageView zomeImageMoveable : should zome in,out and moveable. 2.ImageView zomeImageFixed : show zome this is guide line.

i want this two views work same touch.

{
FrameLayout myFrmae = new FrameLayout(this.getContext());
 myFrame.addView(zomeImageMoveable);
 myFrame.addView(zomeImageFixed);
}

Case 1. below two ImageView have each listener ,but works only one.

Case 2. FrameLayout add OnTouchListener and forward. but it doesn't work

 myFrame.setOnTouchListener(new OnTouchListener() {
  @Override
  public boolean onTouch(View v, MotionEvent event) {
   zomeImageMoveable.onTouchEvent(event);
   zomeImageFixed.onTouchEvent(event);
   return false;
  }
 });

how do i have to do?

thanks for reading.

© Stack Overflow or respective owner

Related posts about android

Related posts about imageview