Created
November 18, 2009 13:05
-
-
Save koyachi/237826 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.buffr.Sketch20091118_02; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.content.Context; | |
import android.graphics.*; | |
import android.view.View; | |
public class Sketch20091118_02 extends Activity | |
{ | |
@Override | |
public void onCreate(Bundle savedInstanceState) | |
{ | |
super.onCreate(savedInstanceState); | |
setContentView(new _00B4F5(this)); | |
} | |
private static class _00B4F5 extends View { | |
private Paint myPaint = new Paint(); | |
private int color = 0x00B4F5; | |
public _00B4F5(Context context) { | |
super(context); | |
} | |
@Override | |
protected void onDraw(Canvas canvas) { | |
myPaint.setColor(0xFF000000 | color); | |
canvas.drawRect(0,0, canvas.getWidth(), canvas.getHeight(), myPaint); | |
color+=0x01; | |
invalidate(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment