Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Android の要素をタップダウン/アップ (2 つの異なるもの) するためのイベントはありますか? クリックは基本的に「上」をタップする (画面から指を離す) のと同じように見えますが、私が知る限り、実際には適切なタップダウン イベントはありません。
私は Touch イベントをいじっていますが、ジェスチャーを含め、指とオブジェクトの間の接触に対してトリガーされます。
.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN ) { //my action return true; } return false; } });
ACTION_UP の実行はまったく同じです