One or more non-transitory computer-readable storage media storing one or more computer programs including computer-executable instructions that, when executed by one or more processors of an electronic device individually or collectively, the electronic device comprising a first housing, a second housing, a camera, a flexible first display disposed on a first surface of the first housing and a first surface of the second housing, and a second display disposed on a second surface of the first housing opposite to the first surface of the first housing, cause the electronic device to perform operations, the operations comprising:
- in an unfolding state in which a first direction toward which a first display area of the first display faces corresponds to a second direction toward which a second display area of the first display faces, displaying, through the second display, a preview image obtained using the camera, the preview image not being displayed through the first display while displaying the preview image through the second display;
- receiving a first user input while the preview image is displayed through the second display and is not displayed through the first display;
- and
- in response to the first user input, displaying the preview image through the first display.