An electronic device, comprising: a first housing including a first face, and a second face opposite the first face; a second housing including a third face, and a fourth face opposite the third face; a hinge connecting the first housing and the second housing, wherein the second housing folds about the hinge to face the first housing; a flexible display extending from the first face to the third face; a sub-display, wherein at least a part of the sub-display is visually exposed through the second face; a sensor circuit configured to sense an angle formed by the first housing and the second housing folding at the hinge; and a processor operatively connected to the flexible display, the sub-display, and the sensor circuit, wherein the processor is configured to: while an application is being executed, detect a physical state of the first housing and the second housing based on the angle sensed by the sensor circuit, and re-execute the currently executed application in response to sensing a resolution change event by detecting a change of the physical state, wherein the physical state includes a first state in which the first housing and the second housing are folded onto each other or a second state in which the first face of the first housing and the third face of the second housing face a same direction, wherein the processor is further configured to output an execution screen of the re-executed application through the sub-display in the first state and through the flexible display in the second state. a first housing including a first face, and a second face opposite the first face; a second housing including a third face, and a fourth face opposite the third face; a hinge connecting the first housing and the second housing, wherein the second housing folds about the hinge to face the first housing; a flexible display extending from the first face to the third face; a sub-display, wherein at least a part of the sub-display is visually exposed through the second face; a sensor circuit configured to sense an angle formed by the first housing and the second housing folding at the hinge; and a processor operatively connected to the flexible display, the sub-display, and the sensor circuit, wherein the processor is configured to: while an application is being executed, detect a physical state of the first housing and the second housing based on the angle sensed by the sensor circuit, and re-execute the currently executed application in response to sensing a resolution change event by detecting a change of the physical state, while an application is being executed, detect a physical state of the first housing and the second housing based on the angle sensed by the sensor circuit, and re-execute the currently executed application in response to sensing a resolution change event by detecting a change of the physical state, wherein the physical state includes a first state in which the first housing and the second housing are folded onto each other or a second state in which the first face of the first housing and the third face of the second housing face a same direction, wherein the processor is further configured to output an execution screen of the re-executed application through the sub-display in the first state and through the flexible display in the second state.