Вопрос

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?

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top