Display method and electronic device
A display method and an electronic device provide icon animation and starting window image decoding that can be performed in parallel. After a launch operation is detected, an application launch animation may start to be displayed, thus reducing waiting latency and improving user experience.
1 . A display method, comprising:
receiving, by an electronic device, an application launch instruction;
displaying, by the electronic device, an icon animation corresponding to the application;
drawing, by the electronic device, a starting window corresponding to the application, wherein the icon animation starts to be displayed prior to completion of drawing of the starting window; and
following completion of drawing of the starting window, displaying a starting window animation corresponding to the application;
wherein, during the icon animation, the application icon is zoomed in to a preset size before connecting to the starting window animation and fades out and the starting window fades in.
2 . The method according to claim 1 , further comprising:
determining, by the electronic device, that the application is configured with a starting window mechanism.
3 . The method according to claim 1 , wherein the displaying an icon animation corresponding to the application and drawing a starting window corresponding to the application comprises:
obtaining, by the electronic device, icon data of the application using a window manager service;
displaying, by the electronic device based on the icon data, the icon animation corresponding to the application;
obtaining, by the electronic device, a starting window data packet by using a starting window processing module; and
drawing, by the electronic device, the starting window based on the starting window data packet.
4 . The method according to claim 1 , further comprising:
drawing, by the electronic device, a main interface corresponding to the application; and
displaying, by the electronic device, the main interface.
5 . The method according to claim 1 , wherein the application launch instruction comprises an instruction corresponding to an operation of tapping an icon of the application on a display of the electronic device or processing a voice instruction received by the electronic device.
6 . The method according to claim 1 , wherein the icon animation comprises enlarging the icon.
7 . An electronic device, comprising:
a processor;
a memory coupled to the processor and storing program instructions; and
a display coupled to the processor, wherein the program instructions, when executed by the processor, cause the electronic device to:
receive an application launch instruction;
display on the electronic device display an icon animation corresponding to the application and drawing a starting window corresponding to the application, wherein the icon animation starts to be displayed prior to completion of drawing of the starting window; and
following completion of drawing of the starting window, displaying a starting window animation corresponding to the application;
wherein, during the icon animation, the application icon is zoomed in to a preset size before connecting to the starting window animation and fades out and the starting window fades in.
8 . The electronic device according to claim 7 , wherein execution of the instructions by the processor further cause the electronic device to:
determine that the application is configured with a starting window mechanism.
9 . The electronic device according to claim 7 , wherein execution of the instructions by the processor cause the electronic device to:
obtain icon data of the application using a window manager service and displaying, based on the icon data, the icon animation corresponding to the application; and
obtain a starting window data packet using a starting window processing module and drawing the starting window based on the starting window data packet.
10 . The electronic device according to claim 7 , wherein execution of the instructions by the processor further cause the electronic device to:
draw a main interface corresponding to the application; and
display the main interface.
11 . The electronic device according to claim 7 , wherein the application launch instruction comprises an instruction corresponding to an operation of tapping an icon of the application on the electronic device display or processing a voice instruction received by the electronic device.
12 . The electronic device according to claim 7 , wherein the icon animation comprises enlarging the icon.
13 . A non-transitory computer readable medium comprising program instructions that, when executed by a processor, cause the processor to:
receive an application launch instruction;
display an icon animation corresponding to the application and draw a starting window corresponding to the application, wherein the icon animation starts to be displayed prior to completion of drawing of the starting window; and
following completion of the drawing of the starting window, display a starting window animation corresponding to the application;
wherein, during the icon animation, the application icon is zoomed in to a preset size before connecting to the starting window animation and fades out and the starting window fades in.
14 . The non-transitory readable medium according to claim 13 , wherein the program instructions further cause the processor to:
determine that the application is configured with a starting window mechanism.
15 . The non-transitory readable medium according to claim 13 , wherein the program instructions cause the processor to:
obtain icon data of the application using a window manager service and displaying, based on the icon data, the icon animation corresponding to the application; and
obtain a starting window data packet using a starting window processing module and drawing the starting window based on the starting window data packet.
16 . The non-transitory readable medium according to claim 13 , wherein the program instruction further cause the processor to:
draw a main interface corresponding to the application; and
display the main interface.
17 . The non-transitory readable medium according to claim 13 , wherein the application launch instruction comprises an instruction corresponding to an operation of tapping an icon of the application on a display of the electronic device or processing a voice instruction received by the electronic device.
18 . The non-transitory readable medium according to claim 13 , wherein the icon animation comprises enlarging the icon.