user31231234124 user31231234124 - 1 year ago 92
Android Question

Listener for onDraw method

Following is my onDraw method.

protected void onDraw(Canvas canvas) {

if(inte < listOfPoints.size()){
canvas.drawLine(listOfPoints.get(0).x, listOfPoints.get(0).y, listOfPoints.get(inte).x,listOfPoints.get(inte).y, paint);

if(inte < listOfPoints.size()){

Is it possible to get a callback once if the canvas has finished drawing the above point?

Answer Source

OnDraw is automatically called for situations that need to be drawn inside the view, so a Canvas is provided, so it will be called as long as the list size.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download