Ontouch event of OnTouchListener gets called twice in android

后端 未结 3 1966
醉梦人生
醉梦人生 2020-12-24 10:03

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

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-24 10:57

    Or just use onClickListener:

            myButton.setOnClickListener(new Button.OnClickListener() {
                @Override
                public void onClick(View v) {
                    //do what you gotta do
                }
            });
    

提交回复
热议问题