I need to add behavior to my program related to the user panning / zooming the GraphView. I am attempting to register for motion events to be notified of this, so I can do something as the user is manipulating the graph via touch.
I have tried overriding onTouchEvent and implementing OnTouchLIstener in a subclass of LineGraph. I have also tried doing this in the Fragment / View in which I am putting the GraphView. However, my methods are never called, but the graph allows for panning / zooming as before.
e.g.:
public CustomLineGraphView(Context context, String title) {
super(context, title);
this.setOnTouchListener(this);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
Log.w("clg", "onTouchEvent()");
return true;
}
@Override
public boolean onTouch(View v, MotionEvent event) {
Log.w("clg", "onTouch()");
return false;
}