XuiMod
XuiMod copied to clipboard
Added charge animation offset.
I loved the battery bar charging animation, but I got stressed out and distracted from how quickly it fired so I added the option to set an offset between animations. You might need to restart the system UI to see the difference. (Slowly de- and reactivating the charge animation works as well. It just needs start() to run. I'll try to make it cleaner once I fully figure out your code.)
Hi LumenTeun,
Thanks for your contribution. It seems that the code looks all good, but I haven't tested it yet.
One way to make the change apply on the go is by adding this code in updateSettings() inside BatteryBarView.java
int animOffset = mPref.getInt(Common.KEY_BATTERYBAR_ANIMATE_OFFSET,
Common.DEFAULT_BATTERYBAR_ANIMATE_OFFSET);
if (animOffset != ANIM_OFFSET) {
stop();
start();
ANIM_OFFSET = animOffset;
}
updateSettings() is called when any setting is changed, so it should work, although again, I haven't tested this. I'll try to test it once I find some time :p
Regards, zst123
Okay, that makes it change as soon as the settings are changed. Thanks for the code snippet. :)
Was there any reason not to pull this? I've got the Xposed Repo version installed on my phone and since there's no settings export, going between apks signed with different keys are a hastle.