setOnTouchListener() is giving me an error

前端 未结 7 520
北恋
北恋 2021-01-27 18:25
button.setOnTouchListener(new OnTouchListener()
{
  public void onClick(View v)
  {
      Toast.makeText(MainActivity.this, \"YOUR TEXT\", 5000).show();
  }
});
<         


        
7条回答
  •  北恋
    北恋 (楼主)
    2021-01-27 19:15

    Check your code: http://developer.android.com/reference/android/view/View.OnTouchListener.html You should use method onTouch.

提交回复
热议问题