Search code examples
google-glassgoogle-gdk

Could one use an animated gif as part of card.addImage(uri) in an immersion card on Glass?


I'm trying to use the following documented API:

https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/app/Card#addImage%28android.net.Uri%29

in a similar way to this post:

NullPointerException when calling Card.addImage(Uri)

but I'd like to use a an animated gif as the background for an immersion card instead.

Possible?


Solution

  • The layouts built by the Card class use Android's ImageView to represent their images, and the ImageView widget does not support animated GIFs. You would need to construct your own layout and manage the animation manually.