Skip to content Skip to sidebar Skip to footer

Live Wallpaper With Images

(sorry for my Englih is not so good... hope you will understand me) My friend is a really good drawer. I would like to help him to be know as a good drawer by making him a live wal

Solution 1:

use this open source project to create nice live wallpaper for your friend

link it is read from phone gallery, you can edit it to read from folder in the project pr just use as it is.

or use this link for other live wallpaper project

Solution 2:

@Pozinux... I'm a new programmer. I came across this code you have hear. I'm trying to use the code in my project. But I can't get it to work. When I install it to the emulator it doesn't move through its frames. It only shows the last frame. How did you set this up? Or get this to work? Hears how I set it up in my project.

import android.graphics.Bitmap;

import android.graphics.BitmapFactory;

import android.graphics.Canvas;

import android.service.wallpaper.WallpaperService;

import android.view.SurfaceHolder;

publicclassWallpaperSerextendsWallpaperService {

publicvoidonCreate() 

{
    super.onCreate();
}

publicvoidonDestroy() 
{
    super.onDestroy();
}

public Engine onCreateEngine() 
{
    returnnewWallpaperSerEngine();
}

classWallpaperSerEngineextendsEngine 
{
    public Bitmap image1; 
    public Bitmap image2;
    public Bitmap image3;
    public Bitmap image4;
    public Bitmap image5;
    public Bitmap image6;
    public Bitmap image7;
    public Bitmap image8;
    public Bitmap image9;
    public Bitmap image10;
    public Bitmap image11;
    public Bitmap image12;
    public Bitmap image13;
    public Bitmap image14;
    public Bitmap image15;
    public Bitmap image16;
    public Bitmap image17;
    public Bitmap image18;
    public Bitmap image19;
    public Bitmap image20;

    WallpaperSerEngine() 
    {       
            image1 = BitmapFactory.decodeResource(getResources(), R.drawable.and1);
            image2 = BitmapFactory.decodeResource(getResources(), R.drawable.and2);       
            image3 = BitmapFactory.decodeResource(getResources(), R.drawable.and3); 
            image4 = BitmapFactory.decodeResource(getResources(), R.drawable.and4);
            image5 = BitmapFactory.decodeResource(getResources(), R.drawable.and5);
            image6 = BitmapFactory.decodeResource(getResources(), R.drawable.and6);
            image7 = BitmapFactory.decodeResource(getResources(), R.drawable.and7);
            image8 = BitmapFactory.decodeResource(getResources(), R.drawable.and8);
            image9 = BitmapFactory.decodeResource(getResources(), R.drawable.and9);
            image10 = BitmapFactory.decodeResource(getResources(), R.drawable.and10);
            image11 = BitmapFactory.decodeResource(getResources(), R.drawable.and11);
            image12 = BitmapFactory.decodeResource(getResources(), R.drawable.and12);
            image13 = BitmapFactory.decodeResource(getResources(), R.drawable.and13);
            image14 = BitmapFactory.decodeResource(getResources(), R.drawable.and14);
            image15 = BitmapFactory.decodeResource(getResources(), R.drawable.and15);
            image16 = BitmapFactory.decodeResource(getResources(), R.drawable.and16);
            image17 = BitmapFactory.decodeResource(getResources(), R.drawable.and17);
            image18 = BitmapFactory.decodeResource(getResources(), R.drawable.and18);
            image19 = BitmapFactory.decodeResource(getResources(), R.drawable.and19);
            image20 = BitmapFactory.decodeResource(getResources(), R.drawable.and20);
    }

    publicvoidonCreate(SurfaceHolder surfaceHolder) 
    {
        super.onCreate(surfaceHolder);
    }

    publicvoidonOffsetsChanged(float xOffset, float yOffset, float xStep, float yStep, int xPixels, int yPixels) 
    {
        drawFrame();

    }

    voiddrawFrame() 
    {
        finalSurfaceHolderholder= getSurfaceHolder();

        Canvasc=null;
        try 
        {
            c = holder.lockCanvas();
            if (c != null) 
            {              
                 c.drawBitmap(image1, 0, 0, null);
                 c.drawBitmap(image2, 0, 0, null);
                 c.drawBitmap(image3, 0, 0, null);
                 c.drawBitmap(image4, 0, 0, null);
                 c.drawBitmap(image5, 0, 0, null);
                 c.drawBitmap(image6, 0, 0, null);
                 c.drawBitmap(image7, 0, 0, null);
                 c.drawBitmap(image8, 0, 0, null);
                 c.drawBitmap(image9, 0, 0, null);
                 c.drawBitmap(image10, 0, 0, null);
                 c.drawBitmap(image11, 0, 0, null);
                 c.drawBitmap(image12, 0, 0, null);
                 c.drawBitmap(image13, 0, 0, null);
                 c.drawBitmap(image14, 0, 0, null);
                 c.drawBitmap(image15, 0, 0, null);
                 c.drawBitmap(image16, 0, 0, null);
                 c.drawBitmap(image17, 0, 0, null);
                 c.drawBitmap(image18, 0, 0, null);
                 c.drawBitmap(image19, 0, 0, null);
                 c.drawBitmap(image20, 0, 0, null);
            }
        } finally 
        {
            if (c != null) holder.unlockCanvasAndPost(c);
        }
    }
}
}

Post a Comment for "Live Wallpaper With Images"