Switch control display method and electronic device
AssigneeHonor Device Co., Ltd.
InventorJinzong HUANG
Life of this patent
Estimating the term…
Abstract
Embodiments of this application provide a switch control display method and an electronic device. A switch control includes a track and a first icon. When the first icon is located at a first position in the track, the switch control is in an ON state or an OFF state, and a shape of the second icon is a first shape. When the first icon is located at a second position in the track, the switch control is in the OFF state or the ON state, and the shape of the second icon is a second shape. In a process that the first icon slides in the track, the shape of the second icon changes linearly with a sliding offset of the first icon. In this way, visual effects that attract a user are added in terms of displaying the switch control, so that user experience can be improved.
Claims20
A switch control display method, applied to an electronic device, wherein a switch control comprises a track and a first icon, the first icon slides in the track, and a second icon is displayed on the first icon, the method comprising:
- in a process that the first icon slides in the track, enabling a shape of the second icon to change linearly with a sliding offset of the first icon;
- wherein when the first icon is located at a first position in the track, the switch control is in an ON state or an OFF state, and the shape of the second icon is a first shape;
- and
- wherein when the first icon is located at a second position in the track, the switch control is in the OFF state or the ON state, and the shape of the second icon is a second shape.
An electronic device, comprising:
- a memory configured to store a computer program;
- and
- a processor, wherein when the computer program is executed by the processor, the electronic device is enabled to:
- in a process that a first icon slides in a track, enable a shape of a second icon to change linearly with a sliding offset of the first icon, wherein a switch control comprises the track and the first icon, the first icon slides in the track, and the second icon is displayed on the first icon;
- wherein when the first icon is located at a first position in the track, the switch control is in an ON state or an OFF state, and a shape of the second icon is a first shape;
- and
- wherein when the first icon is located at a second position in the track, the switch control is in the OFF state or the ON state, and the shape of the second icon is a second shape.
A non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed by a processor, an electronic device is enabled to:
- in a process that a first icon slides in a track, enable a shape of a second icon to change linearly with a sliding offset of the first icon, wherein a switch control comprises the track and the first icon, the first icon slides in the track, and the second icon is displayed on the first icon;
- wherein when the first icon is located at a first position in the track, the switch control is in an ON state or an OFF state, and a shape of the second icon is a first shape;
- and
- wherein when the first icon is located at a second position in the track, the switch control is in the OFF state or the ON state, and the shape of the second icon is a second shape.
Dependencies are inferred from the claim text.