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.demo.resource; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.SurfaceHolder.Callback; import android.widget.LinearLayout; public class MoveAct extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout lLayout = new LinearLayout(getApplicationContext()); MyDraw mydraw = new MyDraw(getApplicationContext()); lLayout.addView(mydraw); setContentView(lLayout); } class MyDraw extends SurfaceView implements Callback { private MyThread myThread; private Bitmap bmp; private SurfaceHolder holder; private Paint paint; private int x = 50; private int y = 50; int newX = 50; int newY = 50; int diffX = newX - x; int diffY = newY - y; int incrX = -1; int incrY = -1; public MyDraw(Context context) { super(context); holder = getHolder(); holder.addCallback(this); paint = new Paint(); bmp = BitmapFactory.decodeResource(getResources(), R.drawable.spin); } public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { } public void surfaceCreated(SurfaceHolder holder) { myThread = new MyThread(holder, this); myThread.setFlag(true); myThread.start(); } public void surfaceDestroyed(SurfaceHolder holder) { } @Override public boolean onTouchEvent(MotionEvent event) { if(event.getAction() == MotionEvent.ACTION_DOWN) { newX = (int) event.getX(); newY = (int) event.getY(); diffX = newX - x; diffY = newY - y; } return true; } @Override protected void onDraw(Canvas canvas) { canvas.drawColor(Color.BLACK); super.onDraw(canvas); diffX = newX - x; diffY = newY - y; if(diffX < 0){ incrX = 1; } else if(diffX > 0) { incrX = 0; } else { incrX = -1; } if(diffY < 0){ incrY = 1; } else if(diffY > 0){ incrY = 0; } else { incrY = -1; } if(diffX != 0){ if(incrX == 0){ x++; } else if(incrX == 1){ x--; } } if(diffY != 0){ if(incrY == 0){ y++; } else if(incrY == 1){ y--; } } canvas.drawBitmap(bmp, x, y, paint); } } class MyThread extends Thread { boolean flag ; SurfaceHolder myHolder; MyDraw myDraw; public MyThread(SurfaceHolder holder , MyDraw drawMain) { myHolder = holder; myDraw = drawMain; } public void setFlag (boolean myFlag) { flag = myFlag; } public void run(){ Canvas canvas = null; while(flag) { try { canvas = myHolder.lockCanvas(null); myDraw.onDraw(canvas); } finally{ if(canvas != null){ myHolder.unlockCanvasAndPost(canvas); } } } } } }