Question

It is possible to capture different stylus events on Android 4.0 and above.

But there does not seem to be a way to change the pointer style to something other than the default, since I want to set a small image dynamically as pointer when the stylus hover event occurs.

I went through the Android motion event API documentation, but I did not find any information about this.

How can this be achieved?

Was it helpful?

Solution

I found a solution for Samsung devices.

After digging into SPen SDK sources, I found that it is very easy to change hover icon.

You need to use this function:

public boolean setSPenCustomHoverIcon(Context paramContext, View paramView, Drawable paramDrawable);

You just need to pass: application context, View and Drawable Icon.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top