rzhou1999 / woosticker

Image/sticker keyboard for Android. Download on Releases page.
MIT License
17 stars 5 forks source link

Add APNG support + partial clean-up #14

Closed FredHappyface closed 3 years ago

FredHappyface commented 3 years ago

This pull request adds APNG support, adds a bit of documentation (though this is still WIP) and some cleanup

FredHappyface commented 3 years ago

I also noted significant performance issues with animating stickers in the keyboard so have disabled these animation to dramatically improve performance (30% to about 2% on a Nokia 8 Sirocco)

rzhou1999 commented 3 years ago

Appreciate the PR as always-- I see no issues with APNG support, but I'm perhaps a little hesitant to disable animation wholesale (I sort of modeled this app after sticker implementations in gboard, wechat, signal, etc. and they usually have animated icons). What performance metrics are you using for this/how many animated stickers do you use? I have around 40+ gifs per directory and I haven't really seen much in terms of memory/battery usage. Maybe as a toggle?

FredHappyface commented 3 years ago

I was using the Android profiler. The stickers animate once sent but don't animate in gboard with usticker either. Still I have no issue adding this as a toggle but think it should be disabled by default as it was using 2x the resources of every other app in my system. Can drop a screenshot if you would find that helpful?

FredHappyface commented 3 years ago

With glide-animation

image

Without

image

Considering that this is a 2 year old high end device I wouldn't expect a sticker board to use such a significant amount of CPU

In this second test gifs were running fine so it seems to be some issue with glide and webp

I'll look at adding a toggle to enable glide animations (webp and apng)

FredHappyface commented 3 years ago

I've added said toggle for those that want/ need it

I've also added a bit of padding to the widgets in the main activity as I was finding that I was mis-tapping a lot - hope that's ok

Thanks for the review and I hope these changes address the issues raised

rzhou1999 commented 3 years ago

Semester is over and education is graduated, so I can finally get back to clearing some of these PRs and issues. LGTM-- thanks as always~