Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 22.214.171.124 release ready!
Updated 2 December 2020
The most important use of custom view is its appearance . Android gives us a bunch of predefined Views, which we can use to build our apps.
But we can also create our own custom Views that can show custom drawings. This is especially useful for things like visualisations and games.
To create our own view, we create a subclass of the View class. The basics look like this:
In CustomView we create instance of Paint class
The most important step in drawing a custom view is to override the onDraw() method. The parameter onDraw() is a Canvas object that the view can use to draw itself. The Canvas class defines methods for drawing text, lines, bitmaps, and many other graphics primitives. You can use these methods in onDraw() to create your custom user interface (UI).
Before you can call any drawing methods, though, it’s necessary to create a Paint object. The next section discusses Paint in more detail.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.