I am working on charts. I can zoom in-out, dragging... Also I need longclick with dragging. if you need to explain, user can longClıck for see charts values, and user can dragging to left, right with longclick to see other values...Can Android sense it? I use achartengine library.
I can handle it now:) but I have another problem about..
longPressDetector = new GestureDetector(getContext(), new SimpleOnGestureListener() {
@Override
public void onLongPress(final MotionEvent e) {
int x = (int) e.getX();
final int y = (int) e.getY();
Toast.makeText(context, "long press", Toast.LENGTH_SHORT).show();
}
});
But the code doesn't that I understand. What should I do know??
@Override
public boolean onTouchEvent(MotionEvent event) {
if (longPressDetector.onTouchEvent(event)) {
return true; *** not work.
}
And can I drag with longClick this way?? Am I right way?
OK,I use this..