在应用程序中更改鼠标光标图像? [英] Change mouse cursor image in application?

查看:256
本文介绍了在应用程序中更改鼠标光标图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够将鼠标与设备连接起来,并且运行正常,但是我想更改特定于应用程序的光标图像.我们该怎么做.有任何想法/建议吗?

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?

推荐答案

我认为无法针对每个应用程序进行.指针图标图像是框架的一部分,其样式属性是内部的.

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.

来自core/res/res/values/styles.xml:

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

并且来自core/res/res/values/themes.xml:

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

由于它们是内部的,因此您将无法以自己的样式覆盖它们.

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

这篇关于在应用程序中更改鼠标光标图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆