我想用 2D api 做一些编程,我做了一些编码,但事情是输出不来。我的代码如下......
public class GraphicprojectActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.main);
setContentView(new MyView(this));
}
public class MyView extends View{
public MyView(Context c1){
super(c1);
}
}
public void onDraw(Canvas c2){
Path p1=new Path();
Paint p2= new Paint();
p2.setColor(Color.BLUE);
p1.addCircle(100, 100, 300, Direction.CW);
c2.drawPath(p1, p2);
}
}
logcat 中没有错误.. UR 帮助将不胜感激.....