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)
package com.Waldev.Game3; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.os.Bundle; import android.view.Display; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.Window; import android.view.WindowManager; public class superSpecialAwesome extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { final Window win = getWindow(); super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); win.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(new panel(this)); } class panel extends SurfaceView implements SurfaceHolder.Callback{ //same as game engine I guess private awesomeThread thread; private int checkState = 0; private Bitmap bG; private int bGHeight, bGWidth; private int canvasHeight, canvasWidth; private final Paint paint = new Paint(); private final Rect rectBitmap = new Rect(); private final Rect rect = new Rect(); private Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); //private int width = display.getWidth(); //private int height = display.getHeight(); private int changeOfX = 0; private int changeOfY = 0; public panel(Context context) { super(context); bG = BitmapFactory.decodeResource(getResources(), R.drawable.background); bGWidth = 0; bGHeight = 0; canvasWidth = 0; canvasHeight = 0; getHolder().addCallback(this); thread = new awesomeThread(getHolder(), this); setFocusable(true); } public panel(Context context, int iconId) { super(context); init(BitmapFactory.decodeResource(context.getResources(), iconId) ); } public panel(Context context, Bitmap bitmap){ super(context); init(bitmap); } public void recycle(){ bG.recycle(); } protected void init(Bitmap bitmap){ if(bitmap!=null){ bG = bitmap; bGWidth = bG.getWidth(); bGHeight = bG.getHeight(); } } public void setCanvasSize(int width, int height) { canvasWidth = width; canvasHeight = height; rectBitmap.left = 0; rectBitmap.top = 0; if(bGWidth>width){ rectBitmap.right = width; rect.left = 0; rect.right = width; } else { rectBitmap.right = bGWidth; rect.left = (width-bGWidth)/2; rect.right = rect.left+bGWidth; } if(bGHeight>height){ rectBitmap.bottom = height; rect.top = 0; rect.bottom = height; } else { rectBitmap.bottom = bGHeight; rect.top = (height-bGHeight)/2; rect.bottom = rect.top+bGHeight; } } @Override public void onDraw(Canvas canvas){ if(canvasHeight != display.getHeight()){ setCanvasSize(display.getWidth(), display.getHeight()); } canvas.drawBitmap(bG, rectBitmap, rect, paint); } public boolean onTouchEvent(MotionEvent event){ int x = (int) event.getX(); int y = (int) event.getY(); int action = event.getAction(); switch(action){ case MotionEvent.ACTION_DOWN: changeOfX = x; changeOfY = y; break; case MotionEvent.ACTION_MOVE: rectBitmap.left += (changeOfX-x); if(rectBitmap.left<0) rectBitmap.left=0; else if (rectBitmap.left>bGWidth-canvasWidth) rectBitmap.left=bGWidth-canvasWidth; rectBitmap.right = rectBitmap.left + canvasWidth; rectBitmap.top += (changeOfY-y); if(rectBitmap.top<0) rectBitmap.top=0; else if (rectBitmap.top>bGHeight-canvasHeight) rectBitmap.top=bGHeight-canvasHeight; rectBitmap.bottom = rectBitmap.top + canvasHeight; changeOfX = x; changeOfY = y; invalidate(); break; } return true; } @Override public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) { // TODO Auto-generated method stub } public void surfaceCreated(SurfaceHolder holder) { thread.setRunning(true); thread.start(); } @Override public void surfaceDestroyed(SurfaceHolder holder) { // simply copied from sample application LunarLander: // we have to tell thread to shut down & wait for it to finish, or else // it might touch the Surface after we return and explode boolean retry = true; thread.setRunning(false); while (retry) { try { thread.join(); retry = false; } catch (InterruptedException e) { // we will try it again and again... } } } } }