me gustaría saber como hacer que una linea se oculte al mismo tiempo que un panel, ya que por lo regular una linea que se dibuja no he podido borrarla por lo cual si consigo hacerla que pertenezca al panel se ocultara y se mostrara cuando llame al panel.
You should draw the line onto the Panel and not onto the Activity.
You should read the Beginner's Guide chapter 15 Graphics / Drawing there are explained examples (sorry only in english).