I want to put 8 image thumbs in one horizontal line, using the whole available width. The images are retrieved from a webservice which lets me specify the dimensions.
I'd suggest using this:
widthPx = getWindowManager().getDefaultDisplay().getWidth();