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.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.RectF; import android.graphics.Paint.Style; import android.view.View; public class PizzaView extends View{ // =========================================================== // Fields // =========================================================== protected final int ARCSTROKEWIDTH = 20; // Set startup-values protected int mySecondsPassed = 0; protected int mySecondsTotal = 0; // Our Painting-Device (Pen/Pencil/Brush/Whatever...) protected final Paint myArcSecondPaint = new Paint(); protected final Paint myArcMinutePaint = new Paint(); protected final Paint myCountDownTextPaint = new Paint(); protected final Paint myPizzaTimeTextPaint = new Paint(); // =========================================================== // Constructors // =========================================================== public PizzaView(Context context) { super(context); this.setBackgroundDrawable(getResources().getDrawable(R.drawable.pizza)); // Black text for the countdown this.myCountDownTextPaint.setARGB(150, 255, 0, 0); this.myCountDownTextPaint.setTextSize(150); this.myCountDownTextPaint.setFakeBoldText(true); // Orange text for the IT PIZZA TIME this.myPizzaTimeTextPaint.setARGB(255, 255, 60, 10); this.myPizzaTimeTextPaint.setTextSize(110); this.myPizzaTimeTextPaint.setFakeBoldText(true); // Our minute-arc-paint fill be a lookthrough-red. this.myArcMinutePaint.setARGB(150, 170, 0, 0); this.myArcMinutePaint.setAntiAlias(true); this.myArcMinutePaint.setStyle(Style.STROKE); this.myArcMinutePaint.setStrokeWidth(ARCSTROKEWIDTH); // Our minute-arc-paint fill be a less lookthrough-orange. this.myArcSecondPaint.setARGB(200, 255, 130, 20); this.myArcSecondPaint.setAntiAlias(true); this.myArcSecondPaint.setStyle(Style.STROKE); this.myArcSecondPaint.setStrokeWidth(ARCSTROKEWIDTH / 3); } // =========================================================== // onXYZ(...) - Methods // =========================================================== @Override protected void onDraw(Canvas canvas) { /* Calculate the time left, * until our pizza is finished. */ int secondsLeft = this.mySecondsTotal - this.mySecondsPassed; // Check if pizza is already done if(secondsLeft <= 0){ /* Draw the "! PIZZA !"-String * to the middle of the screen */ String itIsPizzaTime = getResources().getString( R.string.pizza_countdown_end); this.myPizzaTimeTextPaint.setTextSize(50); canvas.drawText(itIsPizzaTime, 10, (this.getHeight() / 2) + 30, this.myPizzaTimeTextPaint); }else{ // At least one second left float angleAmountMinutes = ((this.mySecondsPassed * 1.0f) / this.mySecondsTotal) * 360; float angleAmountSeconds = ((60 -secondsLeft % 60) * 1.0f) / 60 * 360; /* Calculate an Rectangle, * with some spacing to the edges */ RectF arcRect = new RectF(ARCSTROKEWIDTH / 2, ARCSTROKEWIDTH / 2, this.getWidth() - ARCSTROKEWIDTH / 2, this.getHeight() - ARCSTROKEWIDTH / 2); // Draw the Minutes-Arc into that rectangle canvas.drawArc(arcRect, -90, angleAmountMinutes, true, this.myArcMinutePaint); // Draw the Seconds-Arc into that rectangle canvas.drawArc(arcRect, -90, angleAmountSeconds, true, this.myArcSecondPaint); String timeDisplayString; if(secondsLeft > 60) // Show minutes timeDisplayString = "" + (secondsLeft / 60); else // Show seconds when less than a minute timeDisplayString = "" + secondsLeft; // Draw the remaining time. canvas.drawText(timeDisplayString, this.getWidth() / 2 - (30 * timeDisplayString.length()), this.getHeight()/ 2 + 30, this.myCountDownTextPaint); } } // =========================================================== // Getter & Setter // =========================================================== public void updateSecondsPassed(int someSeconds){ this.mySecondsPassed = someSeconds; } public void updateSecondsTotal(int totalSeconds){ this.mySecondsTotal = totalSeconds; } }