4

I don't mean make a gif into a background just a background that moves. Thanks in advance. Any help is appreciated.

Adrian Cid Almaguer
  • 7,815
  • 13
  • 41
  • 63
Sarju Thakkar
  • 73
  • 1
  • 2
  • 6

1 Answers1

2

GIFs do not work on the Android framework like people are used to. Instead of using GIFs, try the following to animate a background:

  1. Get a reference to the widget whose background you want to be animated. For example TextView tv;
  2. Remove content so that only the background is visible. tv.setText("")
  3. Set custom background to your view. tv.setBackground("Background here")
  4. Set an animation to your view tv.setAnimation(myAnimation)
  5. Animate your view tv.startAnimation();

And there you go. There are many examples and resources about animations in the official documentation.

Wander Nauta
  • 18,832
  • 1
  • 45
  • 62
Quark
  • 402
  • 4
  • 15