Android Open Source - Coloring-book Particle Field

From Project

Back to project page Coloring-book.


The source code is released under:

Apache License

If you think the Android project Coloring-book listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.plattysoft.leonids;
/*w  w  w  .  j a  v a 2 s . c  o  m*/
import java.util.ArrayList;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;

class ParticleField extends View {

  private ArrayList<Particle> mParticles;

  public ParticleField(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
  public ParticleField(Context context, AttributeSet attrs) {
    super(context, attrs);
  public ParticleField(Context context) {

  public void setParticles(ArrayList<Particle> particles) {
    mParticles = particles;
  protected void onDraw(Canvas canvas) {
    // Draw all the particles
    for (int i=0; i<mParticles.size(); i++) {

Java Source Code List