3

I want to use an animated GIF in an ImageDescriptor. I'm aware eclipse has other ways of animating gifs using manual threads that read the image as an input stream. However that won't work for the ImageDescriptor API as it takes a file as input, not a stream. The reason I want to use an ImageDescriptor is because the ActionBar API only accepts ImageDescriptors for creating buttons with image icons. So in short, is there away to add an animated GIF icon/button to an Eclipse's View's Action bar?

4

2 回答 2

1

I don't think there is a straight forward way. You need to use timers and animate the gif yourself. Eclipse platform itself does that in few places (Eg: the browser view animation when page is loading)

于 2014-10-21T18:45:12.683 回答
0

The ImageDescriptor can accept an url as input param:

ImageDescriptor id = Activator.getImageDescriptor("/icons/yourGif.gif");

Hope it works :-)

于 2013-03-30T03:26:41.057 回答