Skip to content

Conversation

@ahstro
Copy link

@ahstro ahstro commented Jul 20, 2014

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.)

@zst123
Copy link
Owner

zst123 commented Jul 21, 2014

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

@ahstro
Copy link
Author

ahstro commented Jul 21, 2014

Okay, that makes it change as soon as the settings are changed. Thanks for the code snippet. :)

@ahstro
Copy link
Author

ahstro commented Jan 2, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants