I am creating an appliction in which a line gets generated between two points given at runtime. The problem that I see is that onTouch() is called twice for
onTouch()
Or just use onClickListener:
myButton.setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { //do what you gotta do } });