Patent attributes
An electronic device and a method of controlling the electronic device are provided. The electronic device includes a housing, a roll at least partially contained in the housing, a display configured to be rolled on the roll, the display including a display area having a size that changes according to a rotation of the roll, and the display being configured to display a screen including at least one element in the display area, a sensor configured to sense the rotation of the roll, and a processor electrically connected to the display and the sensor. In response to a size of the display area being changed according to the rotation of the roll, the processor is configured to change at least one of a size and a layout of an element included in the screen according to the size of the display area.