How does the onDraw(Canvas) function of the View class work?
I need to implement an interactive graph in Android
For a start I am trying to see how this code works
There, in a class called LineChartView Which extends the user generated
class ChartView which extends the View class, there is an @overrideed
function called onDraw(Canvas canvas). How and when does this function get
called? the output of that code is a bunch of graphs on full screen, but
my interactive graph should only take up a part of the screen. Does the
onDraw() function get called automatically? If so, when? And what is the
size of the canvas? Is it always the full screen occupied by the current
activity's window?
No comments:
Post a Comment