To Examples
DrawStar Example
Goal
Create a
MyView
widget that draws a five-pointed star in its
onDraw
method.
Emulator Screen Shot
Directions
Create an Android project named DrawStar. Replace the default layout and activity files with these:
activity_main.xml
MainActivity.java
Add a new class named MyView to the project. Replace its code with:
MyView.java