Back to project page libgdx-lwp-template.
The source code is released under:
Copyright (c) 2013, madpew All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redis...
If you think the Android project libgdx-lwp-template listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.example.lwp.template; /*www . j a v a 2 s. c o m*/ import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; import com.badlogic.gdx.backends.android.AndroidLiveWallpaperService; import com.badlogic.gdx.backends.android.AndroidWallpaperListener; public class TemplateLiveWallpaper extends AndroidLiveWallpaperService { @Override public void onCreateApplication(){ super.onCreateApplication(); AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration(); cfg.useGL20 = false; initialize(new TemplateLiveWallpaperListener(), cfg); } public static class TemplateLiveWallpaperListener extends TemplateMain implements AndroidWallpaperListener { public TemplateLiveWallpaperListener(){ super(); this.canScroll = true; } @Override public void offsetChange (float xOffset, float yOffset, float xOffsetStep, float yOffsetStep, int xPixelOffset, int yPixelOffset) { this.xOffset = xOffset; this.yOffset = yOffset; this.xOffsetStep = xOffsetStep; this.yOffsetStep = yOffsetStep; this.xPixelOffset = xPixelOffset; this.yPixelOffset = yPixelOffset; } @Override public void previewStateChange (boolean isPreview) { this.setPreview(isPreview); } } }