We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey guys,
Does anyone have a working example of getting the pressure from stylus on Android. I'm looking at some sparse examples that look for the x and y but nothing on getPressure().
I saw an example that uses super to grab the events, but that goes way over my head. I would just love to capture the float value for my drawing app.
This is what I have so far and it returns nothing (or 0.0) ...
import android.view.MotionEvent;
public MotionEvent main_stylus;
float main_stylusPressure = 0.1;
@Override
public boolean onTouchEvent(MotionEvent event) {
main_stylusPressure = event.getPressure();
return true;
Answers
Narf, ignore this, good examples on the wiki (how could I have missed them) ..
-------> https://github.com/jeffThompson/ProcessingTeachingSketches/blob/master/Android/AdvancedTouchInteractions/AdvancedTouchInteractions.pde