Skip to content Skip to sidebar Skip to footer

Change Mouse Cursor Image In Application?

I able to connected mouse with my device and it's working perfectly, but I want to change cursor image for specific to app. How we can do it. Any idea/suggestion?

Solution 1:

I don't think it is possible on a per-app basis. The pointer icon images are part of the framework and their style attributes are internal.

From core/res/res/values/styles.xml:

<!-- Pointer styles --><stylename="Pointer"><itemname="android:pointerIconArrow">@android:drawable/pointer_arrow_icon</item><itemname="android:pointerIconSpotHover">@android:drawable/pointer_spot_hover_icon</item><itemname="android:pointerIconSpotTouch">@android:drawable/pointer_spot_touch_icon</item><itemname="android:pointerIconSpotAnchor">@android:drawable/pointer_spot_anchor_icon</item></style>

And from core/res/res/values/themes.xml:

<!-- Pointer style --><itemname="pointerStyle">@android:style/Pointer</item>

Since they are internal, you won't be able to override them in your own styles.

Post a Comment for "Change Mouse Cursor Image In Application?"