Button btnFirst = new Button(this);
btnFirst.setOnTouchListener(new OnTouchListener()
{
@Override
public boolean onTouch(View v, MotionEvent event)
{
Log.i("First Button","This is first button's onTouch()");
return false;
}
}));
Button btnSecond = new Button(this);
btnSecond.setOnTouchListener(new OnTouchListener()
{
@Override
public boolean onTouch(View v, MotionEvent event)
{
btnFirst.dispatchTouchEvent(event);
return false;
}
}));
No comments:
Post a Comment