I'm currently creating an app for SmartGlasses. It has an SDK that has some basic swipe Gesture and a custom Gesture Detector. I want to integrate this with my current code.
picture.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (touches < 4) {
v.setBackgroundResource(picList.get(touches));
touches++;
} else {
touches = 0;
loop = 1;
v.setBackgroundResource(picList.get(touches));
}
}
});
I'm using this to go in a loop of images.
The SDK, one of its functions, is SlideRight(). And also a onTouchEvent().
@Override
public boolean onTouchEvent(MotionEvent event) {
if (mGestureDetector.onTouchEvent(event)) {
return true;
}else {
return false;
}
}
---------
@Override
public boolean onSlideRight(boolean b) {
return false;
}
How can I call this function and get it to do at least a Log.d when swiping right?