I set an onTouchListener on the XYPlot to hide my LinearLayout with buttons (let's call it controlPanel) so there would be more space for the graph, but once the controlPanel is gone, the plot fills the new available height and yet the graph stays at the same size. Please look at the screens and you'll know what my issue is. I tried calling plot.redraw() and plot.getGraph.refreshLayout() after changing controlPanel's visibility but to no effect. The graph resizes itself correctly when I make the controlPanel gone and change orientation and viceversa (of course I'm saving the controlPanel's state to keep the visibility status).


I set an onTouchListener on the XYPlot to hide my LinearLayout with buttons (let's call it controlPanel) so there would be more space for the graph, but once the controlPanel is gone, the plot fills the new available height and yet the graph stays at the same size. Please look at the screens and you'll know what my issue is. I tried calling plot.redraw() and plot.getGraph.refreshLayout() after changing controlPanel's visibility but to no effect. The graph resizes itself correctly when I make the controlPanel gone and change orientation and viceversa (of course I'm saving the controlPanel's state to keep the visibility status).

