calculate screen size in order to space imageviews in grid proportionally