An electronic device, comprising: a housing defining a plurality of positioning slots; a screen, received in the housing; the electronic device being characterized by comprising: a screen protector connected to the housing and capable of moving between a stretchable state and a retractable state, so that when the screen protector is in the retractable state, the screen protector is leveled with or below the screen, and when the screen protector is in the stretchable state, the screen protector is above the screen, wherein the screen protector is presented as a frame being made in one piece and surrounding the screen, a plurality of positioning pins are arranged on the screen protector, each of the plurality of positioning pins has an extending direction perpendicular to the screen and is engaged in a corresponding positioning slot, the screen protector is adapted to stretch and retract along a direction perpendicular to the screen under the guide of the plurality of positioning pins; a drive assembly, comprising a first magnetic component and a second magnetic component arranged opposite to the first magnetic component, wherein the first magnetic component being received in the housing, the second magnetic component being received in the screen protector, the drive assembly being configured to drive the screen protector to move between the stretchable state and the retractable state by magnetic force between the first magnetic component and the second magnetic component; and a controller, received in the housing and electrically connected with a sensor, the controller being configured to control the screen protector to move between the retractable state and the stretchable state in response to an output of the sensor. a housing defining a plurality of positioning slots; a screen, received in the housing; the electronic device being characterized by comprising: a screen protector connected to the housing and capable of moving between a stretchable state and a retractable state, so that when the screen protector is in the retractable state, the screen protector is leveled with or below the screen, and when the screen protector is in the stretchable state, the screen protector is above the screen, wherein the screen protector is presented as a frame being made in one piece and surrounding the screen, a plurality of positioning pins are arranged on the screen protector, each of the plurality of positioning pins has an extending direction perpendicular to the screen and is engaged in a corresponding positioning slot, the screen protector is adapted to stretch and retract along a direction perpendicular to the screen under the guide of the plurality of positioning pins; a drive assembly, comprising a first magnetic component and a second magnetic component arranged opposite to the first magnetic component, wherein the first magnetic component being received in the housing, the second magnetic component being received in the screen protector, the drive assembly being configured to drive the screen protector to move between the stretchable state and the retractable state by magnetic force between the first magnetic component and the second magnetic component; and a controller, received in the housing and electrically connected with a sensor, the controller being configured to control the screen protector to move between the retractable state and the stretchable state in response to an output of the sensor. a screen protector connected to the housing and capable of moving between a stretchable state and a retractable state, so that when the screen protector is in the retractable state, the screen protector is leveled with or below the screen, and when the screen protector is in the stretchable state, the screen protector is above the screen, wherein the screen protector is presented as a frame being made in one piece and surrounding the screen, a plurality of positioning pins are arranged on the screen protector, each of the plurality of positioning pins has an extending direction perpendicular to the screen and is engaged in a corresponding positioning slot, the screen protector is adapted to stretch and retract along a direction perpendicular to the screen under the guide of the plurality of positioning pins; a drive assembly, comprising a first magnetic component and a second magnetic component arranged opposite to the first magnetic component, wherein the first magnetic component being received in the housing, the second magnetic component being received in the screen protector, the drive assembly being configured to drive the screen protector to move between the stretchable state and the retractable state by magnetic force between the first magnetic component and the second magnetic component; and a controller, received in the housing and electrically connected with a sensor, the controller being configured to control the screen protector to move between the retractable state and the stretchable state in response to an output of the sensor.