Added flexible width and height for rotation (Landscape and Portrait).