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 edu.elon.cs; import java.util.Random; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.view.View; // extends View so I can have onDraw(Canvas) take care of things public class Ball extends View { private int x = 0; private int y = 0; private int alpha = 0; private int red = 255; private int green = 255; private int blue = 255; private int radius = 0; private int maxRadius = 0; // this is the important one, you could change all the others boolean isDead = false; // logic in constructor randomizes color, size, alpha, and coordinates public Ball(Context context) { super(context); Random rand = new Random(); // QUESTION #4: how can I get screen height and width from Context? x = rand.nextInt(260) + 1; y = rand.nextInt(360) + 1; alpha = rand.nextInt(255) + 1; maxRadius = rand.nextInt(80) + 1; if (alpha < 50) { alpha += 50; } red = rand.nextInt(255) + 1; green = rand.nextInt(255) + 1; blue = rand.nextInt(255) + 1; } // if alpha is less than 0, flag this as dead so the thread will remove it @Override protected void onDraw(Canvas canvas) { if (alpha <= 0) { isDead = true; } else { Paint background = new Paint(); // QUESTION #5: how big is the performance hit for anti aliasing? background.setAntiAlias(true); background.setARGB(alpha, red, green, blue); canvas.drawCircle(x, y, radius, background); } } // getters and setters for my instance vars public int getAlpha() { return alpha; } public void setAlpha(int alpha) { this.alpha = alpha; } public int getMaxRadius() { return maxRadius; } public int getRadius() { return radius; } public void setRadius(int radius) { this.radius = radius; } public boolean isDead() { return isDead; } }