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.exercise.AndroidCompass; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Matrix; import android.graphics.Paint; import android.util.AttributeSet; import android.view.View; public class MyCompassView extends View { private float direction = 0; private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); private boolean firstDraw; private Bitmap arrow; private int xpos; private int ypos; public MyCompassView(Context context) { super(context); // TODO Auto-generated constructor stub init(); } public MyCompassView(Context context, AttributeSet attrs) { super(context, attrs); // TODO Auto-generated constructor stub init(); } public MyCompassView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); // TODO Auto-generated constructor stub init(); } private void init(){ paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth(3); paint.setColor(Color.RED); paint.setTextSize(30); arrow = BitmapFactory .decodeResource(getResources(), R.drawable.arrow); xpos = arrow.getWidth() / 2; ypos = arrow.getHeight() / 2; firstDraw = true; } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { // TODO Auto-generated method stub setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.getSize(heightMeasureSpec)); } @Override protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub int cxCompass = getMeasuredWidth()/2; int cyCompass = getMeasuredHeight()/2; float radiusCompass; if(cxCompass > cyCompass){ radiusCompass = (float) (cyCompass * 0.9); } else{ radiusCompass = (float) (cxCompass * 0.9); } //canvas.drawCircle(cxCompass, cyCompass, radiusCompass, paint); //canvas.drawRect(0, 0, getMeasuredWidth(), getMeasuredHeight(), paint); if(!firstDraw){ /*canvas.drawLine(cxCompass, cyCompass, (float)(cxCompass + radiusCompass * Math.sin((double)(-direction) * 3.14/180)), (float)(cyCompass - radiusCompass * Math.cos((double)(-direction) * 3.14/180)), paint);*/ Matrix transform = new Matrix(); transform.setTranslate(cxCompass-xpos, cyCompass-ypos); transform.preRotate(direction,xpos, ypos); canvas.drawBitmap(arrow, transform, null); //canvas.drawText(String.valueOf(direction), cxCompass, cyCompass, paint); } } public void updateDirection(float dir) { firstDraw = false; direction = dir; invalidate(); } }