¡@

Home 

2014/10/16 ¤W¤È 08:20:37

android Programming Glossary: nyan

Is it possible to set an animated gif file as live wallpaper in android?

http://stackoverflow.com/questions/9158310/is-it-possible-to-set-an-animated-gif-file-as-live-wallpaper-in-android

Then download a gif like this one Save that gif in res raw nyan.gif in your project. Create a live wallpaper service like shown.. InputStream is getResources .openRawResource R.raw.nyan if is null try mNyan Movie.decodeStream is mNyanDuration.. else throw new IOException Unable to open R.raw.nyan mWhen 1 mNyanNyan new Runnable public void run nyan @Override..

Is it possible to set an animated gif file as live wallpaper in android?

http://stackoverflow.com/questions/9158310/is-it-possible-to-set-an-animated-gif-file-as-live-wallpaper-in-android

create a project set up your manifest as a Live wallpaper. Then download a gif like this one Save that gif in res raw nyan.gif in your project. Create a live wallpaper service like shown in this example. public class NyanNyanService extends WallpaperService.. float mScaleY int mWhen long mStart NyanEngine throws IOException InputStream is getResources .openRawResource R.raw.nyan if is null try mNyan Movie.decodeStream is mNyanDuration mNyan.duration finally is.close else throw new IOException.. is mNyanDuration mNyan.duration finally is.close else throw new IOException Unable to open R.raw.nyan mWhen 1 mNyanNyan new Runnable public void run nyan @Override public void onDestroy super.onDestroy mNyanHandler.removeCallbacks..