Closed MrRSquared closed 4 years ago
I am also noticing that if I attempt to utilize the touchHelper on an already established surfaceView, like so...
touchHelper.setup(view)
.setStrokeWidth(3.0f)
.setUseRawInput(true)
.setLimitRect(limit, exclude)
.openRawDrawing();
I get the following error...
Cannot resolve method 'setup' in 'TouchHelper'
Does anyone have any thoughts?
After trying to implement the scribble library for the past few days, I am having this issue with all the various examples.
I found the solution to this one...
If you look at the ScribbleMultipleScribbleViewActivity, you can see around line 52, it does this...
touchHelper = TouchHelper.create(getWindow().getDecorView().getRootView(), getRawInputCallback());
Which sets one input TouchHelper for the entire window.
From there, you can create new instances of the surfaceView.
initSurfaceView(surfaceView1);
initSurfaceView(surfaceView2);
Hello, Since the demos are not working, I tried to implement the scribble_touch_helper_stylus_demo on my own, but I keep getting the following error.
Caused by: java.lang.IllegalArgumentException: hostView should not be null!
Here is a copy of my main activity which is mostly just copied from the sample...