I am using a PinchZoomModifier with my chart and I would like to execute some code when the user stops the zooming action (stops touching the screen). Is it possible to do? Are there any listeners I could attach to the PinchZoomModifier? I couldn’t find any in the docs.
- MIha Rozina asked 5 years ago
- last edited 5 years ago
- You must login to post comments
Hi Miha,
Well there is no callback but you can extend PinchZoomModifier and override its onScaleEnd() method:
class CustomPinchZoomModifier extends PinchZoomModifier {
@Override
public void onScaleEnd(ScaleGestureDetector detector) {
super.onScaleEnd(detector);
//TODO
}
}
Is this suitable for your needs?
Best regards,
Yura
- Yura Khariton answered 5 years ago
-
Yes that works, thank you. Is there anything similar for ZoomPanModifier, to know when the panning has ended?
-
Well you can override onUp() method which is called when touch gesture is ended
-
That would work on everything but the fling I guess?
- You must login to post comments
Please login first to submit.