문제

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