How to make Android Live Wallpaper with LibGDx?

Viewed 5874

I want to make Android Live Wallpaper using LibGDx. I created the project following the instructions from this github link

but Eclipse show error:

"The method createListener() of typeMainActivity must override or implement a supertype method"

"The method createConfig() of type MainActivity must override or implement a supertype method"

and offers remove @Override annotation. Where is my mistake?

My code:

public class MainActivity extends AndroidLiveWallpaperService {

@Override
public ApplicationListener createListener() {
    return new Wallpaper();
}

@Override
public AndroidApplicationConfiguration createConfig () {
    return new AndroidApplicationConfiguration();
}

@Override
public void offsetChange (ApplicationListener listener, float xOffset, float yOffset, float xOffsetStep, float yOffsetStep,
    int xPixelOffset, int yPixelOffset) {
    Gdx.app.log("LiveWallpaper", "offset changed: " + xOffset + ", " + yOffset);
}

}

1 Answers
Related