2011-04-07

2D drawing with Android

Every View object has an onDraw(Canvas c) method which is used to draw it. If you want to draw something yourself, you can create a subclass of the View class by extending View and you can override the onDraw(Canvas c) method to draw whatever you want. You draw onto the view using the Canvas object provided as a parameter to the onDraw() method.
A drawable is simply an object that can be drawn. This could be an still image (bmp, png, jpg,etc), icon, animated gif, etc. A drawable is usually created from an existing image you want to draw onto the screen.


Source: StackOverflow http://stackoverflow.com/questions/3320271/2d-drawing-with-android

No comments:

Post a Comment

Github CoPilot Alternatives (VSCode extensions)

https://www.tabnine.com/blog/github-copilot-alternatives/