victordiaz / PHONK

PHONK is a coding playground for new and old Android devices
https://phonk.app
GNU General Public License v3.0
461 stars 26 forks source link

Uncomfortably slow animation for new views #34

Closed luobogao closed 4 years ago

luobogao commented 4 years ago

This duration + delay timing is uncomfortably slow for some purposes, like when user is expecting a fast UI update with new buttons and text. Would appreciate some way to adjust these values.

https://github.com/victordiaz/PHONK/blob/d7bb34f68d8a15baf17c392fc6c09b5f711531da/phonk_apprunner/src/main/java/io/phonk/runner/apprunner/api/PViewsArea.java#L162

victordiaz commented 4 years ago

Hi @wottomgauss

I see your point I'm adding some way to easily customize the main theme. I can add a property to disable the animations if that works for you. It could be something like

ui.theme({
  animations: false
})

If more people find it uncomfortable then maybe it could be just turned off by default

luobogao commented 4 years ago

Thank you! Absolutely love the app so far, please keep up the good work

victordiaz commented 4 years ago

@wottomgauss

I removed the animation and it looks good! So I'll remove the animation by default. It will be possible to reenable it with the animationOnViewAdd property when setting a theme. This is an example:

ui.setTheme({
  background: '#000055',
  primary: '#FF0000',
  secondary: '#00FF00',
  textPrimary: '#FFFF00',
  animationOnViewAdd: true
})
victordiaz commented 4 years ago

Just uploaded APKs in Github and pushed to Google Play (it will take a bit to be online). Have a look and let me know if it has the desired behavior now. It's version 1.2.5

luobogao commented 4 years ago

Yes this is working perfectly now, many thanks!