0

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?

Jonas Czech
  • 12,018
  • 6
  • 44
  • 65
surender8388
  • 474
  • 3
  • 12
  • Which device are you using? Have you looked at the manufacturer APIs? – Morrison Chang Aug 29 '13 at 05:21
  • I want to have general solution. Should work for any android device which supports hover event using stylus. For Manufacturer APIs, samsung galaxy tab 10.1 I tried SPend SDK APIs (Available at Samsung Developer site), But couldn't get any way to customize for galaxy tab to add new pointer style. – surender8388 Aug 29 '13 at 05:56
  • thanks guys I got the answer. Will post soon. – surender8388 Aug 29 '13 at 09:55

1 Answers1

0

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.

Jonas Czech
  • 12,018
  • 6
  • 44
  • 65
surender8388
  • 474
  • 3
  • 12