Display method and electronic device
Disclosed are a display method and an electronic device. In addition to displaying a clock dial in a clock card interface, an electronic device may also display an icon related to prompt information. A prompt time of the prompt information is within a preset time period from a current time, and the icon is displayed at a position related to the prompt time on the clock dial. In this way, information displayed on the clock card is richer, so that a user can view more information on the clock card, thereby improving use experience of the user.
1 . An electronic device, comprising:
one or more processors; and
a memory coupled to the one or more processors, wherein the memory is configured to store instructions that, when executed by the one or more processors, cause the electronic device to:
display a first interface,
wherein a first clock card is displayed in the first interface, a clock dial and a first icon are displayed in an interface of the first clock card, and the first icon is related to first prompt information, and
wherein the first icon is displayed at a position related to a prompt time on the clock dial and the prompt time is a time point corresponding to the first prompt information, the prompt time is within a preset time period from a current time, and the current time is a time point displayed on the clock dial;
enable a timing function of a stopwatch in response to a received third operation;
display a third interface in response to a received fourth operation, wherein a third clock card is displayed in the third interface, and a current timing situation of the stopwatch is displayed in an interface of the third clock card; and
based on a type of third prompt information being different from a type of fourth prompt information and a time difference between a prompt time of the third prompt information and a prompt time of the fourth prompt information being less than a preset value, display a third icon related to the third prompt information in the interface of the first clock card;
wherein a type priority of the third prompt information is higher than a type priority of the fourth prompt information;
wherein each piece of prompt information corresponds to at least one of alarm clock information, weather information, or schedule information;
wherein the first clock card comprises a world clock card;
wherein the world clock card displays a plurality of clock dials corresponding to different local times; and
wherein, for each piece of prompt information, the world clock card displays an icon corresponding to the piece of prompt information at different positions on the plurality of clock dials of the world clock card based on a same prompt time being associated with the different local times of the plurality of clock dials of the world clock card.
2 . The electronic device according to claim 1 , wherein before the displaying the first interface, the instructions, when executed by the one or more processors, further cause the electronic device to:
create the first prompt information in response to a received first operation; and
display the first prompt information in response to a received second operation.
3 . The electronic device according to claim 1 , wherein the instructions, when executed by the one or more processors, further cause the electronic device to:
display the first icon in a first style when the prompt time is within a first time period, or display the first icon in a second style when the prompt time is not within a first time period;
wherein the first style is different from the second style, the prompt time is within 24 hours from the current time, and duration of the first time period is 12 hours.
4 . The electronic device according to claim 1 , wherein when there are a plurality of pieces of prompt information of a same type, a second icon is displayed in the interface of the first clock card, wherein in the plurality of pieces of prompt information of the same type, a prompt time of second prompt information is shortest from the current time, and the second icon is related to the second prompt information.
5 . The electronic device according to claim 1 , wherein the instructions, when executed by the one or more processors, further cause the electronic device to:
display a second interface when the current time reaches the prompt time of the first prompt information, wherein a second clock card is displayed in the second interface, and the first icon is not displayed in an interface of the second clock card.
6 . The electronic device according to claim 1 , wherein when there are a plurality of pieces of the weather information, a plurality of weather icons are displayed in the interface of the first clock card, wherein the plurality of weather icons are related to the plurality of pieces of the weather information.
7 . The electronic device according to claim 1 , wherein after the displaying the third interface in response to a received fourth operation, the instructions, when executed by the one or more processors, further cause the electronic device to:
disable the timing function of the stopwatch in response to a received fifth operation; and
display a fourth interface in response to a received sixth operation, wherein a fourth clock card is displayed in the fourth interface, and the clock dial is displayed in an interface of the fourth clock card.
8 . The electronic device according to claim 1 , wherein the instructions, when executed by the one or more processors, further cause the electronic device to:
enable a timing function of a timer in response to a received seventh operation; and
display a fifth interface in response to a received eighth operation, wherein a fifth clock card is displayed in the fifth interface, and a current timing situation of the timer is displayed in an interface of the fifth clock card.
9 . The electronic device according to claim 8 , wherein after the displaying the fifth interface in response to the received eighth operation, the computer programs, when executed by the one or more processors, further cause the electronic device to:
display a sixth interface when the timer ends timing, wherein a sixth clock card is displayed in the sixth interface, and the clock dial is displayed in an interface of the sixth clock card.
10 . The electronic device according to claim 1 , wherein a card color of the first clock card is a first color, and the instructions, when executed by the one or more processors, further cause the electronic device to:
turn on a first mode in response to a received ninth operation; and
display a seventh interface in response to a received tenth operation, wherein a seventh clock card is displayed in the seventh interface, a card color of the seventh clock card is a second color, and the first color is different from the second color.
11 . The electronic device according to claim 1 , wherein a card color of the first clock card is a third color, and the instructions, when executed by the one or more processors, further cause the electronic device to:
display an eighth interface in a case of sensing that a sunrise-sunset state changes, wherein an eighth clock card is displayed in the eighth interface, a card color of the eighth clock card is a fourth color, and the third color is different from the fourth color.
12 . The electronic device according to claim 1 , wherein before the displaying the first interface, the instructions, when executed by the one or more processors, further cause the electronic device to:
turn on a second mode in response to a received eleventh operation, wherein the second mode indicates to display the first icon in an interface of the first clock card.
13 . The electronic device according to claim 1 , wherein the displaying the first interface comprises:
obtaining the first prompt information, and displaying the clock dial and the first icon related to the first prompt information in the interface of the first clock card, wherein the prompt time of the first prompt information is within the preset time period from the current time.
14 . The electronic device according to claim 13 , wherein after the displaying the first interface, the instructions, when executed by the one or more processors, further cause the electronic device to:
obtain fifth prompt information based on a database corresponding to the prompt information changing;
determine sixth prompt information in the fifth prompt information, wherein a prompt time of the sixth prompt information is within the preset time period from the current time; and
display a ninth interface, wherein a ninth clock card is displayed in the ninth interface, and an icon related to the sixth prompt information is displayed in an interface of the ninth clock card.
15 . The electronic device according to claim 13 , wherein after the displaying the first interface, the instructions, when executed by the one or more processors, further cause the electronic device to:
obtain a prompt time of seventh prompt information; and
display a tenth interface based on the prompt time of the seventh prompt information being within the preset time period from the current time, wherein a tenth clock card is displayed in the tenth interface, and an icon related to the seventh prompt information is displayed in an interface of the tenth clock card.
16 . The electronic device according to claim 13 , wherein the displaying the first interface comprises:
displaying the first interface based on there being no stopwatch task and/or timer task currently.
17 . The electronic device according to claim 1 , wherein the preset value is 10 minutes.
18 . A display method, comprising:
displaying a first interface,
wherein a first clock card is displayed in the first interface, a clock dial and a first icon are displayed in an interface of the first clock card, and the first icon is related to first prompt information, and
wherein the first icon is displayed at a position related to a prompt time on the clock dial and the prompt time is a time point corresponding to the first prompt information, the prompt time is within a preset time period from a current time, and the current time is a time point displayed on the clock dial;
enabling a timing function of a stopwatch in response to a received third operation;
displaying a third interface in response to a received fourth operation, wherein a third clock card is displayed in the third interface, and a current timing situation of the stopwatch is displayed in an interface of the third clock card; and
based on a type of third prompt information being different from a type of fourth prompt information and a time difference between a prompt time of the third prompt information and a prompt time of the fourth prompt information being less than a preset value, displaying a third icon related to the third prompt information in the interface of the first clock card;
wherein a type priority of the third prompt information is higher than a type priority of the fourth prompt information;
wherein each piece of prompt information corresponds to at least one of alarm clock information, weather information, or schedule information;
wherein the first clock card comprises a world clock card;
wherein the world clock card displays a plurality of clock dials corresponding to different local times; and
wherein, for each piece of prompt information, the world clock card displays an icon corresponding to the piece of prompt information at different positions on the plurality of clock dials of the world clock card based on a same prompt time being associated with the different local times of the plurality of clock dials of the world clock card.
19 . A non-transitory computer-readable storage medium storing instructions that, when run on an electronic device, cause the electronic device to perform a display method comprising:
displaying a first interface,
wherein a first clock card is displayed in the first interface, a clock dial and a first icon are displayed in an interface of the first clock card, and the first icon is related to first prompt information, and
wherein the first icon is displayed at a position related to a prompt time on the clock dial and the prompt time is a time point corresponding to the first prompt information, the prompt time is within a preset time period from a current time, and the current time is a time point displayed on the clock dial;
enabling a timing function of a stopwatch in response to a received third operation;
displaying a third interface in response to a received fourth operation, wherein a third clock card is displayed in the third interface, and a current timing situation of the stopwatch is displayed in an interface of the third clock card; and
based on a type of third prompt information being different from a type of fourth prompt information and a time difference between a prompt time of the third prompt information and a prompt time of the fourth prompt information being less than a preset value, displaying a third icon related to the third prompt information in the interface of the first clock card;
wherein a type priority of the third prompt information is higher than a type priority of the fourth prompt information;
wherein each piece of prompt information corresponds to at least one of alarm clock information, weather information, or schedule information;
wherein the first clock card comprises a world clock card;
wherein the world clock card displays a plurality of clock dials corresponding to different local times; and
wherein, for each piece of prompt information, the world clock card displays an icon corresponding to the piece of prompt information at different positions on the plurality of clock dials of the world clock card based on a same prompt time being associated with the different local times of the plurality of clock dials of the world clock card.