Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.os.Handler; import android.service.wallpaper.WallpaperService; import android.view.MotionEvent; import android.view.SurfaceHolder; public class LW1 extends WallpaperService { private final Handler mHandler = new Handler(); @Override public void onCreate() { super.onCreate(); } @Override public void onDestroy() { super.onDestroy(); } @Override public Engine onCreateEngine() { return new ParallaxEngine(); } class ParallaxEngine extends Engine { private float mOffset; private float mCenterX; private float mCenterY; private final Runnable mDrawParallax = new Runnable() { public void run() { drawBackgrounds(); } }; private boolean mVisible; @Override public void onCreate(SurfaceHolder surfaceHolder) { super.onCreate(surfaceHolder); // By default we don't get touch events, so enable them. setTouchEventsEnabled(true); } @Override public void onDestroy() { super.onDestroy(); mHandler.removeCallbacks(mDrawParallax); } @Override public void onVisibilityChanged(boolean visible) { mVisible = visible; if (visible) { drawBackgrounds(); } else { mHandler.removeCallbacks(mDrawParallax); } } @Override public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) { super.onSurfaceChanged(holder, format, width, height); // store the center of the surface. I'm sure there's a better way to center things? mCenterX = width/2.0f; mCenterY = height/2.0f; drawBackgrounds(); } @Override public void onSurfaceCreated(SurfaceHolder holder) { super.onSurfaceCreated(holder); } @Override public void onSurfaceDestroyed(SurfaceHolder holder) { super.onSurfaceDestroyed(holder); mVisible = false; mHandler.removeCallbacks(mDrawParallax); } @Override public void onOffsetsChanged(float xOffset, float yOffset, float xStep, float yStep, int xPixels, int yPixels) { mOffset = xOffset; drawBackgrounds(); } /* * Store the position of the touch event so we can use it for drawing later */ @Override public void onTouchEvent(MotionEvent event) { super.onTouchEvent(event); } /* * Draw one frame of the animation. This method gets called repeatedly * by posting a delayed Runnable. You can do any drawing you want in * here. */ void drawBackgrounds() { final SurfaceHolder holder = getSurfaceHolder(); Canvas c = null; try { c = holder.lockCanvas(); if (c != null) { // draw something drawParallax(c); } } finally { if (c != null) holder.unlockCanvasAndPost(c); } // Reschedule the next redraw mHandler.removeCallbacks(mDrawParallax); if (mVisible) { mHandler.postDelayed(mDrawParallax, 1000 / 25); } } /* * Draw three background images each scrolling at a different speed */ void drawParallax(Canvas c) { c.save(); Bitmap _back = BitmapFactory.decodeResource(getResources(), R.drawable.parallax_background_layer_back); Bitmap _mid = BitmapFactory.decodeResource(getResources(), R.drawable.parallax_background_layer_mid); Bitmap _front = BitmapFactory.decodeResource(getResources(), R.drawable.parallax_background_layer_front); //Centering the images, again I feel this is probably not the best way float backWidth = _back.getWidth()/2; float backHeight = _back.getHeight()/2; c.translate(mCenterX - backWidth, mCenterY - backHeight); //Set speed of each image float bspeed = (0.5f - mOffset) * 50.0f; float mspeed = (0.5f - mOffset) * 150.0f; float fspeed = (0.5f - mOffset) * 400.0f; c.drawBitmap(_back, bspeed, 0, null); c.drawBitmap(_mid, mspeed, 0, null); c.drawBitmap(_front, fspeed, 0, null); c.restore(); } } }