Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Animated background like Timely alarm clock app

I've seen the Timely app and it let me hypnotized with their animated background, it has bubbles floating around and

Can you plase tellme how can I do that, I've tried AnimationDrawable and ValueAnimator with AnimatorSet but that seems diferent of the timely app used

like image 424
David Avatar asked Sep 19 '13 16:09

David


1 Answers

Perhaps a good way to go about looking into this is to ask how does Timely create these effects. I took a look at the APK (for educational purposes) and found this in the package ch.bitspin.timely.background:

public class BackgroundView extends FrameLayout
{
  private BackgroundGradientView a;
  private BackgroundBeamsDotsView b;
  private BackgroundCircleEffectView c;
  private BackgroundBubblesView d;

The base of the Timely animation effects are through the use of a custom View, which you can find a guide on the Android Developer website. Each of the above Views are hundreds of lines of code, but to summarize: they all utilize a background Thread that manipulates Bitmap, Paint, BitmapShader, and Canvas objects in the View's onDraw method.

I hope this helps!

like image 154
Tom Avatar answered Nov 11 '22 18:11

Tom