Replace mouse cursor with a custom one.
自定义包括鼠标指针、触控点在内的各种图片资源。
Note: You can use Magisk + RRO for better experience.
See magisk
folder for more information.
(be aware of SELinux context, btw.)
Tested on: Android 10 (AOSP), Android 12 (MIUI 13)
System framework
(package name may be android
or system
or empty, see this) in module scope and activate the module/system/framework/framework-res.apk
to find out the resource ID of the cursor you want to replace.For MiPad users, install MaxMiPad and enable No Magic Pointer
.
If you have Windows-style .ani
cursors, you can use ani2png to convert them.
For example, use ls -a *.ani | xargs -L1 ani2png
to convert all .ani
files in current directory to .png
files.
From MIUI 13, Android 12.
Resource ID | Description | HotSpot |
---|---|---|
pointer_spot_touch | Touch point | (22, 22) |
pointer_arrow | Mouse Pointer (Arrow) | (5, 5) |
pointer_hand | Mouse Pointer (Hand, for example when hover on sth. clickable) | (9, 4) |
pointer_text | Mouse Pointer (Looks like | , for editing vertical text input) |
(12, 12) |
Please note that the images may be scaled. See Android 加载 drawable 中图片后自动缩放的原理 and Android drawable微技巧,你所不知道的drawable的那些细节 and getResources().getDisplayMetrics().density 的理解 for more informaton. In my case, 360x360
on a xhdpi
device becomes 135x135
(360 * (240 / 320) / 2 = 135
, not sure). You may need to manually adjust size & padding (border) to fit size & hotspot.
Mouse-related resource-id may have a _large
suffix, used when Accessibility
-> Large mouse pointer
(大号鼠标指针
) is enabled.
Home URL: https://github.com/Young-Lord/replaceCursor
Xposed Modules Repo URL: https://github.com/Xposed-Modules-Repo/moe.lyniko.replacecursor
Apache-2.0 License or MIT License are all OK.
.cur
and .ani
to Xcursor format, for Linux).png
, see pull requests for a better version)Currently, this module use SharedPreferences to store images, which is really shitty. Anyone is free to improve this module.
Also, I am too low to modify hotspot using Xposed. If you know how to do this, please tell me.
Also: Origin image resolution, disable scaling.
moe.lyniko.replacecursor