相关疑难解决方法(0)

如何在没有手指抬起的情况下检测滑动事件

我想在连续向上滑动/向下滑动事件时递增/递减数字.我可以使用GestureDetector和OnSwipeTouchListener实现简单的滑动事件.

然而,仅在滑动之后抬起手指时才感测到该滑动事件.因此,为了将数字增加到+5,我要在屏幕上进行5次单独向上滑动.

我想应用"滑块"之类的操作,以便在用户在屏幕上的任何位置向上或向下滑动时更改数字.(我不想使用'Slider'小部件).

这可能吗?

任何帮助都会非常感激.谢谢!

android

4
推荐指数
2
解决办法
2625
查看次数

在Android中连续"Action_DOWN"

@Override
public boolean onTouchEvent(MotionEvent event) {

if(event.getAction()==MotionEvent.ACTION_DOWN){
Log.d(VIEW_LOG_TAG, "Touching Down");
}
    if(event.getAction()==MotionEvent.ACTION_UP){
Log.d(VIEW_LOG_TAG, "Not Touching");
}
}
Run Code Online (Sandbox Code Playgroud)

我想要Log - >"Touching Down"应该连续显示在Log中,直到释放手指.

请帮忙

它真的很重要......我不能在没有这个的情况下继续进行ma项目.

android touch ontouchlistener

2
推荐指数
1
解决办法
2532
查看次数

标签 统计

android ×2

ontouchlistener ×1

touch ×1