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)
// author: Robert Kanzamar package de.testing; import android.app.Activity; import android.os.Bundle; import android.view.*; import android.graphics.*; import android.content.*; public class Testing extends Activity { public static final int DIRECTION_RIGHT = 0, DIRECTION_LEFT = 1; private Panel main; private Bitmap scratch; private Canvas offscreen; public boolean start = true; private volatile boolean running = true; private int direction = DIRECTION_RIGHT; private int box = 10; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setOffscreenBitmap(); main = new Panel(this); setContentView(main,new ViewGroup.LayoutParams(320,480)); (new Thread(new AnimationLoop())).start(); } private void setOffscreenBitmap() { scratch = Bitmap.createBitmap(30,30,Bitmap.Config.ARGB_8888); offscreen = new Canvas(); offscreen.setBitmap(scratch); offscreen.drawColor(Color.RED); } private synchronized void updatePhysics() { if(box < 10) { direction = DIRECTION_RIGHT; } else if(box > 250) { direction = DIRECTION_LEFT; } if(direction == DIRECTION_RIGHT) { box += 10; } else { box -= 10; } } private synchronized void doDraw(Canvas canvas, Paint paint) { if(start) { canvas.drawColor(Color.BLACK); canvas.drawBitmap(scratch,10,10,paint); start = false; } else { canvas.save(); canvas.clipRect(box,8,box+32,40); canvas.drawColor(Color.RED); // canvas.drawBitmap(scratch,box,10,paint); canvas.restore(); } } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { if(running) { running = false; } else { running = true; } } else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) { finish(); } return true; } class Panel extends View { Paint paint; public Panel(Context context) { super(context); paint = new Paint(); } @Override protected void onDraw(Canvas canvas) { doDraw(canvas,paint); } } class AnimationLoop implements Runnable { public void run() { while(true) { while(running) { try { Thread.sleep(30); } catch(InterruptedException ex) {} updatePhysics(); main.postInvalidate(); } } } } }