Android live wallpaper display image in drawable directory?

It is very easy))). Use something like this.

It is very easy))). Use something like this. In your Engine constructor use something like this Bitmap _background = BitmapFactory.

DecodeResource(getResources(), R.drawable. Test); and in your code use this private final int WEATHER_ANIMATION_INTERVAL = 1000; private final Handler _handler = new Handler(); private final Runnable weatherAnimation = new Runnable() { @Override public void run() { drawNextFrame(); } }; private void drawNextFrame() { final SurfaceHolder holder = getSurfaceHolder(); try { _canvas = holder.lockCanvas(); if (_canvas! = null) { drawAnimation(_canvas); } } finally { if (_canvas!

= null) holder. UnlockCanvasAndPost(_canvas); } // schedule the next frame _handler. RemoveCallbacks(weatherAnimation); if (_visible) { _handler.

PostDelayed(weatherAnimation, WEATHER_ANIMATION_INTERVAL); } return; } private void drawAnimation(Canvas c) { c. DrawBitmap(_background, _xOffset, _yOffset, _paint); _weather. Draw(c, _xOffset, _yOffset, _paint); } I hope this help you.

Thanks, this was helpful. – khan May 26 at 0:32 I have another question...I have a very wide picture, how come it only shows the part that fits on "current" screen. I see other live wallpaper where the picture scrolls as you move to a different workspace left or right...is that an easy option?

Thanks – khan May 26 at 0:34 public void onOffsetsChanged(float xOffset, float yOffset, float xStep, float yStep, int xPixels, int yPixels) { _xOffset = xPixels; _yOffset = yPixels; } – George May 26 at 5:23.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions