I'm trying to learn about drawing on the Android canvas. This code seems valid and compiles, but I don't get my shape.
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ShapeDrawable shape = new ShapeDrawable(new ArcShape(0, 250));
shape.setIntrinsicHeight(100);
shape.setIntrinsicWidth(100);
shape.getPaint().setColor(Color.RED);
Canvas canvas = new Canvas();
shape.draw(canvas);
}
}
I'm trying to follow the tutorial here: http://kirill-poletaev.blogspot.com/2013/02/android-beginner-tutorial-part-90-path.html