Patent attributes
An electronic device is provided. The electronic device includes a rectangular display, at least one sensor, a processor electrically connected to the display and the at least one sensor, and a memory electrically connected to the processor, wherein the memory stores an application program including a first layout to be displayed when the display is substantially oriented in a horizontal orientation and a second layout is played when the display is substantially oriented in a vertical orientation, and the memory stores instructions which, when executed by the processor, causes the process to perform operations including displaying a window including one of the first and second layouts on a part of the display, detecting a change in the orientation of the electronic device by using the at least one sensor, rotating the window about 90 degrees based on the detected orientation change, and continuously maintaining one of the first and second layout in the window.