Display method and related apparatus
This application provides a display method and a related apparatus. In an example method, a first electronic device runs a first application and displays a first user interface, where the first user interface comprises first content and second content, the second content overlaps with a part of the first content, and the first user interface is related to the first application. The first electronic device displays a second user interface in response to a first operation, where the second user interface comprises the first content, and the part that is of the first content and that is covered by the second content is presented on the second user interface.
1 . A method, applied to a first electronic device, comprising:
running a first application, and displaying a first user interface, wherein the first user interface comprises first content and second content, the second content overlaps with a part of the first content, and the first user interface is related to the first application;
in response to a first operation, generating a second instruction stream and a third instruction stream based on a first instruction stream, wherein the first instruction stream is related to the first application;
displaying a second user interface based on the second instruction stream, wherein the second user interface comprises the first content, and the part that is of the first content and that is covered by the second content is presented on the second user interface;
determining first data based on the third instruction stream; and
sending the first data to a second electronic device, wherein the first data enables the second electronic device to display a third user interface, the third user interface comprises the second content, and the first electronic device is communicatively connected to the second electronic device.
2 . The method according to claim 1 , wherein the second user interface further comprises third content, the third content is displayed on the part of the first content, and the third content has transparency.
3 . The method according to claim 2 , wherein a size and a location of a display area of the third content are respectively the same as a size and a location of a display area of the second content.
4 . The method according to claim 2 , wherein the displaying a second user interface comprises:
generating a fourth instruction stream based on the third instruction stream;
generating a fifth instruction stream based on the second instruction stream and the fourth instruction stream; and
displaying the second user interface based on the fifth instruction stream, wherein the second user interface comprises the first content and the third content.
5 . The method according to claim 1 , wherein the first data is the third instruction stream, or the first data is a first video stream, the first video stream is obtained based on image data comprising the second content, and the image data comprising the second content is obtained based on the third instruction stream.
6 . The method according to claim 1 , wherein the method further comprises:
receiving a second operation performed on a first area of the second user interface, wherein the first area is an area in which the part that is of the first content and that is covered by the second content is presented on the second user interface; and
executing an instruction in response to the second operation.
7 . The method according to claim 1 , wherein the first electronic device stores a target instruction library, and the generating the second instruction stream and the third instruction stream based on the first instruction stream comprises: determining, from the first instruction stream, an instruction that matches an instruction in the target instruction library, and performing an interception operation.
8 . An electronic device, wherein the electronic device comprises a display, a communication module, at least one memory, and at least one processor, the at least one memory is coupled to the at least one processor and stores programming instructions for execution by the at least one processor to cause the electronic device to perform operations comprising:
running a first application, and displaying a first user interface, wherein the first user interface comprises first content and second content, the second content overlaps with a part of the first content, and the first user interface is related to the first application;
in response to a first operation, generating a second instruction stream and a third instruction stream based on a first instruction stream, wherein the first instruction stream is related to the first application;
displaying a second user interface based on the second instruction stream, wherein the second user interface comprises the first content, and the part that is of the first content and that is covered by the second content is presented on the second user interface;
determining first data based on the third instruction stream; and
sending the first data to a second electronic device, wherein the first data enables the second electronic device to display a third user interface, the third user interface comprises the second content, and the electronic device is communicatively connected to the second electronic device.
9 . The electronic device according to claim 8 , wherein the second user interface further comprises third content, the third content is displayed on the part of the first content, and the third content has transparency.
10 . The electronic device according to claim 9 , wherein a size and a location of a display area of the third content are respectively the same as a size and a location of a display area of the second content.
11 . The electronic device according to claim 9 , wherein the displaying a second user interface comprises:
generating a fourth instruction stream based on the third instruction stream;
generating a fifth instruction stream based on the second instruction stream and the fourth instruction stream; and
displaying the second user interface based on the fifth instruction stream, wherein the second user interface comprises the first content and the third content.
12 . The electronic device according to claim 8 , wherein the first data is the third instruction stream, or the first data is a first video stream, the first video stream is obtained based on image data comprising the second content, and the image data comprising the second content is obtained based on the third instruction stream.
13 . The electronic device according to claim 8 , wherein the operations further comprise:
receiving a second operation performed on a first area of the second user interface, wherein the first area is an area in which the part that is of the first content and that is covered by the second content is presented on the second user interface; and
executing an instruction in response to the second operation.
14 . The electronic device according to claim 8 , wherein the electronic device stores a target instruction library, and the generating the second instruction stream and the third instruction stream based on the first instruction stream comprises: determining, from the first instruction stream, an instruction that matches an instruction in the target instruction library, and performing an interception operation.
15 . An electronic device, wherein the electronic device comprises a display, a communication module, at least one memory, and at least one processor, the at least one memory is coupled to the at least one processor and stores programming instructions for execution by the at least one processor to cause the electronic device to perform operations comprising:
running a first application, and displaying a first user interface, wherein the first user interface comprises first content and second content, the second content overlaps with a part of the first content, and the first user interface is related to the first application;
in response to a first operation, generating a second instruction stream and a third instruction stream based on a first instruction stream, wherein the first instruction stream is related to the first application;
displaying a second user interface based on the second instruction stream, wherein the second user interface comprises the first content; and
extracting second data from first data, and sending second data to a second electronic device, wherein the first data corresponds to the first content and the second content, and the second data corresponds to the second content.
16 . The electronic device according to claim 15 , wherein the second user interface further comprises third content, the third content is displayed on the part of the first content, and the third content has transparency.
17 . The electronic device according to claim 16 , wherein a size and a location of a display area of the third content are respectively the same as a size and a location of a display area of the second content.
18 . The electronic device according to claim 16 , wherein the displaying a second user interface comprises:
generating a fourth instruction stream based on the third instruction stream;
generating a fifth instruction stream based on the second instruction stream and the fourth instruction stream; and
displaying the second user interface based on the fifth instruction stream, wherein the second user interface comprises the first content and the third content.
19 . The electronic device according to claim 15 , wherein the operations further comprise:
receiving a second operation performed on a first area of the second user interface, wherein the first area is an area in which the part that is of the first content and that is covered by the second content is presented on the second user interface; and
executing an instruction in response to the second operation.
20 . The electronic device according to claim 15 , wherein the electronic device stores a target instruction library, and the generating the second instruction stream and the third instruction stream based on the first instruction stream comprises: determining, from the first instruction stream, an instruction that matches an instruction in the target instruction library, and performing an interception operation.