Back to project page AndroidGraph.
The source code is released under:
MIT License
If you think the Android project AndroidGraph listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.nimble.android_graph.Graph_Base; //from w ww . j a v a2 s . com import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; /** * Created by Mike on 25/07/2014. */ public abstract class GraphTouchEvent extends GraphRelateToScreen { GraphTouchEvent(Context context) { super(context); } public GraphTouchEvent(Context context, AttributeSet attr) { super(context, attr); } @Override public boolean onTouchEvent(MotionEvent motionEvent) { super.onTouchEvent(motionEvent); final int action = motionEvent.getAction(); switch (action) { case (MotionEvent.ACTION_MOVE): //moveEvent(motionEvent.getX(), motionEvent.getY()); break; case (MotionEvent.ACTION_UP): case (MotionEvent.ACTION_CANCEL): //cancelEvent(); break; } return true; } public void moveEvent(float x, float y) { } public void cancelEvent() { } }