How to make ListView width fit width of its cells

I have a ListView with custom cell factory. I compute maximum over cells minWidth and set it as minWidth for entire ListView. So the ListView constrained by other regions in the layout is shrunk ex...