Skip to content

Instantly share code, notes, and snippets.

@agiletalk
Created April 27, 2011 03:04
Show Gist options
  • Save agiletalk/943646 to your computer and use it in GitHub Desktop.
Save agiletalk/943646 to your computer and use it in GitHub Desktop.
[예제] 간단한 커스텀 위젯
public class CustomView extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MyView vw = new MyView(this);
setContentView(vw);
}
protected class MyView extends View {
public MyView(Context context) {
super(context);
}
public void onDraw(Canvas canvas) {
Paint Pnt = new Paint();
Pnt.setColor(Color.BLUE);
canvas.drawColor(Color.WHITE);
canvas.drawCircle(100, 100, 80, Pnt);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment