WO2024187845A1 - 一种屏幕显示方法及相关电子设备 - Google Patents
一种屏幕显示方法及相关电子设备 Download PDFInfo
- Publication number
- WO2024187845A1 WO2024187845A1 PCT/CN2023/136762 CN2023136762W WO2024187845A1 WO 2024187845 A1 WO2024187845 A1 WO 2024187845A1 CN 2023136762 W CN2023136762 W CN 2023136762W WO 2024187845 A1 WO2024187845 A1 WO 2024187845A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- screen
- split
- interface
- identifier
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 102
- 230000000694 effects Effects 0.000 claims abstract description 150
- 230000033001 locomotion Effects 0.000 claims description 87
- 230000004044 response Effects 0.000 claims description 33
- 230000008569 process Effects 0.000 claims description 27
- 238000013507 mapping Methods 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 13
- 230000015654 memory Effects 0.000 claims description 11
- 238000003860 storage Methods 0.000 claims description 9
- 230000001788 irregular Effects 0.000 abstract description 29
- 238000012423 maintenance Methods 0.000 abstract description 4
- 238000007726 management method Methods 0.000 description 58
- 238000010586 diagram Methods 0.000 description 28
- 230000006870 function Effects 0.000 description 23
- 238000012545 processing Methods 0.000 description 14
- 238000004891 communication Methods 0.000 description 10
- 230000005236 sound signal Effects 0.000 description 9
- 238000010295 mobile communication Methods 0.000 description 8
- 230000003993 interaction Effects 0.000 description 7
- 238000003825 pressing Methods 0.000 description 4
- 229920001621 AMOLED Polymers 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 238000009826 distribution Methods 0.000 description 3
- 230000007704 transition Effects 0.000 description 3
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 2
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000003321 amplification Effects 0.000 description 1
- 238000013529 biological neural network Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 239000011248 coating agent Substances 0.000 description 1
- 238000000576 coating method Methods 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 239000002096 quantum dot Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/0485—Scrolling or panning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72469—User interfaces specially adapted for cordless or mobile telephones for operating the device by selecting functions from two or more displayed items, e.g. menus or icons
Definitions
- the present application relates to the field of screen display, and in particular to a screen display method and related electronic equipment.
- the split screen function of the tablet computer can be used to split the video application and office software into left and right screens, so that the video playback interface and the text editing interface can be displayed on the tablet computer screen at the same time.
- users can use the tablet computer to watch videos and edit documents at the same time, allowing users to have both entertainment and leisure.
- the embodiment of the present application provides a screen display method and related electronic equipment, which solves the problem that during the split-screen process, additional layers need to be added to display the split-screen animation, resulting in complex code, making it difficult for later technical personnel to perform technical maintenance.
- an embodiment of the present application provides a screen display method, which is applied to an electronic device with a display screen, the method comprising: displaying a first interface, displaying a floating window on the first interface, the floating window comprising a first control, the floating window corresponding to a first application, and the first interface corresponding to a second application; in response to a first operation on the first control, setting the floating window to a first mode, the first mode being a working mode in which the floating window can be moved on the display screen; if the first application and the second application are both applications that support top-bottom split-screen and left-right split-screen, determining one or more hot zones in the upper, lower, left, and right directions of a display area of the display screen respectively; if the first application and the second application are not both applications that support top-bottom split-screen and left-right split-screen, determining one or more hot zones in the upper and lower directions of a display area of the display screen respectively.
- the second interface when the first control is moved within any hot zone range, the second interface includes a first View frame and a second View frame, the first View frame displays the dynamic content of the first application, the second View frame displays the dynamic content of the second application, and the first View frame and the second View frame are on the same layer; in the process of displaying the second interface, respond to a third operation on the first control, display a third interface, the third interface includes a first split-screen interface and a second split-screen interface, the first split-screen interface corresponds to the first application, and the second split-screen interface corresponds to the second application.
- the electronic device determines the setting method of two different hot zones on the display screen according to whether the first application and the second application support top-bottom split-screen and/or left-right split-screen. Then, when the electronic device detects that the first control is in any hot zone, it triggers the split-screen operation and then displays the split-screen dynamic effect content. Since the View frame that displays the split-screen dynamic effect content is on the same layer. Therefore, the traditional split-screen operation based on irregular hot zones is avoided, and it is necessary to add a View frame with a new coating to display the split-screen dynamic effect content, which in turn causes the code to be complicated and is not conducive to maintenance by later technical personnel.
- the third interface also includes a split-screen switching control, and after the third interface is displayed, it also includes: responding to a fourth operation on the split-screen switching control, if the third interface is a top-bottom split-screen interface, switching the third interface to a left-right split-screen interface; if the third interface is a left-right split-screen interface, switching the third interface to a top-bottom split-screen interface.
- the user can switch between left-right split screen/top-bottom split screen on the existing split-screen interface, avoiding the tedious operation of "exiting the current split screen, dragging the floating window, and entering the split screen" when the user needs to switch the split screen, thereby improving the user experience.
- a possible implementation method before responding to the second operation on the second control, it also includes: obtaining a first application identifier and a second application identifier, the first application identifier being the identification information of the first application, and the second application identifier being the identification information of the second application; judging whether the first application identifier and the second application identifier are both identification information in the first whitelist; if yes, the first application and the second application are both applications that support top-bottom split screen and left-right split screen; if no, the first application and the second application are not both applications that support top-bottom split screen and left-right split screen. In this way, judging whether the first application and the second application support split screen by means of a whitelist is conducive to the electronic device determining the setting method of the hot zone according to the split screen conditions supported by the first application and the second application.
- the display area of the display screen includes N View frames in a rectangular shape, each View frame includes four edges: top, bottom, left, and right, and the position and range of each View frame in the display area are represented by four-dimensional coordinates (Xi, Yi, Zi, Ki); wherein Xi represents the distance between the left side of the i-th View frame and the first edge, Yi represents the distance between the right side of the i-th View frame and the first edge, Zi represents the distance between the upper edge of the i-th View frame and the second edge, and Ki represents the distance between the lower edge of the i-th View frame and the second edge; the first edge is an edge of the display screen parallel to the left side and the right side, the second edge is an edge of the display screen parallel to the upper edge and the lower edge, and N is an integer greater than 1.
- a second interface is displayed, specifically including: obtaining first position information of the first control; calculating a first identifier based on the first position information; obtaining four-dimensional coordinates of N corresponding View frames according to the first identifier; adjusting the range of each View frame in the display screen based on the N four-dimensional coordinates to obtain a first View frame and a second View frame; displaying the dynamic content of the first application in the first View frame, and displaying the dynamic content of the second application in the second View frame.
- a second interface is displayed, specifically including: obtaining first position information of the first control; obtaining the range of the hot zone in the display screen according to the four-dimensional coordinates of the hot zone; when it is determined that the first control is in any hot zone based on the first position information, obtaining identification information of the hot zone where the first control is located; based on the identification information, obtaining the four-dimensional coordinates of the corresponding N View frames; based on the N four-dimensional coordinates, adjusting the range of each View frame in the display screen to obtain a first View frame and a second View frame; displaying the dynamic content of the first application in the first View frame, and displaying the dynamic content of the second application in the second View frame.
- the electronic device includes a split-screen animation management module, a animation frame adjustment module, and a animation adding module, and if the first application and the second application are both applications that support top-bottom split-screen and left-right split-screen, displaying the second interface includes: the split-screen animation management module calculates a first identifier according to the first position information of the first control;
- the split-screen animation management module sends a third notification message to the animation frame adjustment module, and the third notification message includes the first identifier; the animation frame adjustment module obtains the four-dimensional coordinates of the corresponding N View frames according to the first identifier; the animation adjustment module adjusts the range of the corresponding N View frames in the display screen according to the four-dimensional coordinates of the N View frames to obtain the first View frame and the second View frame; the animation adjustment module sends a fourth notification message to the animation adding module, and the fourth notification message includes the first identifier, the first mapping relationship between the first View frame and the first application, and the second mapping relationship between the second View frame and the second application; the animation adding module obtains the animation content of the first application and the animation content of the second application according to the first identifier; the animation adding module displays the animation content of the first application on the first View frame according to the first mapping relationship; the animation adding module displays the animation content of the second application on the second View frame according to the second mapping relationship.
- the electronic device includes a split-screen motion effect management module, a motion effect frame adjustment module and a motion effect adding module. If the first application and the second application are not both applications that support top-bottom split-screen and left-right split-screen, a second interface is displayed, including: when the split-screen management module determines that the first control is within the hot zone based on the first position information of the first control, the motion effect frame adjustment module sends a third notification message, the third notification message including identification information of the hot zone where the first control is located; the motion effect frame adjustment module obtains the four-dimensional coordinates of the corresponding N View frames according to the identification information; the motion effect adjustment module adjusts the four-dimensional coordinates of the N View frames according to the four-dimensional coordinates of the N View frames.
- the range of N View frames corresponding to the display screen is used to obtain the first View frame and the second View frame;
- the motion effect adjustment module sends a fourth notification message to the motion effect adding module, and the fourth notification message includes the identification information, the first mapping relationship between the first View frame and the first application, and the second mapping relationship between the second View frame and the second application;
- the motion effect adding module obtains the motion effect content of the first application and the motion effect content of the second application according to the identification information;
- the motion effect adding module displays the motion effect content of the first application on the first View frame according to the first mapping relationship;
- the motion effect adding module displays the motion effect content of the second application on the second View frame according to the second mapping relationship.
- the electronic device also includes a floating window moving module and a hot zone setting module of the first application, and before displaying the second interface, it also includes: the floating window moving module responds to the first operation, and sends a first notification message to the hot zone setting module, the first notification message includes a first application identifier and a second application identifier, the first application identifier is identification information of the first application, and the second application identifier is identification information of the second application; the hot zone setting module determines whether the first application identifier and the second application identifier are both application identifiers in the first whitelist; if yes, the hot zone setting module sends first hot zone information to the split-screen animation management module, and the first hot zone information is used to indicate that the first application and the second application are both applications that support top-bottom split-screen and left-right split-screen; if no, the hot zone setting module sends second hot zone information to the split-screen animation management module, and the second hot zone information is used to indicate
- the hot zone setting module after the hot zone setting module sends the first hot zone information to the split-screen animation management module or after the hot zone setting module sends the second hot zone information to the split-screen animation management module, it also includes: the floating window movement module responds to the second operation, and sends a second notification message to the split-screen animation management module, and the second notification message is used to prompt the split-screen animation management module to obtain the first position information of the first control; the split-screen animation management module obtains the first position information of the first control in real time.
- the floating window moving module responds to the third operation and sends a fifth notification message to the animation adding module;
- the animation adding module sends a first indication message to the first application, and the first indication message includes a first identifier;
- the animation adding module sends a second indication message to the second application, and the second indication message includes the first identifier;
- the first application displays the first split-screen interface on the third interface based on the first identifier;
- the second application displays the second split-screen interface on the third interface based on the first identifier.
- the floating window moving module responds to the third operation and sends a fifth notification message to the motion effect adding module; the motion effect adding module sends a first indication message to the first application, and the first indication message includes the identification information of the hot zone where the first control is located; the motion effect adding module sends a second indication message to the second application, and the second indication message includes the identification information of the hot zone where the first control is located; the first application displays the first split-screen interface on the third interface based on the identification information of the hot zone where the first control is located; the second application displays the second split-screen interface on the third interface based on the identification information of the hot zone where the first control is located.
- an embodiment of the present application provides an electronic device, which includes: one or more processors, a display screen and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute: displaying a first interface through a display screen, a floating window is displayed on the first interface, the floating window includes a first control, the floating window corresponds to a first application, and the first interface corresponds to a second application; in response to a first operation on the first control, the floating window is set to a first mode, and the first mode is a working mode in which the floating window can be moved on the display screen; if the first application and the second application are both applications that support top-bottom split screen and left-right split screen, one or more hot zones are respectively determined in the top, bottom, left and right directions of the display area of the display screen; if the first application and the second application are The second application is not an application that
- the one or more processors call the computer instructions to cause the electronic device to execute: in response to a fourth operation on the split-screen switching control, if the third interface is a top-bottom split-screen interface, switch the third interface to a left-right split-screen interface; if the third interface is a left-right split-screen interface, switch the third interface to a top-bottom split-screen interface.
- the one or more processors call the computer instructions to cause the electronic device to execute: obtain a first application identifier and a second application identifier, the first application identifier being identification information of the first application, and the second application identifier being identification information of the second application; determine whether the first application identifier and the second application identifier are both identification information in the first whitelist; if yes, the first application and the second application are both applications that support top-bottom split-screen and left-right split-screen; if no, the first application and the second application are not both applications that support top-bottom split-screen and left-right split-screen.
- the one or more processors call the computer instructions to cause the electronic device to execute: obtaining first position information of a first control; calculating a first identifier based on the first position information; obtaining four-dimensional coordinates of corresponding N View frames according to the first identifier; adjusting the range of each View frame in the display screen based on the N four-dimensional coordinates to obtain a first View frame and a second View frame; displaying the dynamic content of the first application in the first View frame through the display screen, and displaying the dynamic content of the second application in the second View frame through the display screen.
- the one or more processors call the computer instructions to enable the electronic device to execute: obtaining first position information of the first control; obtaining the position of the hot zone in the display according to the four-dimensional coordinates of the hot zone; The range of the first control in the display screen; when it is determined that the first control is in any hot zone based on the first position information, the identification information of the hot zone where the first control is located is obtained; based on the identification information, the four-dimensional coordinates of the corresponding N View frames are obtained; based on the N four-dimensional coordinates, the range of each View frame in the display screen is adjusted accordingly to obtain the first View frame and the second View frame; the dynamic content of the first application is displayed in the first View frame through the display screen, and the dynamic content of the second application is displayed in the second View frame through the display screen.
- an embodiment of the present application provides an electronic device, comprising: a touch screen, a camera, one or more processors and one or more memories; the one or more processors are coupled to the touch screen, the camera, and the one or more memories, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions.
- the electronic device executes the method described in the first aspect or any possible implementation method of the first aspect.
- an embodiment of the present application provides a chip system, which is applied to an electronic device, and the chip system includes one or more processors, which are used to call computer instructions to enable the electronic device to execute the method described in the first aspect or any possible implementation method of the first aspect.
- an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect or any possible implementation of the first aspect.
- an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on an electronic device, causes the electronic device to execute the method described in the first aspect or any possible implementation of the first aspect.
- FIGS 1A-1J are diagrams showing examples of application scenarios provided by the present application.
- FIG2A is an example diagram of hot zone distribution of an electronic device in landscape mode provided by an embodiment of the present application.
- FIG2B is an example diagram of hot zone distribution of an electronic device in portrait mode provided by an embodiment of the present application.
- FIG2C is a diagram showing an example of View frame distribution of an electronic device in landscape mode provided by an embodiment of the present application.
- FIG2D is a layout diagram of a View frame of a display area of an electronic device provided by an embodiment of the present application.
- FIG3A is an example diagram of irregular hot zone division of an electronic device 100 provided by the present application.
- 3B-3D are diagrams showing examples of user interfaces of a group of electronic devices 100 provided by the present application.
- FIG4 is a flow chart of a screen display method provided by an embodiment of the present application.
- FIG5A is a layout diagram of a View frame of a display area of another electronic device provided by an embodiment of the present application.
- FIG5B is an example diagram of an electronic device in a landscape mode provided by an embodiment of the present application.
- FIG5C is an example diagram of an electronic device in a portrait mode provided by an embodiment of the present application.
- FIG6 is a module interaction diagram of a screen display method provided in an embodiment of the present application.
- FIG7 is a module interaction diagram of another screen display method provided in an embodiment of the present application.
- FIG8 is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application.
- FIG9 is a software structure block diagram of the electronic device 100 provided in an embodiment of the present application when performing split-screen operation based on irregular hot zones;
- FIG10 is a software structure block diagram of the electronic device 100 provided in an embodiment of the present application when performing split-screen operation in a regular hot zone manner.
- a unit can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and/or distributed between two or more computers.
- these units can be executed from various computer-readable media having various data structures stored thereon.
- Units can communicate, for example, through local and/or remote processes based on signals having one or more data packets (e.g., data from a second unit interacting with another unit in a local system, a distributed system, and/or a network.
- the Internet interacts with other systems via signals).
- an electronic device 100 is taken as an example for explanation.
- the electronic device 100 can be a smart phone, a folding screen mobile phone, a tablet computer, or other types of terminal devices, which are not limited in the embodiments of the present application.
- FIG. 1A shows a user interface 10 of an electronic device 100, which is an exemplary interface of a browser application.
- a floating window 101 is displayed in the user interface 10, and the floating window 101 is a corresponding floating window of a calculator application.
- the floating window 101 can be moved on the user interface 10 by accepting a user's operation.
- the electronic device 100 when the electronic device 100 detects a user's long press operation (first operation) on the drag bar 1011 on the floating window 101, in response to the operation, the electronic device 100 sets the floating window 101 to a "draggable" mode (first mode), that is, the user can drag the floating window 101 on the user interface 10 via the drag bar 1011.
- first operation long press operation
- first mode a "draggable" mode
- the electronic device 100 moves the floating window 101 and its drag bar 1011 to the right of the screen along the moving direction of the user's gesture. The user continues to drag the floating window 101 to the right at this time.
- the electronic device 100 detects that the drag bar 1011 enters the area 102, the electronic device 100 starts to split the screen left and right and displays the user interface 11 shown in FIG1C .
- user interface 11 is an exemplary dynamic effect interface of electronic device 100 during left-right split screen.
- dynamic effect box 111 is the dynamic effect box of browser application, in which the split screen dynamic effect of browser can be displayed.
- Dynamic effect box 112 is the dynamic effect box of calculator application, in which the split screen dynamic effect of calculator can be displayed.
- a gray background image for example, a floating window 1121 of calculator application, an application icon 1122 of calculator application, and a drag bar 1011 of the floating window.
- the user's finger is still pressing and holding the drag bar 1011.
- the electronic device 100 detects the user's third operation on the drag bar 1011 (for example, raising the hand to release the drag bar 1011), in response to the third operation, the electronic device 100 displays the user interface 12 as shown in Figure 1D.
- the user interface 12 is an exemplary user interface after the electronic device 100 splits the browser application and the calculator application into left and right screens.
- the user interface 12 includes an interface 121 of the browser application (a second split-screen interface) and an interface 122 of the calculator application (a first split-screen interface).
- the user can perform different operations in different split-screen interfaces. For example, the user can browse news, search for information online, etc. through the second split-screen interface, and perform data calculations in the first split-screen interface, etc.
- FIG. 1A to FIG. 1D exemplarily illustrate the application scenario of the electronic device 100 performing left-right split screen.
- the electronic device can also perform top-bottom split screen to obtain different split screen display effects.
- the electronic device 100 when the electronic device 100 detects a first operation of the user on the drag bar 1011 in the floating window 101 of the calculator application (e.g., long pressing the drag bar 1011), in response to the first operation, the floating window 101 enters the "draggable" mode (first mode).
- the electronic device 100 detects a second operation of the user on the drag bar 1011 (e.g., dragging the drag bar 1011 upward)
- the floating window 101 moves upward in the direction of the user's gesture.
- the electronic device 100 displays the user interface 13 as shown in FIG. 1F .
- user interface 13 is an exemplary dynamic effect interface of electronic device 100 during the process of splitting the screen up and down.
- dynamic effect box 131 is a dynamic effect box of the browser application, and the dynamic effect content of the browser can be displayed in this dynamic effect box.
- Dynamic effect box 132 is a dynamic effect box of the calculator application, and the dynamic effect content of the calculator application is displayed in this dynamic effect box.
- the electronic device 100 detects the user's third operation on the drag bar 1011 (for example, raising the hand to release the drag bar 1011), in response to the third operation, the electronic device 100 displays the user interface 14 shown in FIG1G .
- the user interface 14 is an exemplary user interface after the electronic device 100 splits the browser application and the calculator application into two upper and lower screens.
- the user interface 14 includes an interface 142 (a second split-screen interface) of the browser application and an interface 141 (a first split-screen interface) of the calculator application.
- the user can perform different operations in different split-screen interfaces. For example, the user can browse news and surf the Internet through the second split-screen interface, and perform data calculations in the first split-screen interface.
- the top-bottom split-screen interface and the left-right split-screen interface can be switched.
- the user interface 12 and the user interface 14 include a split-screen switching control 123 and a split-screen switching control 143, respectively.
- the electronic device 100 when the electronic device 100 detects an input operation (e.g., a single click) for the split-screen switching control 123, in response to the input operation, the electronic device 100 can switch the user interface 12 to the user interface 14, that is, the left-right split-screen interface is switched to the top-bottom split-screen interface.
- the electronic device 100 when the electronic device 100 detects an input operation (e.g., a single click) for the split-screen switching control 143, in response to the input operation, the electronic device 100 can switch the user interface 14 to the user interface 12, that is, the top-bottom split-screen interface is switched to the left-right split-screen interface.
- an input operation e.g., a single click
- the application scenarios of the electronic device 100 performing left-right splitting or top-bottom splitting in the horizontal screen state are mainly introduced.
- the electronic device 100 can switch between the horizontal screen and the vertical screen according to the state of the user holding the electronic device 100.
- the electronic device 100 In the vertical screen state, the electronic device 100 can also split the screen into floating windows.
- the vertical splitting of the electronic device 100 in the vertical screen state is taken as an example for explanation.
- user interface 15 is an exemplary user interface of electronic device 100 in portrait mode.
- the user interface is an interface of a browser application, in which a floating window 151 of a calculator application and a drag bar 1511 corresponding to the floating window are displayed.
- the electronic device 100 detects a first operation of the user on the drag bar 1511 (for example, long pressing the drag bar 1511), in response to the first operation, the floating window 151 enters the "draggable" mode.
- the electronic device 100 detects a second operation of the user (for example, dragging the drag bar 1511 upward)
- the electronic device 100 moves the floating window 151 upward following the direction of movement of the finger.
- the electronic device 100 displays the user interface 16 as shown in FIG1I .
- user interface 16 is an exemplary dynamic effect interface of the electronic device 100 in the process of splitting the screen up and down in the vertical screen interface.
- the dynamic effect interface includes a first dynamic effect box 161 and a second dynamic effect box 162.
- the dynamic effect content of the calculator application is displayed in the first dynamic effect box 161.
- the dynamic effect content of the browser application is displayed in the second dynamic effect box 162.
- user interface 17 is an exemplary interface of the electronic device 100 in vertical screen state with the screen split up and down.
- User interface 17 includes a first split screen interface 172 (interface of the calculator application) and a second split screen interface 171 (interface of the browser application).
- user interface 17 may also include a split screen switching control 173.
- 100 detects the user's input operation (for example, a single click) on the split-screen switching control 173.
- the electronic device 100 switches the top-bottom split screen to the left-right split screen in the portrait mode.
- the location of the application split-screen interface may be related to the direction in which the floating window is dragged. For example, in the embodiments of Figures 1A-1D above, since the electronic device 100 moves the floating window 101 to the right in response to the user's second operation on the drag bar, in the user interface of Figure 1D, the electronic device displays the split-screen interface of the calculator application on the right and the split-screen interface of the browser application on the left. For another example, in the embodiments of Figures 1E-1J above, since the electronic device 100 moves the floating window 151 upward in response to the user's second operation on the drag bar. Therefore, in the user interface of Figure 1J, the electronic device displays the split-screen interface of the calculator application on the upper side and the split-screen interface of the browser application on the lower side.
- the electronic device generally determines whether to trigger the split-screen operation by detecting whether the drag bar of the floating window enters the hot zone. When the electronic device determines that the drag bar of the floating window is within the hot zone, the electronic device triggers the split-screen operation. When the electronic device determines that the drag bar of the floating window is not within the hot zone, the electronic device does not trigger the split-screen operation.
- triggering split-screen operation is mainly achieved by judging whether the drag bar of the floating window is within the hot zone range.
- the hot zone described here can be understood as an area of a specific range delineated on the screen display area that is not facing the user (invisible to the user).
- Hot zones can be divided into regular hot zones and irregular hot zones.
- a regular hot zone can be understood as a hot zone with a rectangular shape
- an irregular hot zone can be understood as a hot zone with a non-rectangular shape (for example, a triangle, a circle, etc.).
- the display area of the electronic device 100 includes two hot zones, both of which are rectangular in shape, namely, hot zone 1 and hot zone 2.
- hot zone 1 and hot zone 2 the electronic device 100 must first record the positions of the two zones in the screen area, and the method used is to record the range of the hot zone in the display area by recording the distance between each hot zone and the edge of the display area, thereby defining the hot zone.
- each hot zone Since the shape of each hot zone is a rectangle, it can be found that the four sides of each hot zone are actually parallel to the upper and lower edges/left and right edges of the screen edge. Assume that the hot zone is defined based on the left edge (S1) and the lower edge (S2) of the display area (display screen), and the distance between the left, right, upper and lower edges of each hot zone and S1/S2 is defined by a four-dimensional coordinate. Then, the range of the hot zone can be represented by (X, Y, Z, K).
- X represents the distance between the left side of the hot zone and the left edge of the display area (S1 in Figure 2A)
- Y represents the distance between the right side of the hot zone and the left edge of the display area
- Z represents the distance between the upper edge of the hot zone and the lower edge of the display area
- K represents the distance between the lower edge of the hot zone and the lower edge of the display area.
- any other two non-parallel edges of the display area may be selected as reference edges for defining the hot zone.
- the range of hot zone 1 in the display area is (0.024*h2, 0.15*h2, h1, 0), and the range of hot zone 2 in the display area is (0.85*h2, 0.96*h2, h1, 0).
- this is an interface diagram of the electronic device 100 in portrait mode. Since the electronic device 100 selects the left edge and the bottom edge of the display area as the reference to define the hot zone. Therefore, in FIG2B , the left edge of the display area corresponds to S2, and the bottom edge of the display area corresponds to S3. If the range of hot zone 1 in the display area is (0.024*h2, 0.15*h2, h1, 0), and the range of hot zone 2 in the display area is (0.85*h2, 0.96*h2, h1, 0), then the range of hot zone 1 and hot zone 2 in the display area can be as shown in FIG2B .
- Figure 2C is an example diagram of the layout of the View frame of the electronic device 100 in landscape mode.
- electronic devices usually divide the screen area into multiple View frames (all rectangular) of regular shapes. These View frames can be used to display the dynamic content applied in the split-screen process. For ease of description, only three View frames are shown in Figure 2C, and these three View frames are on one layer. Similar to the definition of the range of the above-mentioned hot spots in the display area, the range of each View box in the display area of the electronic device is also determined by a four-dimensional coordinate. The relevant description of the definition of the View box range can be found in the above description, and will not be repeated here.
- the electronic device When the electronic device detects that the drag bar of the floating window is within the hot zone, it starts the split-screen operation. Then, the four-dimensional coordinates of the View frame in the display area can be changed accordingly according to the type of split-screen operation (for example, the upper split-screen of the application corresponding to the floating window, the lower split-screen of the application corresponding to the floating window, the left split-screen of the application corresponding to the floating window, and the right split-screen of the application corresponding to the floating window), and the distances between the top, bottom, left and right sides of the View frame and the edge of the selected display area are adjusted according to the four-dimensional coordinates, thereby changing the range of the View frame in the display area, and then obtaining the View frame that displays the application animation content during the split-screen process.
- the type of split-screen operation for example, the upper split-screen of the application corresponding to the floating window, the lower split-screen of the application corresponding to the floating window, the left split-screen of the application corresponding to the floating window,
- Figure 2D it is a layout diagram of the View frames of the display area of the electronic device during the split-screen operation of the electronic device. It can be seen that compared with Figure 2C, the range of the first View frame and the second View frame is expanded, and the range of the third View frame is significantly compressed.
- the dynamic effect content in the dynamic effect frame 111 in Figure 1C can be displayed in the first View frame, and the dynamic effect content in the dynamic effect frame 112 in Figure 1C can be displayed in the second View frame.
- the following is an exemplary introduction to the principle of the electronic device 100 performing split-screen operation based on irregular hot zones.
- FIG. 3A an example diagram of irregular hot zone division of electronic device 100 is shown.
- FIG. 3A includes four hot zones, namely, hot zone 1, hot zone 2, hot zone 3 and hot zone 4. Since these four hot zones are all trapezoidal, they all include edges that are not parallel to the edge of the display area. Therefore, these four hot zones are all irregular hot zones. This makes it impossible for the electronic device to use the above-mentioned method of defining four-dimensional coordinates to characterize the range of irregular hot zones in the display area (because the waist of the trapezoid is not parallel to the upper edge or lower edge of the display area, it cannot be represented by the distance from the lower edge or left edge).
- the electronic device can obtain the position coordinates (x, y) of the drag bar in the display area in real time, and use (x, y) as the input of H to obtain the first identifier W. Whether to perform split-screen operation, and if so, what type of split-screen operation should be performed.
- the position coordinates of the drag bar 3011 of the floating window are (x1, y1)
- W it is determined that the upper split screen operation of the application corresponding to the floating window should be performed.
- the entire display area is generally used as a View frame (the first View frame shown in Figure 3C).
- a split-screen animation for example, the user interface 13 in Figure 1F above
- Figure 3D shows the View frame layout diagram during the split-screen operation of the application corresponding to the floating window.
- the second View frame is a newly added View frame based on the first View frame.
- the first View frame displays the animation content of the calculator application
- the second View frame displays the animation content of the browser application.
- the range of the hot zone in the display area can be defined by four-dimensional coordinates
- the range of the hot zone can also be switched accordingly in the horizontal or vertical mode, which makes the code logic of the split-screen operation in this way simple, the code readability is strong, and it is easy for later technical personnel to perform technical maintenance.
- the later technical personnel want to modify the range or position of the hot zone, they only need to change the four-dimensional coordinates of the hot zone, which greatly improves the work efficiency of the technical personnel.
- this method can only define regular areas, and the amount of code is relatively redundant to a certain extent.
- this method generally only defines two hot zones (upper and lower hot zones or left and right hot zones), which makes it possible to only achieve upper and lower split screens or left and right split screens through hot zones.
- left and right hot zones as an example, electronic devices can only perform left and right split screens through hot zones. If you want to perform upper and lower split screens, you can only perform left and right split screens first, and then switch to upper and lower split screens by switching (for example, single-clicking the split screen switching control 123 in Figure 1D above).
- an embodiment of the present application provides a method for screen display, which method is: before performing the split-screen operation, the electronic device first determines whether the application corresponding to the floating window and the application corresponding to the current user interface are both applications that support top-bottom split-screen and left-right split-screen.
- the electronic device uses the irregular hot zone method (through the logic function method) to determine whether to perform the split-screen operation and which type of split-screen operation to perform when the split-screen operation is to be performed (for example, the left-right split-screen operation of the floating window corresponding to the application interface on the left or the left-right split-screen operation of the floating window corresponding to the application interface on the right or the top-bottom split-screen operation of the floating window corresponding to the application interface on the top or the top-bottom split-screen operation of the floating window corresponding to the application interface on the bottom or no split-screen operation).
- the irregular hot zone method through the logic function method to determine whether to perform the split-screen operation and which type of split-screen operation to perform when the split-screen operation is to be performed (for example, the left-right split-screen operation of the floating window corresponding to the application interface on the left or the left-right split-screen operation of the floating window corresponding to the application interface on the right or the top-bottom split-screen operation of the floating window corresponding to the application interface on the
- the electronic device uses the regular hot zone method (by determining whether the drag bar of the floating window is within the defined regular hot zone) to determine whether to perform the split-screen operation and which type of split-screen operation to perform when the split-screen operation is to be performed (for example, the left-right split-screen operation of the floating window corresponding to the application interface on the left or the left-right split-screen operation of the floating window corresponding to the application interface on the right).
- the electronic device sets multiple View frames in the same layer of the screen area (the embodiment of the present application takes the setting of three View frames as an example for explanation).
- the size and position of the three View frames are changed to obtain a View frame that displays the application's dynamic content.
- the dynamic content of the corresponding application is displayed in the View frame.
- the electronic device displays a first interface, where the first interface is an interface corresponding to a second application, a floating window is displayed on the first interface, the application corresponding to the floating window is a first application, and the first floating window includes a first control.
- the first interface may be the user interface 10 in the embodiment of FIG. 1A
- the floating window may be the floating window 101 in the embodiment of FIG. 1A
- the first control may be the drag bar 1011 in the embodiment of FIG. 1A
- the first application may be the calculator application in the embodiment of FIG. 1A (the application corresponding to the floating window)
- the second application may be the browser application in the embodiment of FIG. 1A.
- the first operation may be a long press operation on the drag bar 1011 in the embodiment of Fig. 1A.
- the first mode is a working mode in which the floating window moves in the direction of the user's drag.
- the electronic device can obtain the application identifiers of the first application and the second application, and determine whether the application identifier of the first application and the application identifier of the second application are in the first whitelist according to the application identifiers of the first application and the second application.
- the first whitelist includes application identifiers of multiple applications, and the applications corresponding to the multiple application identifiers are applications that support both top-bottom split-screen and left-right split-screen.
- the electronic device uses the irregular hot zone method to perform the split screen operation of the first application and the second application.
- the electronic device uses the regular hot zone method to perform the split screen operation of the first application and the second application.
- the second operation may be an input operation of the user dragging the drag bar 1011 to the right in the embodiment of FIG. 1B .
- the electronic device After the electronic device detects the second operation on the first control, the electronic device can obtain the first position information of the first control in real time, wherein the first position information can be the two-dimensional coordinate information of the first control in the display area of the electronic device.
- the coordinate information of the center point of the first control in the display area can be determined as the first position information, or the coordinate information of any point in the first control in the display area can be determined as the first position information.
- the embodiments of the present application do not limit this.
- the first application and the second application are both applications that support top-bottom split-screen and left-right split-screen. If the first application and the second application are both applications that support top-bottom split-screen and left-right split-screen.
- the electronic device uses the irregular hot zone method to determine whether to perform a split-screen operation of the first application and the second application, that is: the electronic device determines whether to perform a split-screen operation by using the first identifier output by the logic function, and determines which type of split-screen operation to perform under the premise of performing the split-screen operation (for example, the first application top split-screen operation, the first application bottom split-screen operation, the first application left split-screen operation, the first application right split-screen operation, etc.).
- the electronic device adjusts the range of the View frame in the display area according to the first identifier to obtain a first View frame and a second View frame, wherein the first View frame corresponds to a first application and the second View frame corresponds to a second application.
- the display area can be understood as the display screen of the electronic device.
- the first identifier calculated by the electronic device can be divided into the following five situations, namely: the first application top split screen (for example, the first identifier is Topsplit), the first application bottom split screen (for example, the first identifier is Bottomsplit), the first application left split screen (for example, the first identifier is Leftsplit), the first application right split screen (for example, the first identifier is Rightsplit) and no split screen operation (for example, the first identifier is Freeform).
- first application upper split screen and first application lower split screen indicate that the first application is to perform an upper and lower split screen operation
- first application upper split screen means that in the split screen interface, the interface of the first application is above the interface of the second application
- first application lower split screen means that in the split screen interface, the interface of the first application is below the interface of the second application.
- first application left split screen and first application right split screen indicate that the first application is to perform a left-right split screen operation
- first application left split screen means that in the split screen interface, the interface of the first application is to the left of the interface of the second application
- first application right split screen means that in the split screen interface, the interface of the first application is to the right of the interface of the second application.
- the electronic device After the electronic device calculates the first identifier, if the first identifier indicates that the electronic device is to perform a split-screen operation (for example, the first identifier is Topsplit or Bottomsplit or Leftsplit or Rightsplit), the electronic device can determine the corresponding motion scheme according to the first identifier, thereby adjusting the range of the View frame in the display area accordingly.
- N View frames are pre-set in the display area of the electronic device, and these N View frames are on the same layer. For the sake of ease of description, the embodiment of the present application is described by taking N as 3 as an example.
- the display area of the electronic device 100 as shown in FIG2C above includes three View frames, namely the first View frame, the second View frame, and the third View frame.
- each View frame has four edges: top, bottom, left, and right.
- the position and size of a single View frame in the display area of the electronic device can be represented by using four-dimensional coordinates.
- the four-dimensional coordinates can be (X, Y, Z, K).
- X can represent the distance between the left length of a single View frame and the left edge of the screen
- Y can represent the distance between the right length of a single View frame and the left edge of the screen
- Z can represent the distance between the top length of a single View frame and the bottom edge of the screen
- K can represent the distance between the bottom length of a single View frame and the right edge of the screen.
- the four-dimensional coordinates of different View frames corresponding to different first identifiers may be stored in advance in the electronic device, that is, different motion effect schemes corresponding to different first identifiers.
- the four-dimensional coordinates of the first View frame may be (X 11 , Y 11 , Z 11 , K 11 )
- the four-dimensional coordinates of the second View frame may be (X 21 , Y 21 , Z 21 , K 21 )
- the four-dimensional coordinates of the third View frame may be (X 31 , Y 31 , Z 31 , K 31 ).
- the four-dimensional coordinates of the first View frame may be (X 12 , Y 12 , Z 12 , K 12 )
- the four-dimensional coordinates of the second View frame may be (X 22 , Y 22 , Z 22 , K 22 )
- the four-dimensional coordinates of the third View frame may be (X 32 , Y 32 , Z 32 , K 32 ).
- the four-dimensional coordinates of the first View frame may be ( X13 , Y13 , Z13 , K13 )
- the four-dimensional coordinates of the second View frame may be ( X23 , Y23 , Z23 , K23 )
- the four-dimensional coordinates of the third View frame may be ( X33 , Y33 , Z33 , K33 ).
- the four-dimensional coordinates of the first View frame may be (X 14 , Y 14 , Z 14 , K 14 ), the four-dimensional coordinates of the second View frame may be (X 24 , Y 24 , Z 24 , K 24 ), and the four-dimensional coordinates of the third View frame may be (X 34 , Y 34 , Z 34 , K 34 ).
- the four-dimensional coordinates of the View frame may not be stored.
- the electronic device can select the four-dimensional coordinates of each View frame corresponding to the first identifier, and adjust the positions of the top, bottom, left, and right sides of each View frame according to the obtained four-dimensional coordinates of each View frame, thereby obtaining a first View frame for displaying the first application animation content and a second View frame for displaying the second application animation content.
- the four-dimensional coordinates of the first View frame are (0.1*Left, 0.9*Left, Height, 0.5*Height)
- the four-dimensional coordinates of the second View frame are (0.1*Left, 0.9*Left, 0.4*Height, 0)
- the four-dimensional coordinates of the third View frame are (0.9*Left, Left, Height, 0). If Left represents the length of the bottom edge of the display screen, and Height represents the length of the left edge of the display area, then the example diagram after the electronic device adjusts the three View frames according to the three four-dimensional coordinates can be shown in Figure 5A.
- the definition of the upper, lower, left and right edges of the display screen is related to the display mode of the electronic device.
- the display mode of the electronic device can be divided into a horizontal display mode and a vertical display mode.
- FIG5B an example diagram of an electronic device in horizontal display mode is shown.
- L1, L2, L3 and L4 are the left edge, right edge, upper edge and lower edge of the electronic device display screen, respectively.
- the length of L3 and L4 is Left, and the length of L1 and L2 is Height.
- FIG5C an example diagram of an electronic device in vertical mode, in which case L4, L3, L1 and L2 are the left edge, right edge, upper edge and lower edge of the electronic device, respectively.
- the length of L1 and L2 is Left, and the length of L3 and L4 is Height.
- the electronic device determines whether the first control is in a target hot zone based on the first position information.
- the first application and/or the second application are applications that only support top-bottom split-screen or left-right split-screen. If the first application and/or the second application are applications that support top-bottom split-screen or left-right split-screen.
- the electronic device uses the regular hot zone method to determine whether to perform a split-screen operation on the first application and the second application, that is: the electronic device determines whether to perform a split-screen operation by determining whether the first control is within the range of the hot zone, and determines which type of split-screen operation to perform under the premise of performing the split-screen operation (for example, top split-screen operation of the first application, bottom split-screen operation of the first application, left split-screen operation of the first application, Apply right split screen operation, etc.).
- the electronic device can pre-store the position information (four-dimensional coordinates) of each hot zone in the display area.
- the four-dimensional coordinates of the hot zone have the same meaning as the four-dimensional coordinates of the above-mentioned View box.
- the electronic device can determine the range of the preset hot zone in the display area of the electronic device by reading the four-dimensional coordinates of the hot zone.
- the electronic device can determine whether the first control is in the hot zone according to the first position information and the range of the hot zone in the display area, that is: when the two-dimensional coordinates of the first control are within the range of the hot zone, it is determined that the first control is in the hot zone, and the hot zone where the first control is located is the target hot zone; otherwise, the first control is not in the target hot zone.
- the electronic device determines that the first control is in the hot zone, the electronic device triggers a split-screen operation.
- the electronic device adjusts the range of the View frame in the display area based on the hot zone identifier of the target hot zone to obtain a first View frame and a second View frame, wherein the first View frame corresponds to the first application and the second View frame corresponds to the second application.
- the electronic device obtains the identification information of the target hot zone, and according to the obtained identification information, the electronic device can determine what type of split-screen operation should be performed. For example, there are only left hot zones and right hot zones in the display area. If the right hot zone is the target hot zone, the electronic device determines to perform a split-screen operation, and performs a right split-screen operation of the first application with the interface of the first application on the right side. Then, the electronic device can select the four-dimensional coordinates of each corresponding View frame according to the identification information of the target hot zone.
- each View frame According to the four-dimensional coordinates of each View frame, the positions of the top, bottom, left, and right sides of each View frame in the display area are adjusted to obtain a first View frame displaying the motion effect content of the first application and a second View frame displaying the motion effect content of the second application.
- the electronic device displays a second interface, the second interface includes a first motion effect interface and a second motion effect interface, the first motion effect interface displays the motion effect content of the first application, the second motion effect interface displays the motion effect content of the second application, the first View frame includes the first motion effect interface, and the second View frame includes the second motion effect interface.
- the electronic device displays the second interface.
- the second interface includes a first dynamic effect interface and a second dynamic effect interface, the first dynamic effect interface is used to display the dynamic effect content of the first application, and the second dynamic effect interface is used to display the dynamic effect content of the second application.
- the first View frame includes the first dynamic effect interface, and the second View frame includes the second dynamic effect interface.
- the first dynamic effect interface may be the content displayed in the dynamic effect box 112 in FIG. 1C , or a shadow animation of the first application.
- the second dynamic effect interface may be the content displayed in the dynamic effect box 111 in FIG. 1C , or a screenshot of the second application.
- the electronic device In response to a third operation on the first control, the electronic device displays a third interface, and the third interface includes a first split-screen interface and a second split-screen interface, the first split-screen interface is an interface of the first application, and the second split-screen interface is an interface of the second application.
- the third operation may be a hand-raising operation on the drag bar 1011 in FIG. 1C .
- the third interface includes a first split-screen interface and a second split-screen interface.
- the first split-screen interface is the interface of the first application
- the second split-screen interface is the interface of the second application.
- the third interface may be the user interface 12 in FIG. 1D
- the first split-screen interface may be the interface 122 in FIG. 1D
- the second split-screen interface may be the interface 121 in FIG. 1D .
- the electronic device may also display a transition view of the first application in the first View frame.
- Animation Displays the second transition animation of the second application in the second View frame.
- the electronic device after the electronic device detects the user's first operation (for example, a long press operation) on the floating window drag bar, in response to the first operation, the electronic device will determine whether the application corresponding to the current user interface and the application corresponding to the floating window are both applications that support top-bottom split-screen and left-right split-screen. If yes, the electronic device uses an irregular hot zone method to perform split-screen operations. If not, the electronic device uses a regular hot zone method to perform split-screen operations.
- the electronic device uses an irregular hot zone method to perform split-screen operations. If not, the electronic device uses a regular hot zone method to perform split-screen operations.
- the electronic device displays the View frame that displays the dynamic content of the two split-screen applications by adjusting the range of multiple View frames on the same layer on the display area, and displays the dynamic content of the split-screen application on the corresponding View frame.
- the irregular hot zone method to perform split-screen operations, the problem of complex underlying code logic will not occur due to the addition of new layers due to the addition of new View frames, making it difficult for technical personnel to modify and maintain them later.
- the embodiment in FIG. 4 above introduces the process of a screen display method provided in the embodiment of the present application.
- the electronic device includes a first application, a second application and a multi-window management module (HwMultiWindowSwitchManager), the first application and the second application are located in the application layer in the Android system architecture, and the multi-window management module is located in the application framework layer in the Android system architecture.
- HwMultiWindowSwitchManager multi-window management module
- the first application includes a floating window moving module (Bar moving module), and the multi-window management module includes a hot area setting module (AddHotArea), a split-screen animation management module (SetDragAnimationListener), an animation adding module (HwMultiWinPushAcceptView), and an animation frame adjustment module (HwMultiWinPushPendingDropView).
- HiHotArea hot area setting module
- SetDragAnimationListener split-screen animation management module
- HwMultiWinPushAcceptView an animation adding module
- HwMultiWinPushPendingDropView an animation frame adjustment module
- FIG. 6 is a module interaction diagram of a screen display method provided in an embodiment of the present application.
- the interaction process of each module is as follows:
- the floating window moving module sends a first notification message to the hot zone setting module in response to a first operation on a first control in the floating window.
- the first operation may be a long press operation on the drag bar 1011 in the embodiment of FIG. 1A .
- the floating window moving module of the first application After detecting the first operation on the first control, the floating window moving module of the first application responds to the first operation, obtains the first application identifier and the second application identifier, and sends a first notification message to the hot zone setting module.
- the first notification message is used to instruct the hot zone setting module to determine the way to trigger the electronic device to perform a split-screen operation, that is, whether to trigger the electronic device to perform a split-screen operation based on a regular hot zone method or to trigger the electronic device to perform a split-screen operation based on an irregular hot zone method.
- the first notification message may include a first application identifier and may also include a second application identifier, the first application identifier being the application identifier of the first application, and the second application identifier being the application identifier of the second application.
- the hot zone setting module obtains a first application identifier and a second application identifier based on the first notification message, where the first application identifier corresponds to the first application and the second application identifier corresponds to the second application.
- the hot zone setting module determines whether the first application identifier and the second application identifier are both application identifiers in the first whitelist.
- the hot zone setting module obtains the first white list and determines whether the first application identifier and the second application identifier are both application identifiers in the first white list.
- the description of the first white list can refer to the description of the first white list in S402 above, and the present embodiment of the application will not be repeated here.
- the hot zone setting module can call the relevant interface based on the getPackageName function to obtain Take the first whitelist.
- the hot zone setting module sends a first hot zone message to the split-screen animation management module.
- the hot zone setting module determines that the first application and the second application are both applications that support top-bottom split-screen and left-right split-screen.
- the hot zone setting module sends a first hot zone message to the split screen animation management module.
- the first hot zone message is used to indicate that the first application and the second application are both applications that support top-bottom split screen and left-right split screen, that is, the split screen animation module can trigger the split screen operation of the first application and the second application based on irregular hot zones.
- the split screen animation management module can start the first monitor (onDragStarted/onDragExited) and the second monitor (onDragEntered).
- the first monitor is used to monitor the current position information of the first control and calculate the first identifier based on the first position information; the second monitor is used to determine which split screen animation to execute.
- the floating window moving module responds to the second operation on the first control and sends a second notification message to the split-screen animation management module.
- the second operation may be an input operation of the user dragging the drag bar 1011 to the right in the embodiment of FIG. 1B .
- the floating window moving module after the floating window moving module responds to the second operation on the first control, it sends a second notification message to the split screen animation management module.
- the second notification message is used to instruct the split screen animation management module to call the first monitor to calculate the first identifier according to the position of the first control (first position information).
- the split-screen animation management module obtains the first position information of the first control in real time.
- the split-screen animation management module can detect the first position information of the first control in the display area in real time through the first monitor.
- the split-screen animation management module obtains a first identifier according to the first position information.
- the split-screen animation management module since the split-screen animation management module previously receives the first hot zone message sent by the hot zone setting module, the split-screen animation module determines whether to perform a split-screen operation and what type of split-screen operation to perform (first application left split screen or first application right split screen or first application top split screen or first application bottom split screen) by means of irregular hot zones.
- the split-screen animation management module may call the logic function H for calculating the first identifier through the first monitor. Then, the first monitor is called to output the first identifier based on the first position information and H. After calculating the first identifier, the first monitor sends the first identifier to the split-screen animation management module, so that the split-screen animation management module obtains the first identifier.
- the split-screen animation management module sends a third notification message to the animation frame adjustment module, and the third notification message is used to instruct the animation frame adjustment module to adjust the range of the View frame in the display area.
- the third notification message may include the first identifier.
- the animation frame adjustment module adjusts the range of the View frame in the display area according to the third notification message to obtain a first View frame and a second View frame, wherein the first View frame corresponds to the first application and the second View frame corresponds to the second application.
- the animation frame adjustment module obtains the first identifier corresponding to the first identifier according to the first identifier in the third notification message.
- the four-dimensional coordinates of each View frame are obtained.
- the positions of the top, bottom, left, and right sides of each View frame in the display area are adjusted, so as to obtain a first View frame displaying the first application dynamic effect content and a second View frame displaying the second application dynamic effect content.
- the animation frame adjustment module adjusts the range of the View frame in the display area according to the third notification message.
- the motion effect frame adjustment module sends a fourth notification message to the motion effect adding module.
- the motion effect frame adjustment module can send a fourth notification message to the motion effect adding module.
- the fourth notification message is used to instruct the motion effect frame adding module to add and display motion effect content corresponding to the first application and the second application in the first View frame and the second View frame.
- the fourth notification message may include the first identifier, and may also include a mapping relationship between the identifier information of the first View frame and the first application, and a mapping relationship between the identifier information of the second View frame and the second application.
- the motion effect adding module obtains first motion effect information and second motion effect information according to the fourth notification message, wherein the first motion effect information is related to the first application, and the second motion effect information is related to the second application.
- the animation adding module can determine the split-screen animation content of the first application and the second application based on the first identifier in the fourth notification message, the mapping relationship between the identification information of the first View frame and the first application, and the mapping relationship between the identification information of the second View frame and the second application, that is, what kind of content to display in the first View frame and the second View frame.
- the split-screen animation content of the browser application (second application) is the animation box 111 and the browser application icon 1111
- the split-screen animation content of the calculator application is the animation box 112 and the gray background inside the box.
- the animation adding module can call the relevant interface based on the first identifier to obtain the first animation information (for example, the gray background image of the animation box 112 in Figure 1C above) and the second animation information (for example, the icon 1111 of the browser application in Figure 1C above).
- first animation information for example, the gray background image of the animation box 112 in Figure 1C above
- second animation information for example, the icon 1111 of the browser application in Figure 1C above.
- the motion effect adding module displays the first motion effect content in the first View frame, and displays the second motion effect content in the second View frame.
- the first motion effect content corresponds to the first motion effect information
- the second motion effect content corresponds to the second motion effect information
- the animation adding module can display the corresponding elements in the first animation information (for example, the gray background image in the animation box 112 in FIG1C above) and the elements in the second animation information (for example, the icon 1111 of the browser application in FIG1C above) in the first View and the second View frames respectively according to the mapping relationship between the identification information of the first View frame and the first application and the mapping relationship between the identification information of the second View frame and the second application in the fourth notification message.
- the content displayed in the View frame is the content displayed in the first animation interface and the second animation interface in S408 of FIG4 above.
- the floating window moving module responds to the third operation on the first control and sends a fifth notification message to the motion effect adding module.
- the third operation may be a hand-raising operation on the drag bar 1011 in FIG. 1C .
- the fifth notification message is used to indicate that the electronic device is going to display the third interface and end the split-screen animation display.
- the animation adding module sends a first indication message to the first application, and sends a second indication message to the second application.
- the animation adding module may send a first indication message to the first application and send a second indication message to the second application.
- the first indication message and the second indication message may include the first identifier.
- the animation adding module may send the first indication message and the second indication message to the first application and the second application respectively through the Activity task management service module (HwInnerActivityTaskManagerService) located in the Android system application layer.
- Activity Task management service module HwInnerActivityTaskManagerService
- the first instruction message is used to instruct the Activity task module (Activity Task) of the first application to close the floating window, so that the floating window no longer appears on the display screen of the electronic device.
- the first instruction message is also used to instruct the Activity task module (Activity Task) of the first application to display the split-screen interface (first split-screen interface) of the first application on the display screen.
- the position of the split screen interface of the first application can be determined according to the first identifier.
- the first identifier represents the upper split screen of the first application.
- the first split screen interface is above the second screen interface (for example, the first split screen interface 141 shown in FIG. 1G above).
- the second indication message is used to instruct the Activity task module (Activity Task) of the second application to display the split-screen interface (second split-screen interface) of the second application on the display screen.
- the position of the split screen interface of the second application can be determined according to the first identifier.
- the first identifier represents the upper split screen of the first application.
- the second split screen interface is below the first screen interface (for example, the second split screen interface 142 shown in FIG. 1G above).
- a transition motion effect content with a duration of t may be played in the first View frame and the second View frame based on the first identifier.
- S615 The first application displays a first split-screen interface on the third interface, and the second application displays a second split-screen interface on the third interface.
- the first application closes the floating window through the Activity task module.
- FIG 7 is a module interaction diagram of another screen display method provided by an embodiment of the present application.
- the interaction process of each module is as follows:
- the floating window moving module sends a first notification message to the hot zone setting module in response to a first operation on a first control in the floating window.
- the hot zone setting module obtains a first application identifier and a second application identifier based on the first notification message, where the first application identifier corresponds to the first application and the second application identifier corresponds to the second application.
- the hot zone setting module determines whether the first application identifier and the second application identifier are both application identifiers in the first whitelist.
- the hot zone setting module sends a second hot zone message to the split-screen animation management module.
- the hot zone setting module determines that the first application and/or the second application only supports top-bottom split-screen or left-right split-screen applications.
- the hot zone setting module sends a second hot zone message to the split screen animation management module.
- the second hot zone message is used to indicate that the first application and the second application are not both applications that support top-bottom split screen and left-right split screen, that is, to prompt the split screen animation module to trigger the split screen operation of the first application and the second application based on the regular hot zone method.
- the floating window moving module responds to the second operation on the first control and sends a second notification message to the split-screen animation management module.
- the split-screen animation management module obtains the first position information of the first control in real time.
- the split screen animation management module can start the first monitor (onDragStarted/onDragExited) and the second monitor (onDragEntered).
- the first monitor is used to monitor the current position information of the first control and determine whether the first control is in the hot zone; the second monitor is used to determine which split screen animation to execute.
- the split-screen animation management module determines whether the first control is within the target hot zone according to the first position information.
- the split-screen animation module determines whether the drag bar of the floating window is in the hot zone according to the first position information (x, y) obtained by the first monitor and the four-dimensional coordinates of the hot zone, that is, whether (x, y) is within the range defined by the four-dimensional coordinates of the hot zone. If it is in the hot zone, the hot zone where the drag bar of the floating window is located is the target hot zone, and the split-screen animation module will also obtain the identification information of the target hot zone.
- split-screen animation management module determines whether the first control is in the target hot zone based on the first position information.
- the third notification message includes identification information of the target hot zone, and the identification information can be used to indicate what type of split screen operation is performed, for example, an upper split screen operation, a lower split screen operation, a left split screen operation, a right split screen operation, etc. of the first application.
- the animation frame adjustment module adjusts the range of the View frame in the display area of the electronic device based on the third notification message to obtain a first View frame and a second View frame, wherein the first View frame corresponds to a first application and the second View frame corresponds to a second application.
- the animation frame adjustment module obtains the four-dimensional coordinates of each View frame corresponding to the application identifier according to the identification information of the target hot zone in the third notification message, and adjusts the positions of the top, bottom, left, and right sides of each View frame in the display area according to the obtained four-dimensional coordinates of each View frame, thereby obtaining a first View frame displaying the animation content of the first application and a second View frame displaying the animation content of the second application.
- the motion effect frame adjustment module sends a fourth notification message to the motion effect adding module.
- the motion effect adding module obtains first motion effect information and second motion effect information according to the fourth notification message, wherein the first motion effect information is related to the first application, and the second motion effect information is related to the second application.
- the motion effect adding module displays the first motion effect content in the first View frame, and displays the second motion effect content in the second View frame.
- the floating window moving module responds to the third operation on the first control and sends a fifth notification message to the motion effect adding module.
- the animation adding module sends a first indication message to the first application, and sends a second indication message to the second application.
- S715 The first application displays a first split-screen interface on the third interface, and the second application displays a second split-screen interface on the third interface.
- S701 to S703 and S710 to S715 may refer to the related descriptions of S601 to S603 and S610 to S615 mentioned above, which will not be repeated here.
- FIG. 8 is a schematic diagram of the hardware structure of the electronic device 100 provided in the embodiment of the present application.
- the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 125, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 148, a battery 149, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
- SIM subscriber identification module
- the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, a proximity light sensor 180L, a bone conduction sensor 180M, etc.
- the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
- the electronic device 100 may include more or fewer components than those shown in FIG8, or combine certain components, or separate certain components, or arrange the components differently.
- the components shown in FIG8 may be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc.
- AP application processor
- GPU graphics processor
- ISP image signal processor
- controller a memory
- video codec a digital signal processor
- DSP digital signal processor
- NPU neural-network processing unit
- Different processing units may be independent devices or integrated in one or more processors.
- the wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
- Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas.
- antenna 1 can be reused as a diversity antenna for a wireless local area network.
- the antenna can be used in combination with a tuning switch.
- the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the electronic device 100.
- the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
- the mobile communication module 150 may receive electromagnetic waves from the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
- the mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
- at least some of the functional modules of the mobile communication module 150 may be arranged in the processor 110.
- at least some of the functional modules of the mobile communication module 150 may be arranged in the same device as at least some of the modules of the processor 110.
- the wireless communication module 160 can provide the electronic device 100 with wireless local area network (WLAN)
- the wireless communication module 160 can be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110.
- the wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
- the electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor.
- the GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.
- the GPU is used to perform mathematical and geometric calculations for graphics rendering.
- the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
- the display screen 194 is used to display images, videos, etc.
- the display screen 194 includes a display panel.
- the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc.
- the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
- the electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
- ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise and brightness of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
- the digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
- NPU is a neural network (NN) computing processor.
- NN neural network
- applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
- the electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
- the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.
- the audio module 170 can also be used to encode and decode audio signals.
- the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
- the speaker 170A also called a "speaker" is used to convert an audio electrical signal into a sound signal.
- the electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
- the receiver 170B also called a "handset" is used to convert the audio electrical signal into a sound signal.
- the voice can be answered by placing the receiver 170B close to the human ear.
- Microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C.
- the electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, and directional recording functions, etc.
- the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
- the pressure sensor 180A can be disposed on the display screen 194 .
- the touch sensor 180K is also called a "touch panel”.
- the touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen”.
- the touch sensor 180K is used to detect touch operations acting on or near it.
- the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
- Visual output related to the touch operation can be provided through the display screen 194.
- the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
- FIG9 is a software structure diagram of the electronic device 100 provided in an embodiment of the present application when performing split-screen operation based on irregular hot zones.
- the layered architecture divides the software into several layers, each with clear roles and division of labor.
- the layers communicate with each other through software interfaces.
- the Android system is divided into four layers, namely, from top to bottom, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.
- the application layer may include a series of application packages.
- the application package may include the first application, the second application, and the task management service module in the above-mentioned embodiments of FIG6 and FIG7 .
- both the first application and the second application include an Activity task module, and the first application also includes a floating window moving module.
- the first application also includes a floating window moving module.
- the floating window moving module is used to send a first notification message to the hot zone setting module after responding to the first operation on the first control, so as to instruct the hot zone setting module to determine a way to trigger the electronic device to perform a split-screen operation;
- the floating window and mobile module is also used to send a second notification message to the split-screen animation management module in real time after responding to the second operation on the first control, so as to instruct the split-screen animation management module to calculate the first identifier according to the position of the first control;
- the floating window moving module is further used to send a fifth notification message to the dynamic effect adding module in response to the third operation on the first control, so as to notify the dynamic effect adding module that the electronic device is to display the third interface and end the split-screen dynamic effect display;
- the Activity task module in the first application is used to close the floating window and display the first split-screen interface in the third interface after receiving the first indication message;
- the Activity task module in the second application is used to display the second split-screen interface in the third interface after receiving the second indication message;
- the task management service module is used to receive the first indication message and the second indication message sent by the animation adding module, and send the first indication message to the Activity task module in the first application, and send the second indication message to the Activity task module in the second application.
- the application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer.
- API application programming interface
- the application framework layer includes some predefined functions.
- the application framework layer may include the multi-window management module in the above-mentioned embodiments of FIG. 6 and FIG. 7 .
- the window management module includes a hot zone setting module, a split-screen motion effect management module, a motion effect frame adjustment module, and a motion effect adding module.
- the hot zone setting module is used to determine whether the application identifiers of the first application and the second application are in the first whitelist after receiving the first notification message sent by the floating window moving module. If so, the first hot zone message is sent to the split screen animation management module to instruct the split screen animation module to trigger the split screen operation of the first application and the second application based on the irregular hot zone.
- the split-screen animation management module is used to receive the second notification message, calculate the first identifier, and send the first identifier to the animation frame adjustment module.
- the dynamic effect frame adjustment module is used to adjust the range of the View frame in the display area according to the first identifier to obtain the first View frame and the second View frame.
- the motion effect frame adjustment module is also used to send a fourth notification message to the motion effect adding module to instruct the motion effect adding module to add and display motion effect content corresponding to the first application and the second application in the first View frame and the second View frame.
- the animation adding module is used to add and display animation content corresponding to the first application and the second application in the first View frame and the second View frame after receiving the fourth notification message.
- the animation adding module is also used to send a first indication message and a second indication message to the task management service module after receiving the fifth notification message.
- Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for the scheduling and management of the Android system.
- the core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
- the application layer and the application framework layer run in a virtual machine.
- the virtual machine executes the Java files of the application layer and the application framework layer as binary files.
- the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
- the system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
- functional modules such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
- the surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
- the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
- the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
- the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
- a 2D graphics engine is a drawing engine for 2D drawings.
- the kernel layer is the layer between hardware and software.
- the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
- FIG10 is a software structure block diagram of the electronic device 100 provided in an embodiment of the present application when performing split-screen operation in a regular hot zone manner.
- the split-screen animation management module is used to receive the second notification message and determine whether the first control is in the target hot zone. If it is in the target hot zone, the identification information of the target hot zone is sent to the animation frame adjustment module.
- the dynamic frame adjustment module is used to adjust the range of the View frame in the display area according to the identification information of the target information.
- the first View frame and the second View frame are used to adjust the range of the View frame in the display area according to the identification information of the target information.
- the computer program product includes one or more computer instructions.
- the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
- the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
- the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated.
- the available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk), etc.
- the modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
- the aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本申请提供一种屏幕显示方法及相关电子设备,该方法包括:根据悬浮窗应用和当前显示界面的应用是否均支持上下分屏的情况,确定是基于规则热区的方式进行分屏操作还是基于不规则热区的方式进行分屏操作。在开始分屏操作后,通过调整同一图层上View框的大小和位置来得到显示动效内容的View框。避免了要新添加View框而造成新添加图层,从而导致代码复杂,不利于后期技术人员进行技术维护的问题。
Description
本申请要求于2023年03月15日提交中国专利局、申请号为202310278303.9、申请名称为“一种屏幕显示方法及相关电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及屏幕显示领域,尤其涉及一种屏幕显示方法及相关电子设备。
近年来,平板电脑和折叠屏手机等电子设备由于屏幕大,方便分屏,使得用户可以在一块屏幕上对两个应用程序进行操作,提高了用户的使用体验,因而受到青睐。例如,对于平板电脑而言,可以使用平板电脑的分屏功能将视频应用和办公软件进行左右分屏,从而在平板电脑的屏幕上同时显示视频播放界面和文本编辑界面。这样,用户就可以在使用平板电脑观看视频的同时,进行文档编辑,让用户娱乐休闲两不误。
发明内容
本申请实施例提供了一种屏幕显示方法及相关电子设备,该方法解决了分屏过程中,因要显示分屏动效需要额外添加图层,导致代码复杂,从而使得后期技术人员难以进行技术维护的问题。
第一方面,本申请实施例提供了一种屏幕显示方法,应用于具备显示屏的电子设备,该方法包括:显示第一界面,在第一界面上显示有悬浮窗,悬浮窗包括第一控件,悬浮窗对应第一应用,第一界面对应第二应用;响应针对第一控件的第一操作,将悬浮窗设置为第一模式,第一模式为悬浮窗可在显示屏上移动的工作模式;若第一应用和第二应用均为支持上下分屏和左右分屏的应用,在显示屏的显示区域的上、下、左、右四个方向分别确定一个或多个热区;若第一应用和第二应用不均为支持上下分屏和左右分屏的应用,在显示屏的显示区域的上、下两个方向或左、右两个方向分别确定一个或多个形状规则的热区;响应针对第一控件的第二操作,移动悬浮窗在显示屏中的位置;在第一控件移动到任意一个热区范围内的情况下,显示第二界面,第二界面包括第一View框和第二View框,第一View框显示第一应用的动效内容,第二View框显示第二应用的动效内容,第一View框和第二View框在同一图层上;在显示所述第二界面的过程中,响应针对第一控件的第三操作,显示第三界面,第三界面包括第一分屏界面和第二分屏界面,第一分屏界面对应第一应用,第二分屏界面对应第二应用。
在上述实施例中,电子设备根据第一应用和第二应用支持上下分屏和/或左右分屏的情况,在显示屏上确定两种不同热区的设置方式。然后,在电子设备检测到第一控件在任意热区内,触发分屏操作,随后显示分屏动效内容。由于显示分屏动效内容的View框是在同一个图层上。因此,避免了传统基于不规则热区的方式进行分屏操作,需要再添加一个带有新涂层的View框显示分屏动效内容,进而造成代码复杂,不利于后期技术人员维护的问题。
结合第一方面,在一种可能实现的方式中,第三界面上还包括分屏切换控件,显示第三界面之后,还包括:响应针对分屏切换控件的第四操作,若第三界面为上下分屏界面,将第三界面切换为左右分屏界面;若第三界面为左右分屏界面,将第三界面切换为上下分屏界面。这样,用户可以在已有的分屏界面上进行左右分屏/上下分屏的切换,避免了因用户需要切换分屏而要执行“退出当前分屏、拖动悬浮窗、进入分屏”的繁琐操作,提高了用户的使用体验。
结合第一方面,在一种可能实现的方式中,响应针对第二控件的第二操作之前,还包括:获取第一应用标识和第二应用标识,第一应用标识为第一应用的标识信息,第二应用标识述第二应用的标识信息;判断第一应用标识和第二应用标识是否均为第一白名单内的标识信息;若为是,第一应用和第二应用均为支持上下分屏和左右分屏的应用;若为否,第一应用和第二应用不均为支持上下分屏和左右分屏的应用。这样,通过白名单的方式判断第一应用和第二应用支持分屏的情况,有利于电子设备根据第一应用和第二应用支持的分屏情况确定热区的设置方式。
结合第一方面,在一种可能实现的方式中,在显示屏的显示区域包括N个形状为矩形的View框,每个View框均包括上、下、左、右四条边,每个View框在显示区域中的位置和范围通过四维坐标(Xi,Yi,Zi,Ki)来表示;其中,Xi表示第i个View框的左边与第一边缘的距离,Yi表示第i个View框的右边与第一边缘的距离,Zi表示第i个View框的上边与第二边缘的距离,Ki表示第i个View框的下边与第二边缘的距离;第一边缘为所述显示屏与所述左边和所述右边平行的边,所述第二边缘为所述显示屏与所述上边和所述下边平行的边,N为大于1的整数。
结合第一方面,在一种可能实现的方式中,在第一应用和所述第二应用均为支持上下分屏和左右分屏的应用的情况下,显示第二界面,具体包括:获取第一控件的第一位置信息;基于第一位置信息计算第一标识;根据第一标识获取对应的N个View框的四维坐标;基于这N个四维坐标对应调整每个View框在所述显示屏中的范围,得到第一View框和第二View框;在第一View框中显示第一应用的动效内容,在第二View框中显示第二应用的动效内容。
结合第一方面,在一种可能实现的方式中,在第一应用和第二应用不均为支持上下分屏和左右分屏的应用的情况下,显示第二界面,具体包括:获取第一控件的第一位置信息;根据热区的四维坐标获取热区在显示屏中的范围;在基于第一位置信息确定第一控件在任意一个热区中的情况下,获取第一控件所在热区的标识信息;基于该标识信息获取对应的N个View框的四维坐标;基于这N个四维坐标对应调整每个View框在显示屏中的范围,得到第一View框和第二View框;在第一View框中显示第一应用的动效内容,在第二View框中显示第二应用的动效内容。
结合第一方面,在一种可能实现的方式中,该电子设备包括分屏动效管理模块、动效框调整模块以及动效添加模块,若第一应用和第二应用均为支持上下分屏和左右分屏的应用,显示第二界面,包括:分屏动效管理模块根据所述第一控件的第一位置信息计算第一标识;
分屏动效管理模块向动效框调整模块发送第三通知消息,所述第三通知消息包括所述第一标识;动效框调整模块根据第一标识获取对应的N个View框的四维坐标;动效调整模块根据这N个View框的四维坐标调整该显示屏中对应N个View框的范围,得到第一View框和第二View框;动效调整模块向动效添加模块发送第四通知消息,第四通知消息包括第一标识、第一View框与第一应用的第一映射关系、第二View框与第二应用的第二映射关系;动效添加模块根据第一标识获取第一应用的动效内容和第二应用的动效内容;动效添加模块根据第一映射关系将第一应用的动效内容显示在第一View框上;动效添加模块根据第二映射关系将第二应用的动效内容显示在第二View框上。
结合第一方面,在一种可能实现的方式中,电子设备包括分屏动效管理模块、动效框调整模块以及动效添加模块,若第一应用和第二应用不均为支持上下分屏和左右分屏的应用,显示第二界面,包括:分屏管理模块在基于第一控件的第一位置信息判断第一控件在热区范围内的情况下,向动效框调整模块发送第三通知消息,第三通知消息包括第一控件所在热区的标识信息;动效框调整模块根据标识信息获取对应的N个View框的四维坐标;动效调整模块根据这N个View框的四维坐标调整显示屏中对应N个View框的范围,得到第一View框和第二View框;动效调整模块向动效添加模块发送第四通知消息,第四通知消息包括该标识信息、第一View框与第一应用的第一映射关系、第二View框与第二应用的第二映射关系;动效添加模块根据该标识信息获取第一应用的动效内容和第二应用的动效内容;动效添加模块根据第一映射关系将第一应用的动效内容显示在第一View框上;动效添加模块根据第二映射关系将第二应用的动效内容显示在第二View框上。
结合第一方面,在一种可能实现的方式中,电子设备还包括第一应用的悬浮窗移动模块、热区设置模块,所述显示第二界面之前,还包括:悬浮窗移动模块响应第一操作,向热区设置模块发送第一通知消息,第一通知消息包括第一应用标识和第二应用标识,第一应用标识为第一应用的标识信息,第二应用标识为第二应用的标识信息;热区设置模块判断第一应用标识和第二应用标识是否均为在第一白名单内的应用标识;若为是,所述热区设置模块向分屏动效管理模块发送第一热区信息,第一热区信息用于指示第一应用和第二应用均为支持上下分屏和左右分屏的应用;若为否,热区设置模块向分屏动效管理模块发送第二热区信息,第二热区信息用于指示第一应用和第二应用不均为支持上下分屏和左右分屏的应用。
结合第一方面,在一种可能实现的方式中,热区设置模块向分屏动效管理模块发送第一热区信息之后或热区设置模块向分屏动效管理模块发送第二热区信息之后,还包括:悬浮窗移动模块响应第二操作,向分屏动效管理模块发送第二通知消息,第二通知消息用于提示所述分屏动效管理模块获取第一控件的第一位置信息;分屏动效管理模块实时获取第一控件的第一位置信息。
结合第一方面,在一种可能实现的方式中,显示第二界面之后,还包括:悬浮窗移动模块响应第三操作,向动效添加模块发送第五通知消息;动效添加模块向第一应用发送第一指示消息,第一指示消息包括第一标识;动效添加模块向第二应用发送第二指示消息,第二指示消息包括第一标识;第一应用基于第一标识在第三界面上显示第一分屏界面;第二应用基于第一标识在第三界面上显示第二分屏界面。
结合第一方面,在一种可能实现的方式中,显示第二界面之后,还包括:悬浮窗移动模块响应第三操作,向动效添加模块发送第五通知消息;动效添加模块向所述第一应用发送第一指示消息,所述第一指示消息包括第一控件所在热区的标识信息;动效添加模块向第二应用发送第二指示消息,第二指示消息包括第一控件所在热区的标识信息;第一应用基于第一控件所在热区的标识信息在第三界面上显示第一分屏界面;第二应用基于第一控件所在热区的标识信息在第三界面上显示第二分屏界面。
第二方面,本申请实施例提供了一种电子设备,该电子设备包括:一个或多个处理器、显示屏和存储器;该存储器与该一个或多个处理器耦合,该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,该一个或多个处理器调用该计算机指令以使得该电子设备执行:通过显示屏显示第一界面,在第一界面上显示有悬浮窗,悬浮窗包括第一控件,悬浮窗对应第一应用,第一界面对应第二应用;响应针对第一控件的第一操作,将悬浮窗设置为第一模式,第一模式为悬浮窗可在显示屏上移动的工作模式;若第一应用和第二应用均为支持上下分屏和左右分屏的应用,在显示屏的显示区域的上、下、左、右四个方向分别确定一个或多个热区;若第一应用和第二应用不均为支持上下分屏和左右分屏的应用,在显示屏的显示区域的上、下两个方向或左、右两个方向分别确定一个或多个形状规则的热区;响应针对第一控件的第二操作,移动悬浮窗在显示屏中的位置;在第一控件移动到任意一个热区范围内的情况下,通过显示屏显示第二界面,第二界面包括第一View框和第二View框,第一View框显示第一应用的动效内容,第二View框显示第二应用的动效内容,第一View框和第二View框在同一图层上;在显示所述第二界面的过程中,响应针对第一控件的第三操作,通过显示屏显示第三界面,第三界面包括第一分屏界面和第二分屏界面,第一分屏界面对应第一应用,第二分屏界面对应第二应用。
结合第二方面,在一种可能实现的方式中,该一个或多个处理器调用该计算机指令以使得该电子设备执行:响应针对分屏切换控件的第四操作,若第三界面为上下分屏界面,将第三界面切换为左右分屏界面;若第三界面为左右分屏界面,将第三界面切换为上下分屏界面。
结合第二方面,在一种可能实现的方式中,该一个或多个处理器调用该计算机指令以使得该电子设备执行:获取第一应用标识和第二应用标识,第一应用标识为第一应用的标识信息,第二应用标识述第二应用的标识信息;判断第一应用标识和第二应用标识是否均为第一白名单内的标识信息;若为是,第一应用和第二应用均为支持上下分屏和左右分屏的应用;若为否,第一应用和第二应用不均为支持上下分屏和左右分屏的应用。
结合第二方面,在一种可能实现的方式中,该一个或多个处理器调用该计算机指令以使得该电子设备执行:获取第一控件的第一位置信息;基于第一位置信息计算第一标识;根据第一标识获取对应的N个View框的四维坐标;基于这N个四维坐标对应调整每个View框在所述显示屏中的范围,得到第一View框和第二View框;通过显示屏在第一View框中显示第一应用的动效内容,通过显示屏在第二View框中显示第二应用的动效内容。
结合第二方面,在一种可能实现的方式中,该一个或多个处理器调用该计算机指令以使得该电子设备执行:获取第一控件的第一位置信息;根据热区的四维坐标获取热区在显
示屏中的范围;在基于第一位置信息确定第一控件在任意一个热区中的情况下,获取第一控件所在热区的标识信息;基于该标识信息获取对应的N个View框的四维坐标;基于这N个四维坐标对应调整每个View框在显示屏中的范围,得到第一View框和第二View框;通过显示屏在第一View框中显示第一应用的动效内容,通过显示屏在第二View框中显示第二应用的动效内容。
第三方面,本申请实施例提供了一种电子设备,包括:触控屏、摄像头、一个或多个处理器和一个或多个存储器;所述一个或多个处理器与所述触控屏、所述摄像头、所述一个或多个存储器耦合,所述一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,使得所述电子设备执行如第一方面或第一方面的任意一种可能实现的方式所述的方法。
第四方面,本申请实施例提供了一种芯片系统,该芯片系统应用于电子设备,该芯片系统包括一个或多个处理器,该处理器用于调用计算机指令以使得该电子设备执行如第一方面或第一方面的任意一种可能实现的方式所述的方法。
第五方面,本申请实施例提供了一种包含指令的计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行如第一方面或第一方面的任意一种可能实现的方式所述的方法。
第六方面,本申请实施例提供了一种计算机可读存储介质,包括指令,当该指令在电子设备上运行时,使得该电子设备执行如第一方面或第一方面的任意一种可能实现的方式所述的方法。
图1A-图1J是本申请实施提供的一种应用场景示例图;
图2A是本申请实施提供的一种电子设备在横屏模式下的热区分布示例图;
图2B是本申请实施提供的一种电子设备在竖屏模式下的热区分布示例图;
图2C是本申请实施提供的一种电子设备在横屏模式下的View框分布示例图;
图2D是本申请实施提供的一种电子设备的显示区域的View框布局图;
图3A是本申请实施提供的一种电子设备100的不规则热区划分示例图;
图3B-图3D是本申请实施提供的一组电子设备100的用户界面示例图;
图4是本申请实施例提供的一种屏幕显示方法的流程图;
图5A是本申请实施提供的另一种电子设备的显示区域的View框布局图;
图5B是本申请实施提供的一种电子设备处于横屏模式的示例图;
图5C是本申请实施提供的一种电子设备处于竖屏模式的示例图;
图6是本申请实施例提供的一种屏幕显示方法的模块交互图;
图7是本申请实施例提供的另一种屏幕显示方法的模块交互图;
图8是本申请实施例提供的电子设备100的硬件结构示意图;
图9是本申请实施例提供的电子设备100在基于不规则热区的方式进行分屏操作的情况下的软件结构框图;
图10是本申请实施例提供的电子设备100在基于规则热区的方式进行分屏操作的情况下的软件结构框图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或者特性可以包含在本实施例申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是相同的实施例,也不是与其它实施例互斥的独立的或是备选的实施例。本领域技术人员可以显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书及所述附图中术语“第一”、“第二”、“第三”等是区别于不同的对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如,包含了一系列步骤或单元,或者可选地,还包括没有列出的步骤或单元,或者可选地还包括这些过程、方法、产品或设备固有的其它步骤或单元。
附图中仅示出了与本申请相关的部分而非全部内容。在更加详细地讨论示例性实施例之前,应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各项操作(或步骤)描述成顺序的处理,但是其中的许多操作可以并行地、并发地或者同时实施。此外,各项操作的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。
在本说明书中使用的术语“部件”、“模块”、“系统”、“单元”等用于表示计算机相关的实体、硬件、固件、硬件和软件的组合、软件或执行中的软件。例如,单元可以是但不限于在处理器上运行的进程、处理器、对象、可执行文件、执行线程、程序和/或分布在两个或多个计算机之间。此外,这些单元可从在上面存储有各种数据结构的各种计算机可读介质执行。单元可例如根据具有一个或多个数据分组(例如来自与本地系统、分布式系统和/或网络间的另一单元交互的第二单元数据。例如,通过信号与其它系统交互的互联网)的信号通过本地和/或远程进程来通信。
近年来,平板电脑和折叠屏手机等电子设备由于屏幕大,方便分屏,使得用户可以在一块屏幕上对两个应用程序进行操作,提高了用户的使用体验,因而受到青睐。例如,对于平板电脑而言,可以使用平板电脑的分屏功能将视频应用和办公软件进行左右分屏,从
而在平板电脑的屏幕上同时显示视频播放界面和文本编辑界面。这样,用户就可以在使用平板电脑观看视频的同时,进行文档编辑,让用户娱乐休闲两不误。
为了便于更好地了解上述应用场景,下面,结合图1A-图1J对本申请实施例涉及的应用场景进行示例性地说明。在本申请实施例中,以电子设备100为例,进行说明。其中,电子设备100可以为智能手机,也可以为折叠屏手机,也可以为平板电脑,还可以为其它类型的终端设备,本申请实施例对此不做限制。
如图1A为电子设备100的用户界面10,用户界面10是浏览器应用的一个示例性界面。在用户界面10中显示悬浮窗101,该悬浮窗101是计算器应用的对应的悬浮窗。在用户界面10中,悬浮窗101可以接受用户的操作在用户界面10上移动。
示例性的,当电子设备100检测到用户针对悬浮窗101上的拖动条1011的长按操作(第一操作)后,响应该操作,电子设备100将悬浮窗101设置为“可拖拽”模式(第一模式),即:用户可以通过拖动条1011将悬浮窗101在用户界面10上进行拖拽移动。
如图1B所示,在悬浮窗101处于“可拖拽”的模式下,响应于用户针对拖动条1011的第二操作(例如,将悬浮窗101向屏幕右边拖拽),电子设备100将悬浮窗101及其拖动条1011随用户手势的移动方向移动到屏幕右方。用户此时继续将悬浮窗101向右拖拽,在t1时刻,电子设备100检测到拖动条1011进入区域102后,电子设备100开始进行左右分屏,并显示如图1C所示的用户界面11。
如图1C所示,用户界面11是电子设备100在进行左右分屏过程中示例性的动效界面。其中,动效框111为浏览器应用的动效框,在该动效框中可以显示浏览器的分屏动效。例如,浏览器应用的图标1111。动效框112为计算器应用的动效框,在该动效框中可以显示计算器的分屏动效。例如灰色的背景图、计算器应用的悬浮窗1121、计算器应用的应用图标1122以及悬浮窗的拖动条1011。此时,用户的手指依旧长按拖动条1011。当电子设备100检测到用户针对拖动条1011的第三操作(例如,抬手松开拖动条1011)后,响应第三操作,电子设备100显示如图1D所示的用户界面12。
如图1D所示,用户界面12为电子设备100对浏览器应用和计算器应用进行左右分屏后的示例性用户界面。在用户界面12中包括浏览器应用的界面121(第二分屏界面)和计算器应用的界面122(第一分屏界面)。用户可以在不同的分屏界面中进行不同的操作。例如,可以通过第二分屏界面浏览新闻、上网查资料等,在第一分屏界面中进行数据计算等等。
上述图1A-图1D实施例对电子设备100进行左右分屏的应用场景进行了示例性地说明。在一些实施例中,电子设备还可以进行上下分屏,从而得到不同的分屏显示效果。
例如,在图1E的用户界面10中,当电子设备100检测到用户针对计算器应用的悬浮窗101中拖动条1011的第一操作(例如,长按拖动条1011),响应第一操作,悬浮窗101进入“可拖拽”模式(第一模式)。此时,当电子设备100检测到用户针对拖动条1011的第二操作(例如,将拖动条1011向上拖动),响应第二操作,悬浮窗101随用户手势移动的方向向上移动。当电子设备100检测到拖动条1011在区域104内时,电子设备100显示如图1F所示的用户界面13。
如图1F所示,用户界面13是电子设备100在进行上下分屏过程中示例性的动效界面。其中,动效框131为浏览器应用的动效框,在该动效框中可以显示浏览器的动效内容。例如,浏览器的应用图标1311。动效框132为计算器应用的动效框,在该动效框中显示计算器应用的动效内容。例如,悬浮窗1321、灰色背景图、计算器应用图标1322以及拖动条1011。此时,用户的手指依旧长按拖动条1011。当电子设备100检测到用户针对拖动条1011的第三操作(例如,抬手松开拖动条1011)后,响应第三操作,电子设备100显示如图1G所示的用户界面14。
如图1G所示,用户界面14为电子设备100对浏览器应用和计算器应用进行上下分屏后的示例性用户界面。在用户界面14中包括浏览器应用的界面142(第二分屏界面)和计算器应用的界面141(第一分屏界面)。用户可以在不同的分屏界面中进行不同的操作。例如,可以通过第二分屏界面浏览新闻、上网等,在第一分屏界面中进行数据计算等等。
在一些实施例中,上下分屏界面和左右分屏界面之间可以进行切换。例如,在用户界面12和用户界面14中分别包括分屏切换控件123和分屏切换控件143。在用户界面12中,当电子设备100检测到针对分屏切换控件123的输入操作(例如,单击)后,响应该输入操作,电子设备100可以将用户界面12切换为用户界面14,即:将左右分屏界面切换为上下分屏界面。在用户界面14中,当电子设备100检测到针对分屏切换控件143的输入操作(例如,单击)后,响应该输入操作,电子设备100可以将用户界面14切换为用户界面12,即:将上下分屏界面切换为左右分屏界面。
在上述图1A-图1G实施例中主要对电子设备100在横屏状态下进行左右分屏或上下分屏的应用场景进行了介绍。在一些应用场景中,电子设备100可以根据用户手持电子设备100的状态,进行横屏/竖屏的切换。在竖屏状态下,电子设备100也可以进行悬浮窗的分屏。下面,仅以电子设备100在竖屏状态下进行上下分屏为例,进行说明。
如图1H所示,用户界面15为电子设备100在竖屏状态下的示例性用户界面。该用户界面为浏览器应用的界面,在该用户界面中显示计算器应用的悬浮窗151以及该悬浮窗对应的拖动条1511。当电子设备100检测到用户针对拖动条1511的第一操作(例如,长按拖动条1511),响应第一操作,悬浮窗151进入“可拖拽”模式。此时,若电子设备100检测到用户的第二操作(例如,将拖动条1511向上拖动),响应第二操作,电子设备100将悬浮窗151跟随手指的移动方向向上移动。当电子设备100检测到拖动条进入区域152内,电子设备100显示如图1I所示的用户界面16。
在图1I中,用户界面16为电子设备100在竖屏界面下进行上下分屏过程中的示例性动效界面。其中,在该动效界面中包括第一动效框161和第二动效框162。在第一动效框161中显示计算器应用的动效内容。例如,悬浮窗1611、灰色背景图以及计算器的应用图标1612。在第二动效框162中显示浏览器应用的动效内容。例如,应用图标1612。若此时,电子设备100检测到针对拖动条1511的第三操作(例如,抬手松开拖动条1511),响应第三操作,电子设备100会显示如图1J所示的用户界面17。
在图1J中,用户界面17是电子设备100在竖屏状态下上下分屏的示例性界面。在用户界面17中包括第一分屏界面172(计算器应用的界面)和第二分屏界面171(浏览器应用的界面)。在一些应用场景中,用户界面17还可以包括分屏切换控件173。当电子设备
100检测到用户针对分屏切换控件173的输入操作(例如,单击),响应该输入操作,电子设备100在竖屏状态下会将上下分屏切换为左右分屏。
在一些实施例中,应用分屏界面所在的位置,可以与悬浮窗拖动的方向相关。例如,在上述图1A-图1D的实施例中,由于电子设备100响应用户针对拖动条的第二操作将悬浮窗101向右移动,因此,在图1D的用户界面中,电子设备将计算器应用的分屏界面显示在右侧,将浏览器应用的分屏界面显示在左侧。又例如,在上述图1E-图1J实施例中,由于电子设备100响应用户针对拖动条的第二操作将悬浮窗151向上移动。因此,在图1J的用户界面中,电子设备将计算器应用的分屏界面显示在上侧,将浏览器应用的分屏界面显示在下侧。
应当理解的是,上述图1A-图1J实施例仅是本申请实施例对电子设备100进行分屏的应用场景进行示例性说明。
下面,对电子设备100进行分屏显示的两种原理进行示例性地说明。电子设备一般是通过检测悬浮窗的拖动条是否进入热区来判断是否触发分屏操作的。当电子设备判断悬浮窗的拖动条在热区范围内,电子设备触发分屏操作。当电子设备判断悬浮窗的拖动条未在热区范围内,电子设备不触发分屏操作。
电子设备进行分屏操作的主要有以下三个过程:触发分屏操作、显示分屏动效、显示分屏界面。其中,触发分屏操作主要是通过判断悬浮窗的拖动条是否在热区范围内来实现的。这里所述的热区可以理解为在屏幕显示区域上划定的特定范围的、不面向用户(用户不可见)的区域。热区可以分为规则热区和不规则热区。在本申请实施例中,规则热区可以理解为形状为矩形的热区,不规则热区可以理解为形状为非矩形(例如,三角形、圆形等)的热区。对于规则热区和不规则热区而言,其触发分屏操作以及显示分屏动效的原理也会有所不同。为了便于理解,下面,本申请实施例将分别对电子设备100基于规则热区进行分屏操作和基于不规则热区进行分屏操作的原理进行介绍。
首先,对电子设备100基于规则热区进行分屏操作的原理进行示例性地介绍。
在图2A中,电子设备100的显示区域包括两个形状均为矩形的热区,分别为热区1和热区2。对于热区1和热区2,电子设备100要首先记录这两个区域在屏幕区域的位置,采用的方法是通过记录每个热区与显示区域边缘的距离来记录热区在显示区域的范围,从而定义热区。
由于每个热区的形状都是矩形,可以发现,每个热区的4条边其实是与屏幕边缘的上下边/左右边平行的。假设以显示区域(显示屏)的左边缘(S1)和下边缘(S2)为基准来定义热区,将每个热区的左边、右边、上边和下边与S1/S2的距离用一个四维坐标来进行定义。那么,热区的范围可以用(X,Y,Z,K)来表示。其中,X表示热区的左边与显示区域的左边缘(在图2A中是S1)的距离,Y表示热区的右边与显示区域的左边缘的距离,Z表示热区的上边与显示区域的下边缘的距离,K表示热区的下边与显示区域的下边缘的距离。通过定义每个热区的四维坐标,就可以定义任意一个规则热区在电子设备显示区域的范围。
应当说明的是,本申请实施例仅是将显示区域的左边缘和下边缘作为基准来定义热区。
在一些实施例中,还可以选择显示区域的其他任意两条不平行的边缘作为定义热区的基准边缘。
示例性的,假设显示区域左边缘的长度为h1,显示区域下边缘的长度为h2。由图2A可知,热区1的在显示区域中的范围为(0.024*h2,0.15*h2,h1,0),热区2在显示区域中的范围为(0.85*h2,0.96*h2,h1,0)。通过上述方式定义规则热区,即使电子设备进行横竖屏的切换,热区也可以进行对应切换。因此,不会因为横/竖屏的切换而重新定义热区。
例如,如图2B所示为电子设备100在竖屏模式的界面图,由于电子设备100是选择显示区域的左边缘和下边缘为基准来定义热区。因此,在图2B中,显示区域的左边缘对应的是S2,显示区域的下边缘对应的是S3。若热区1在显示区域中的范围为(0.024*h2,0.15*h2,h1,0),热区2在显示区域中的范围为(0.85*h2,0.96*h2,h1,0)。那么热区1和热区2在显示区域的范围可以如图2B所示。
请参见图2C,图2C是电子设备100在横屏模式下View框的布局示例图。对于采用规则热区的方式进行分屏操作,电子设备通常会在屏幕区域划分多个形状规则的View框(都是矩形)。这些View框可以用于显示分屏过程中应用的动效内容。为了便于叙述,在图2C中仅展示了3个View框,这3个View框是在一个图层上的。与上述热区在显示区域中范围的定义相似,每个View框也是通过一个四维坐标确定在电子设备显示区域中的范围,View框范围定义的相关叙述可以参见上述描述,在此不做赘述。
电子设备在检测到悬浮窗的拖动条在热区范围内时,开始进行分屏操作。然后,可以根据分屏操作的类型(例如,悬浮窗对应的应用上分屏、悬浮窗对应的应用下分屏、悬浮窗对应的应用左分屏、悬浮窗对应的应用右分屏)来对应改变显示区域中View框的四维坐标,根据四维坐标调整View框的上边、下边、左边与右边与选定的显示区域边缘的距离,从而改变View框在显示区域中的范围,进而得到分屏过程中显示应用动效内容的View框。
如图2D为电子设备在分屏操作过程中,电子设备的显示区域的View框布局图。可以看到,相较于图2C而言,第一View框和第二View框的范围有所扩大,第三View框的范围被明显压缩。结合上述图1A-图1D实施例,在第一View框中可以显示上述图1C中动效框111内的动效内容,在第二View框中显示上述图1C中动效框112内的动效内容。
下面,对电子设备100基于不规则热区的方式进行分屏操作的原理进行示例性地介绍。
如图3A所示为电子设备100的不规则热区划分示例图。在图3A中包括4个热区,分别为热区1、热区2、热区3以及热区4。这4个热区由于都是梯形,均包括不与显示区域边缘相平行的边。因此,这4个热区均为不规则的热区。这就使得电子设备不能使用上述通过定义四维坐标的方法来表征不规则热区在显示区域的范围(因为梯形的腰不与显示区域的上边缘或下边缘平行,因此不能用与下边缘或左边缘的距离来表示)。因此,对于不规则热区而言,需要根据不规则热区在显示区域中的布局,得到对应的逻辑函数H。然后根据逻辑函数H的输出判断是否进行分屏操作,以及若要进行分屏操作时,应该执行哪种类型的分屏操作(例如,悬浮窗对应的应用上分屏、悬浮窗对应的应用下分屏、悬浮窗对应的应用左分屏、悬浮窗对应的应用右分屏)。
例如,用户在拖动悬浮窗拖动条的过程中,电子设备可以实时获取拖动条在显示区域中的位置坐标(x,y),将(x,y)作为H的输入,从而得到第一标识W。根据W判断是
否进行分屏操作,以及若要进行分屏操作时,应该执行哪种类型的分屏操作。
例如,在图3B中悬浮窗的拖动条3011的位置坐标为(x1,y1),根据W=H(x1,y1)计算出第一标识W,并根据W判断出应该执行悬浮窗对应应用的上分屏操作。
对于不规则热区而言,一般是将整个显示区域作为一个View框(如图3C所示的第一View框)。当要显示分屏动效时(例如,上述图1F中的用户界面13),需要在原有的View框的基础上再添加一个View框,这同时也增加了一个图层。例如,图3D中展示的是在对悬浮窗对应应用进行上分屏的过程中View框布局图。第二View框是在第一View框的基础上新添加的View框。结合上述图1F实施例理解,第一View框显示计算器应用的动效内容,第二View框显示浏览器应用的动效内容。
对于上述基于规则热区的方式进行分屏操作,一方面,由于热区在显示区域的范围可以通过四维坐标来定义,在横屏或竖屏模式下热区的范围也可以进行对应切换,这就使得通过这种方式进行分屏操作的代码逻辑简单,代码的可读性强,易于后期技术人员进行技术维护。在另一方面,后期技术人员要修改热区的范围或位置时,仅需要改变热区的四维坐标即可,这就大大提高了技术人员的工作效率。
但是,这种方法仅能定义规则区域,且在一定程度上代码量较为冗余。此外,一般而言,这种方式一般只定义两个热区(上下热区或左右热区),这就使得通过热区的方式仅能实现上下分屏或左右分屏。以定义左右热区为例,电子设备通过热区的方式仅能进行左右分屏,若要进行上下分屏,只能先进行左右分屏,再通过切换的方式(例如,对上述图1D中分屏切换控件123进行单击操作)才能切换到上下分屏。这样,由左右分屏切换到上下分屏对于用户来说过程较为繁杂,且由左右分屏切换到上下分屏的过程中是没有分屏动效的,从用户界面上也会给人一种突兀的感觉。
对于上述基于不规则热区的方式进行分屏操作,一方面,由于是基于悬浮窗拖动条的位置通过逻辑函数计算的第一标识来判断是否进行分屏操作以及进行何种类型的分屏操作。因此,可以定义任意形状的热区。在另一方面,当要进行显示分屏动效时,需要在最上层添加一个View框,这就增加一个图层,会使得底层代码变得更加复杂。
因此,为了解决基于上述规则热区方法和不规则热区方法进行分屏操作存在的问题,本申请实施例提供了一种屏幕显示的方法,该方法为:电子设备在进行分屏操作之前先确定悬浮窗对应的应用和当前用户界面对应的应用是否均为支持上下分屏和左右分屏的应用。若为是,电子设备使用不规则热区的方法(通过逻辑函数的方法)判断是否执行分屏操作以及在要执行分屏操作的情况下,执行哪种类型分屏的操作(例如,悬浮窗对应应用界面在左边的左右分屏操作或悬浮窗对应应用界面在右边的左右分屏操作或悬浮窗对应应用界面在上边的上下分屏操作或悬浮窗对应应用界面在下边的上下分屏操作或不执行分屏操作)。若为否,电子设备使用规则热区的方法(通过判断悬浮窗的拖动条是否在定义的规则热区内)判断是否执行分屏操作以及在要执行分屏操作的情况下,执行哪种分屏操作(例如,悬浮窗对应应用界面在左边的左右分屏操作或悬浮窗对应应用界面在右边的左右分屏操作)。
此外,电子设备在屏幕区域的同一图层设置多个View框(本申请实施例以设置3个View框为例,进行说明)。在进行分屏操作的过程中,通过改变这3个View框的大小和位置,得到显示应用动效内容的View框。然后,在View框中显示对应应用的动效内容。通过这种方式,避免了电子设备在进行分屏操作的过程中,因要生成分屏应用的动效,必须额外添加View框使得图层变得复杂,进而使得代码变得复杂的问题。
下面,结合附图对本申请实施例提供的一种屏幕显示方法的流程进行介绍。请参见图4,图4是本申请实施例提供的一种屏幕显示方法的流程图,具体流程如下:
S401:电子设备显示第一界面,所述第一界面为第二应用对应的界面,在所述第一界面上显示有悬浮窗,所述悬浮窗对应的应用为第一应用,所述第一悬浮窗包括第一控件。
示例性的,第一界面可以为上述图1A实施例中的用户界面10,悬浮窗可以为上述图1A实施例中的悬浮窗101,第一控件可以为上述图1A实施例中的拖动条1011。第一应用可以为上述图1A实施例中的计算器应用(悬浮窗对应的应用),第二应用可以为上述图1A实施例中的浏览器应用。
S402:响应针对所述第一控件的第一操作,所述电子设备将所述悬浮窗设置为第一模式。
示例性的,第一操作可以为上述图1A实施例中针对拖动条1011的长按操作。第一模式为悬浮窗跟随用户拖动方向移动的工作模式。
可选地,在检测到用户针对第一控件的第一操作后,电子设备可以获取第一应用和第二应用的应用标识,并根据第一应用和第二应用的应用标识判断在第一白名单中是否存在第一应用的应用标识和第二应用的应用标识。其中,第一白名单内包括多个应用的应用标识,这多个应用标识对应的应用为均支持上下分屏和左右分屏的应用。
若在第一白名单中存在第一应用的应用标识和第二应用的应用标识,说明第一应用和第二应用均支持上下分屏和左右分屏。那么,电子设备使用不规则热区的方法进行第一应用和第二应用的分屏操作。
若在第一白名单中不存在第一应用的应用标识或不存在第二应用的应用标识或不存在第一应用的应用标识和第二应用的应用标识,说明第一应用和/或第二应用仅支持左右分屏和上下分屏中的其中一种分屏方式。那么,电子设备使用规则热区的方法进行第一应用和第二应用的分屏操作。
S403:响应针对所述第一控件的第二操作,所述电子设备获取所述第一控件的第一位置信息。
示例性的,第二操作可以为上述图1B实施例中,用户针对拖动条1011向右拖动的输入操作。
电子设备在检测到针对第一控件的第二操作后,电子设备可以实时获取第一控件的第一位置信息。其中,第一位置信息可以为第一控件在电子设备显示区域的二维坐标信息。
在一些实施例中,可以将第一控件的中心点在显示区域的坐标信息确定为第一位置信息,也可以将第一控件中任意一点在显示区域的坐标信息确定为第一位置信息,本申请实施例对此不做限制。
S404:若所述第一应用和所述第二应用均为支持上下分屏和左右分屏的应用,所述电子设备基于所述第一位置信息计算得到第一标识。
具体的,在上述S402中,若第一应用的标识信息和第二应用的标识信息均在第一白名单中,那么第一应用和第二应用均为支持上下分屏和左右分屏的应用。若第一应用和第二应用均为支持上下分屏和左右分屏的应用。那么,电子设备使用不规则热区的方法来判断是否进行第一应用和第二应用的分屏操作,即:电子设备通过使用逻辑函数输出的第一标识来判断是否进行分屏操作,以及要在进行分屏操作的前提下,确定哪种类型的分屏操作(例如,第一应用上分屏操作、第一应用下分屏操作、第一应用左分屏操作、第一应用右分屏操作等)。
电子设备可以先获取与该设定的不规则热区对应的逻辑函数H。然后,将第一坐标信息(x,y)作为H的输入得到第一标识W,即:W=H(x,y),从而根据其实时获取的第一位置信息实时计算得到W。并根据第一标识确定电子设备是否执行分屏操作,如果执行分屏操作,应该执行哪种类型的分屏操作。
S405:在所述第一标识指示进行分屏操作的情况下,所述电子设备根据所述第一标识调整显示区域中的View框在显示区域中的范围,得到第一View框和第二View框,所述第一View框对应第一应用,所述第二View框对应第二应用。
具体的,显示区域可以理解为电子设备的显示屏。电子设备计算出的第一标识可以分成以下5种情况,分别为:第一应用上分屏(例如,第一标识为Topsplit)、第一应用下分屏(例如,第一标识为Bottomsplit)、第一应用左分屏(例如,第一标识为Leftsplit)、第一应用右分屏(例如,第一标识为Rightsplit)以及不进行分屏操作(例如,第一标识为Freeform)。
其中,第一应用上分屏和第一应用下分屏表示第一应用要进行上下分屏的操作,第一应用上分屏表示在分屏界面中,第一应用的界面在第二应用的界面的上方;第一应用下分屏表示在分屏界面中,第一应用的界面在第二应用的界面的下方。第一应用左分屏和第一应用右分屏表示第一应用要进行左右分屏的操作,第一应用左分屏表示在分屏界面中,第一应用的界面在第二应用的界面的左边;第一应用右分屏表示在分屏界面中,第一应用的界面在第二应用的界面的右边。
电子设备在计算出第一标识后,若第一标识表征电子设备要进行分屏操作(例如,第一标识为Topsplit或Bottomsplit或Leftsplit或Rightsplit),电子设备可以根据第一标识确定对应的动效方案,从而对应调整View框在显示区域中的范围。在电子设备的显示区域中预先设定有N个View框,这N个View框在同一图层上。为了便于叙述,本申请实施例以N为3为例进行说明。
示例性的,如上述图2C的电子设备100的显示区域中包括3个View框,分别为第一View框、第二View框、第三View框。在这三个View框中,每个View框都有上、下、左、右4条边。通过定义上、下、左、右这四条边与屏幕边缘的距离,就可以确定每个View框的位置和大小。可以通过使用四维坐标的方式表示单个View框在电子设备的显示区域的位置和大小。示例性的,四维坐标可以为(X,Y,Z,K)。其中,X可以表示单个View框的左边长与屏幕左边缘的距离,Y可以表示单个View框的右边长与屏幕左边缘的距离,
Z可以表示单个View框的上边长与屏幕下边缘的距离,K可以表示单个View框的下边长与屏幕右边缘的距离。
可以预先在电子设备中存储不同第一标识对应的不同View框的四维坐标,即:不同第一标识对应的不同动效方案。示例性的,当第一标识为Topsplit时,第一View框的四维坐标可以为(X11,Y11,Z11,K11),第二View框的四维坐标可以为(X21,Y21,Z21,K21),第三View框的四维坐标可以为(X31,Y31,Z31,K31)。
当第一标识为Bottomsplit时,第一View框的四维坐标可以为(X12,Y12,Z12,K12),第二View框的四维坐标可以为(X22,Y22,Z22,K22),第三View框的四维坐标可以为(X32,Y32,Z32,K32)。
当第一标识为Leftsplit时,第一View框的四维坐标可以为(X13,Y13,Z13,K13),第二View框的四维坐标可以为(X23,Y23,Z23,K23),第三View框的四维坐标可以为(X33,Y33,Z33,K33)。
当第一标识为Rightsplit时,第一View框的四维坐标可以为(X14,Y14,Z14,K14),第二View框的四维坐标可以为(X24,Y24,Z24,K24),第三View框的四维坐标可以为(X34,Y34,Z34,K34)。当第一标识为Freeform时,可以不存储View框的四维坐标。
电子设备在计算出第一标识后,可以选择与第一标识对应的每个View框的四维坐标,并根据得到的每个View框的四维坐标,调整每个View框上、下、左、右四条边的位置,从而得到用于显示第一应用动效内容的第一View框和显示第二应用动效内容的第二View框。
假设第一标识为Topsplit,第一View框的四维坐标为(0.1*Left,0.9*Left,Height,0.5*Height),第二View框的四维坐标为(0.1*Left,0.9*Left,0.4*Height,0),第三View框的四维坐标为(0.9*Left,Left,Height,0)。假若Left表示显示屏下边缘的长度,Height表示显示区域左边缘的长度。那么,电子设备根据这3个四维坐标调整三个View框后的示例图可以如图5A所示。
在一些实施例中,显示屏上、下、左、右边缘的定义与电子设备的显示模式有关。电子设备的显示模式可以分为横屏显示模式和竖屏显示模式。如图5B所示为电子设备处于横屏显示模式的示例图。其中,L1、L2、L3以及L4分别为电子设备显示屏的左边缘、右边缘、上边缘以及下边缘。L3和L4的长度为Left,L1和L2的长度为Height。如图5C所示为电子设备处于竖屏模式的示例图,此时L4、L3、L1以及L2分别是电子设备的左边缘、右边缘、上边缘以及下边缘。L1和L2的长度为Left,L3和L4的长度为Height。
S406:若所述第一应用和/或所述第二应用为仅支持上下分屏或左右分屏的应用,所述电子设备基于所述第一位置信息判断所述第一控件是否在目标热区中。
具体的,在上述S402中,若第一应用的应用标识和第二应用的应用标识不均在第一白名单中,那么第一应用和/或第二应用为仅支持上下分屏或左右分屏的应用。若第一应用和/或第二应用为支持上下分屏或左右分屏的应用。那么,电子设备使用规则热区的方法来判断是否进行第一应用和第二应用的分屏操作,即:电子设备通过判断第一控件是否在热区的范围内来判断是否进行分屏操作,以及要在进行分屏操作的前提下,确定哪种类型的分屏操作(例如,第一应用上分屏操作、第一应用下分屏操作、第一应用左分屏操作、第一
应用右分屏操作等)。
电子设备可以预存的显示区域中每个热区的位置信息(四维坐标),热区的四维坐标与上述View框的四维坐标含义一致。电子设备通过读取热区的四维坐标就可以确定预设的热区在电子设备的显示区域中的范围。电子设备在获取第一位置信息后,可以根据第一位置信息以及热区在显示区域中的范围判断第一控件是否在热区内,即:当第一控件的二维坐标在热区范围内时,确定第一控件在热区内,第一控件所在的热区为目标热区;反之,第一控件不在目标热区内。在电子设备确定第一控件在热区内的情况下,电子设备触发分屏操作。
S407:若第一控件在目标热区内,所述电子设备基于所述目标热区的热区标识调整显示区域中View框在显示区域中的范围,得到第一View框和第二View框,所述第一View框对应第一应用,所述第二View框对应第二应用。
具体的,若第一控件在目标热区内,电子设备获取目标热区的标识信息,根据获取的标识信息电子设备可以确定应该执行何种类型的分屏操作。例如,在显示区域中仅有左热区和右热区。若右热区为目标热区,电子设备确定执行分屏操作,并执行第一应用的界面在右侧的第一应用右分屏操作。然后,电子设备可以根据目标热区的标识信息选择对应的每个View框的四维坐标。根据每个View框的四维坐标,调整每个View框上、下、左、右四条边在显示区域中的位置,从而得到显示第一应用动效内容的第一View框以及显示第二应用动效内容的第二View框。
S408:所述电子设备显示第二界面,所述第二界面包括第一动效界面和第二动效界面,所述第一动效界面显示所述第一应用的动效内容,所述第二动效界面显示所述第二应用的动效内容,所述第一View框包括所述第一动效界面,所述第二View框包括所述第二动效界面。
具体的,在得到第一View框和第二View框之后,电子设备显示第二界面。其中第二界面包括第一动效界面和第二动效界面,第一动效界面用于显示第一应用的动效内容,第二动效界面用于显示第二应用的动效内容。第一View框包括第一动效界面,第二View框包括第二动效界面。
示例性的,第一动效界面可以为上述图1C中动效框112内显示的内容,还可以为第一应用的阴影动画。第二动效界面可以为上述图1C中动效框111内显示的内容,还可以为第二应用的截图。
S409:响应针对所述第一控件的第三操作,所述电子设备显示第三界面,所述第三界面包括第一分屏界面和第二分屏界面,所述第一分屏界面为所述第一应用的界面,所述第二分屏界面为第二应用的界面。
示例性的,第三操作可以为上述图1C中针对拖动条1011的抬手操作。
在第三界面中包括第一分屏界面和第二分屏界面,第一分屏界面为第一应用的界面,第二分屏界面为第二应用的界面。
示例性的,第三界面可以为上述图1D中的用户界面12,第一分屏界面可以为上述图1D中的界面122,第二分屏界面可以为上述图1D中的界面121。
可选地,在显示第三界面之前,电子设备还可以在第一View框中显示第一应用的过渡
动画,在第二View框中显示第二应用的第二过渡动画。
在上述图4实施例中,电子设备在检测到用户针对悬浮窗拖动条的第一操作(例如,长按操作)后,响应该第一操作,电子设备会判断当前用户界面对应的应用和悬浮窗对应的应用是否均为支持上下分屏和左右分屏的应用。若为是,电子设备采用不规则热区的方法进行分屏操作。若为否,电子设备采用规则热区的方式进行分屏操作。不管电子设备是采用规则热区的方式进行分屏操作还是采用不规则热区的方式进行分屏操作,电子设备都是通过调整同一图层上的多个View框在显示区域上的范围来显示得到显示两个分屏应用动效内容的View框,并将分屏应用的动效内容显示在对应的View框上。这样,在使用不规则热区的方法进行分屏操作时,不会因为要添加新的View框造成要增添新的图层,而导致底层代码逻辑复杂的问题,从而使得技术人员后期难以修改和维护。
上述图4中的实施例对本申请实施例提供的一种屏幕显示方法的流程进行了介绍。下面,结合图6对上述图4实施例中,电子设备中的各个模块的交互流程进行介绍。在电子设备中包括第一应用、第二应用和多窗口管理模块(HwMultiWindowSwitchManager),第一应用和第二应用位于安卓系统架构中的应用程序层,多窗口管理模块位于安卓系统架构中的应用程序框架层。
其中,在第一应用中包括悬浮窗移动模块(Bar移动模块),在多窗口管理模块中包括热区设置模块(AddHotArea)、分屏动效管理模块(SetDragAnimationListener)、动效添加模块(HwMultiWinPushAcceptView)、动效框调整模块(HwMultiWinPushPendingDropView)。
请参见图6,图6是本申请实施例提供的一种屏幕显示方法的模块交互图,各模块的交互流程如下:
S601:悬浮窗移动模块响应针对悬浮窗中第一控件的第一操作,向热区设置模块发送第一通知消息。
示例性的,第一操作可以为上述图1A实施例中针对拖动条1011的长按操作。
第一应用的悬浮窗移动模块在检测到针对第一控件的第一操作后,响应该第一操作,获取第一应用标识和第二应用标识,并向热区设置模块发送第一通知消息。其中,第一通知消息用于指示热区设置模块确定触发电子设备进行分屏操作的方式,即:基于规则热区的方法触发电子设备进行分屏操作还是基于不规则热区的方法触发电子设备进行分屏操作。在第一通知消息中可以包括第一应用标识,还可以包括第二应用标识,第一应用标识为第一应用的应用标识,第二应用标识为第二应用的应用标识。
S602:热区设置模块基于所述第一通知消息获取第一应用标识和第二应用标识,第一应用标识与第一应用对应,第二应用标识与第二应用对应。
S603:热区设置模块判断所述第一应用标识和所述第二应用标识是否均为第一白名单内的应用标识。
具体的,热区设置模块在获取第一应用标识和第二应用标识后,获取第一白名单,并判断第一应用标识和第二应用标识是否均为第一白名单内的应用标识。第一白名单的相关叙述可以参见上述S402中对第一白名单的相关叙述,本申请实施例在此不再赘述。
在一些实施例中,热区设置模块可以基于getPackageName函数调用相关的接口从而获
取第一白名单。
S604:若所述第一应用标识和所述第二应用标识均为第一白名单内的应用标识,热区设置模块向分屏动效管理模块发送第一热区消息。
具体的,若第一应用标识和第二应用标识均为第一白名单内的应用标识,热区设置模块确定第一应用和第二应用均为支持上下分屏和左右分屏的应用。
因此,热区设置模块向分屏动效管理模块发送第一热区消息。第一热区消息用于指示第一应用和第二应用均为支持上下分屏和左右分屏的应用,即:分屏动效模块可以基于不规则热区的方式触发第一应用和第二应用的分屏操作。
在一种可能实现的方式中,分屏动效管理模块在接收到第一热区消息后,可以启动第一监测器(onDragStared/onDragExited)和第二监测器(onDragEntered)。其中,第一监测器用于监测当前第一控件的位置信息,并基于第一位置信息计算第一标识;第二监测器用于判断该执行哪种分屏动效。
S605:悬浮窗移动模块响应针对所述第一控件的第二操作,向所述分屏动效管理模块发送第二通知消息。
示例性的,第二操作可以为上述图1B实施例中,用户针对拖动条1011向右拖动的输入操作。
具体地,悬浮窗移动模块响应针对第一控件的第二操作后,向分屏动效管理模块发送第二通知消息。第二通知消息用于指示分屏动效管理模块调用第一监测器根据第一控件的位置(第一位置信息)计算第一标识。
S606:所述分屏动效管理模块实时获取所述第一控件的第一位置信息。
具体的,分屏动效管理模块在实时接收到第二通知消息后,可以通过第一监测器实时检测第一控件在显示区域中的第一位置信息。
S607:所述分屏动效管理模块根据所述第一位置信息得到第一标识。
具体的,由于分屏动效管理模块之前接收热区设置模块发送的第一热区消息。因此,分屏动效模块确定通过不规则热区的方式来判断是否进行分屏操作,以及进行何种类型的分屏操作(第一应用左分屏或第一应用右分屏或第一应用上分屏或第一应用下分屏)。
分屏动效管理模块可以通过第一监测器调用计算第一标识的逻辑函数H。然后,调用第一监测器基于第一位置信息和H输出第一标识。第一监测器在计算出第一标识后,将第一标识发送给分屏动效管理模块,从而使得分屏动效管理模块获取到第一标识。
S608:在所述第一标识指示电子设备进行分屏操作的情况下,所述分屏动效管理模块向动效框调整模块发送第三通知消息。
具体的,在第一标识指示电子设备进行分屏操作的情况下,分屏动效管理模块向动效框调整模块发送第三通知消息,第三通知消息用于指示动效框调整模块调整显示区域中的View框在显示区域的范围。在第三通知消息中可以包括第一标识。
S609:动效框调整模块根据所述第三通知消息调整显示区域中的View框在显示区域中的范围,得到第一View框和第二View框,所述第一View框对应第一应用,所述第二View框对应第二应用。
具体的,动效框调整模块根据所述第三通知消息中的第一标识,得到与该第一标识对
应的各View框的四维坐标。并根据得到的每个View框的四维坐标,调整每个View框上、下、左、右四条边在显示区域中的位置,从而得到显示第一应用动效内容的第一View框和显示第二应用动效内容的第二View框。
动效框调整模块根据所述第三通知消息调整显示区域中的View框在显示区域中的范围,得到第一View框和第二View框的相关叙述可以参考上述图4实施例中S405的相关叙述,在此不再赘述。
S610:所述动效框调整模块向动效添加模块发送第四通知消息。
具体的,在动效框调整模块根据第三通知消息调整显示区域中的View框在显示区域中的范围,得到第一View框和第二View框之后,动效框调整模块可以向动效添加模块发送第四通知消息。第四通知消息用于指示动效框添加模块在第一View框和第二View框中添加并显示与第一应用和第二应用对应的动效内容。
其中,在第四通知消息中可以包括第一标识,还可以包括第一View框的标识信息与第一应用的映射关系、第二View框的标识信息与第二应用的映射关系。
S611:所述动效添加模块根据所述第四通知消息获取第一动效信息和第二动效信息,所述第一动效信息与所述第一应用相关,所述第二动效信息与所述第二应用相关。
具体的,动效添加模块根据第四通知消息中的第一标识、第一View框的标识信息与第一应用的映射关系、第二View框的标识信息与第二应用的映射关系可以确定第一应用和第二应用的分屏动效内容,即:要在第一View框和第二View框内要显示什么样的内容。
例如,在上述图1C中浏览器应用(第二应用)的分屏动效内容就是动效框111以及浏览器应用的图标1111,计算器应用(第一应用)的分屏动效内容就是动效框112及其框内的灰色背景。
动效添加模块基于第一标识可以调用相关的接口可以存储区中获取第一动效信息(例如,上述图1C中动效框112的灰色背景图)和第二动效信息(例如,上述图1C中浏览器应用的图标1111)。
S612:所述动效添加模块在第一View框中显示第一动效内容,将在第二View框中显示第二动效内容。
具体的,第一动效内容与第一动效信息对应,第二动效内容与第二动效信息对应。
在获取到第一动效信息和第二动效信息后,动效添加模块可以根据第四通知消息中第一View框的标识信息与第一应用的映射关系、第二View框的标识信息与第二应用的映射关系,将对应的第一动效信息中的元素(例如,上述图1C动效框112中的灰色背景图)、第二动效信息中的元素(例如,上述图1C中浏览器应用的图标1111)分别对应显示在第一View和第二View框中,显示在View框中的内容即是上述图4的S408中第一动效界面和第二动效界面显示的内容。
S613:悬浮窗移动模块响应针对所述第一控件的第三操作,向动效添加模块发送第五通知消息。
示例性的,第三操作可以为上述图1C中针对拖动条1011的抬手操作。
第五通知消息用于表征电子设备要显示第三界面,结束分屏动效显示。
S614:动效添加模块向第一应用发送第一指示消息,向第二应用发送第二指示消息。
具体的,动效添加模块在接收到第五通知消息后,可以向第一应用发送第一指示消息,向第二应用发送第二指示消息。在第一指示消息和第二指示消息中可以包括第一标识。
示例性的,动效添加模块可以通过位于安卓系统应用程序层的Activity任务管理服务模块(HwInnerActivityTaskManagerService)将第一指示消息和第二指示消息分别发送给第一应用和第二应用。
第一指示消息用于指示第一应用的Activity任务模块(Activity Task)关闭悬浮窗,从而使得悬浮窗不再出现在电子设备的显示屏上。同时,第一指示消息还用于指示第一应用的Activity任务模块(Activity Task)在显示屏上显示第一应用的分屏界面(第一分屏界面)。
其中,第一应用的分屏界面的位置可以根据第一标识确定。例如,第一标识表征第一应用上分屏。那么,第一分屏界面在第二屏界面的上方(例如,上述图1G所示的第一分屏界面141)。
第二指示消息用于指示第二应用的Activity任务模块(Activity Task)在显示屏上显示第二应用的分屏界面(第二分屏界面)。
其中,第二应用的分屏界面的位置可以根据第一标识确定。例如,第一标识表征第一应用上分屏。那么,第二分屏界面在第一屏界面的下方(例如,上述图1G所示的第二分屏界面142)。
可选地,在动效添加模块向第一应用发送第一指示消息,向第二应用发送第二指示消息之前,可以基于第一标识在第一View框和第二View框中播放时长为t的过渡动效内容。
S615:第一应用在第三界面上显示第一分屏界面,第二应用在第三界面上显示第二分屏界面。
可选地,第一应用在第三界面上显示第一分屏界面之前,通过Activity任务模块关闭悬浮窗。
请参见图7,图7是本申请实施例提供的另一种屏幕显示方法的模块交互图。在上述图4实施例中,各模块的交互流程如下:
S701:悬浮窗移动模块响应针对悬浮窗中第一控件的第一操作,向热区设置模块发送第一通知消息。
S702:热区设置模块基于所述第一通知消息获取第一应用标识和第二应用标识,第一应用标识与第一应用对应,第二应用标识与第二应用对应。
S703:热区设置模块判断所述第一应用标识和所述第二应用标识是否均为第一白名单内的应用标识。
S704:若所述第一应用标识和所述第二应用标识不均为第一白名单内的应用标识,热区设置模块向分屏动效管理模块发送第二热区消息。
具体的,若第一应用标识和第二应用标识不均为第一白名单内的应用标识,热区设置模块确定第一应用和/或第二应用仅支持上下分屏或左右分屏的应用。
因此,热区设置模块向分屏动效管理模块发送第二热区消息。第二热区消息用于表征第一应用和第二应用不均为支持上下分屏和左右分屏的应用,即:提示分屏动效模块可以基于规则热区的方式触发第一应用和第二应用的分屏操作。
S705:悬浮窗移动模块响应针对所述第一控件的第二操作,向所述分屏动效管理模块发送第二通知消息。
S706:所述分屏动效管理模块实时获取所述第一控件的第一位置信息。
具体的,分屏动效管理模块在接收到第二热区消息后,可以启动第一监测器(onDragStared/onDragExited)和第二监测器(onDragEntered)。其中,第一监测器用于监测当前第一控件的位置信息,以及判断第一控件是否在热区内;第二监测器用于判断该执行哪种分屏动效。
S707:所述分屏动效管理模块根据所述第一位置信息判断所述第一控件是否在目标热区内。
具体的,在获取到第一位置信息后,分屏动效模块根据第一监测器获取的第一位置信息(x,y)以及热区的四维坐标判断悬浮窗的拖动条是否在热区内,即:(x,y)是否在热区的四维坐标定义的范围内。若存在热区内,则悬浮窗拖动条所在的热区为目标热区,分屏动效模块也会获取目标热区的标识信息。
分屏动效管理模块根据所述第一位置信息判断所述第一控件是否在目标热区内的相关叙述可以参考上述图4的S406中,电子设备基于所述第一位置信息判断所述第一控件是否在目标热区中的相关叙述。
S708:若所述第一控件在目标热区内,所述分屏动效管理模块向动效框调整模块发送第三通知消息。
具体的,第三通知消息包括目标热区的标识信息,该标识信息可以用于表征进行何种类型的分屏操作。例如,第一应用的上分屏操作、下分屏操作、左分屏操作、右分屏操作等。
S709:所述动效框调整模块基于所述第三通知消息调整所述电子设备的显示区域中View框在显示区域中的范围,得到第一View框和第二View框,所述第一View框对应第一应用,所述第二View框对应第二应用。
具体的,动效框调整模块根据所述第三通知消息中目标热区的标识信息,得到与该应用标识对应的各View框的四维坐标,并根据得到的每个View框的四维坐标,调整每个View框上、下、左、右四条边在显示区域中的位置,从而得到显示第一应用动效内容的第一View框和显示第二应用动效内容的第二View框。
S710:所述动效框调整模块向动效添加模块发送第四通知消息。
S711:所述动效添加模块根据所述第四通知消息获取第一动效信息和第二动效信息,所述第一动效信息与所述第一应用相关,所述第二动效信息与所述第二应用相关。
S712:所述动效添加模块在第一View框中显示第一动效内容,将在第二View框中显示第二动效内容。
S713:悬浮窗移动模块响应针对所述第一控件的第三操作,向动效添加模块发送第五通知消息。
S714:动效添加模块向第一应用发送第一指示消息,向第二应用发送第二指示消息。
S715:第一应用在第三界面上显示第一分屏界面,第二应用在第三界面上显示第二分屏界面。
S701~S703、S710~S715的相关叙述可以对应参照上述S601~S603、S610~S615的相关叙述,在此不再赘述。
下面对电子设备100的结构进行介绍。请参阅图8,图8是本申请实施例提供的电子设备100的硬件结构示意图。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器125,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块148,电池149,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,接近光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图8示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图8示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local
area networks,WLAN)(如Wi-Fi网络),蓝牙(BlueTooth,BT),BLE广播,全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接
听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号、降噪、还可以识别声音来源,实现定向录音功能等。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
图9是本申请实施例提供的电子设备100在基于不规则热区的方式进行分屏操作的情况下的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。如图9所示,应用程序包可以包括上述图6和图7实施例中的第一应用、第二应用以及任务管理服务模块。其中,在第一应用中和第二应用中均包括Activity任务模块,在第一应用中还包括悬浮窗移动模块。其中:
悬浮窗移动模块用于在响应针对第一控件的第一操作后,向热区设置模块发送第一通知消息,以指示热区设置模块确定触发电子设备进行分屏操作的方式;
悬浮窗与移动模块还用于在响应针对第一控件的第二操作后,实时向分屏动效管理模块发送第二通知消息,以指示分屏动效管理模块根据第一控件的位置计算第一标识;
悬浮窗移动模块还用于在响应针对第一控件的第三操作,向动效添加模块发送第五通知消息,以通知动效添加模块电子设备要显示第三界面,结束分屏动效显示;
第一应用中的Activity任务模块用于在接收第一指示消息后,关闭悬浮窗,并在第三界面中显示第一分屏界面;
第二应用中的Activity任务模块用于在接收第二指示消息后,在第三界面中显示第二分屏界面;
任务管理服务模块用于接收动效添加模块发送的第一指示消息和第二指示消息,并将第一指示消息发送给第一应用中的Activity任务模块,将第二指示消息发送给第二应用中的Activity任务模块。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图9所示,应
用程序框架层可以包括上述图6和图7实施例中的多窗口管理模块。
在窗口管理模块中包括热区设置模块、分屏动效管理模块、动效框调整模块以及动效添加模块。
热区设置模块用于在接收悬浮窗移动模块发送的第一通知消息后,判断第一应用和第二应用的应用标识是否在第一白名单内。若在,向分屏动效管理模块发送第一热区消息,以指示分屏动效模块基于不规则热区的方式触发第一应用和第二应用的分屏操作。
分屏动效管理模块用于接收第二通知消息,以及计算第一标识,并将第一标识发送给动效框调整模块。
动效框调整模块用于根据第一标识调整View框在显示区域中的范围,得到第一View框和第二View框。
动效框调整模块还用于向动效添加模块发送第四通知消息,以指示动效添加模块在第一View框和第二View框中添加并显示与第一应用和第二应用对应的动效内容。
动效添加模块用于在接收第四通知消息后在第一View框和第二View框中添加并显示与第一应用和第二应用对应的动效内容。
动效添加模块用于还用于在接收第五通知消息后,向任务管理服务模块发送第一指示消息和第二指示消息。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
图10是本申请实施例提供的电子设备100在基于规则热区的方式进行分屏操作的情况下的软件结构框图。
其中,分屏动效管理模块用于接收第二通知消息,以及判断第一控件是否在目标热区内,若在目标热区内,将目标热区的标识信息发送给动效框调整模块。
动效框调整模块用于根据目标信息的标识信息调整View框在显示区域中的范围,得到
第一View框和第二View框。
在图10中,其他应用以及功能模块的作用可以参见上述图7实施例和上述图9中的对应描述,在此不再赘述。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk)等。
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。
本申请实施例装置中的模块可以根据实际需要进行合并、划分和删减。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。
总之,以上所述仅为本发明技术方案的实施例,并非用于限定本发明的保护范围。凡根据本发明的揭露,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
Claims (14)
- 一种屏幕显示方法,其特征在于,应用于具备显示屏的电子设备,所述方法包括:显示第一界面,在所述第一界面上显示有悬浮窗,所述悬浮窗包括第一控件,所述悬浮窗对应第一应用,所述第一界面对应第二应用;响应针对所述第一控件的第一操作,将所述悬浮窗设置为第一模式,所述第一模式为所述悬浮窗可在所述显示屏上移动的工作模式;若所述第一应用和所述第二应用均为支持上下分屏和左右分屏的应用,在所述显示屏的显示区域的上、下、左、右四个方向分别确定一个或多个热区;若所述第一应用和所述第二应用不均为支持上下分屏和左右分屏的应用,在所述显示屏的显示区域的上、下两个方向或左、右两个方向分别确定一个或多个形状规则的热区;响应针对所述第一控件的第二操作,移动所述悬浮窗在所述显示屏中的位置;在所述第一控件移动到任意一个热区范围内的情况下,显示第二界面,所述第二界面包括第一View框和第二View框,所述第一View框显示所述第一应用的动效内容,所述第二View框显示所述第二应用的动效内容,所述第一View框和所述第二View框在同一图层上;在显示所述第二界面的过程中,响应针对所述第一控件的第三操作,显示第三界面,所述第三界面包括第一分屏界面和第二分屏界面,所述第一分屏界面对应所述第一应用,所述第二分屏界面对应所述第二应用。
- 如权利要求1所述的方法,其特征在于,所述第三界面上还包括分屏切换控件,所述显示第三界面之后,还包括:响应针对所述分屏切换控件的第四操作,若所述第三界面为上下分屏界面,将所述第三界面切换为左右分屏界面;若所述第三界面为左右分屏界面,将所述第三界面切换为上下分屏界面。
- 如权利要求1或2所述的方法,其特征在于,所述响应针对所述第二控件的第二操作之前,还包括:获取第一应用标识和第二应用标识,所述第一应用标识为所述第一应用的标识信息,所述第二应用标识为所述第二应用的标识信息;判断所述第一应用标识和所述第二应用标识是否均为第一白名单内的标识信息;若为是,所述第一应用和所述第二应用均为支持上下分屏和左右分屏的应用;若为否,所述第一应用和所述第二应用不均为支持上下分屏和左右分屏的应用。
- 如权利要求1-3任一项所述的方法,其特征在于,在所述显示屏的显示区域包括N个形状为矩形的View框,每个View框均包括上、下、左、右四条边,每个View框在所述显示区域中的位置和范围通过四维坐标(Xi,Yi,Zi,Ki)来表示;其中,所述Xi表示第i个View框的左边与第一边缘的距离,所述Yi表示第i个View 框的右边与所述第一边缘的距离,所述Zi表示第i个View框的上边与第二边缘的距离,所述Ki表示第i个View框的下边与所述第二边缘的距离;所述第一边缘为所述显示屏与所述左边和所述右边平行的边,所述第二边缘为所述显示屏与所述上边和所述下边平行的边,所述N为大于1的整数。
- 如权利要求4所述的方法,其特征在于,在所述第一应用和所述第二应用均为支持上下分屏和左右分屏的应用的情况下,所述显示第二界面,具体包括:获取所述第一控件的第一位置信息;基于所述第一位置信息计算第一标识;根据所述第一标识获取对应的N个View框的四维坐标;基于所述N个四维坐标对应调整每个View框在所述显示屏中的范围,得到第一View框和第二View框;在所述第一View框中显示所述第一应用的动效内容,在所述第二View框中显示所述第二应用的动效内容。
- 如权利要求4所述的方法,其特征在于,在所述第一应用和所述第二应用不均为支持上下分屏和左右分屏的应用的情况下,所述显示第二界面,具体包括:获取所述第一控件的第一位置信息;根据热区的四维坐标获取所述热区在所述显示屏中的范围;在基于所述第一位置信息确定所述第一控件在任意一个热区中的情况下,获取所述第一控件所在热区的标识信息;基于所述标识信息获取对应的N个View框的四维坐标;基于所述N个四维坐标对应调整每个View框在所述显示屏中的范围,得到第一View框和第二View框;在所述第一View框中显示所述第一应用的动效内容,在所述第二View框中显示所述第二应用的动效内容。
- 如权利要求1所述的方法,其特征在于,所述电子设备包括分屏动效管理模块、动效框调整模块以及动效添加模块,若所述第一应用和所述第二应用均为支持上下分屏和左右分屏的应用,所述显示第二界面,包括:所述分屏动效管理模块根据所述第一控件的第一位置信息计算第一标识;所述分屏动效管理模块向所述动效框调整模块发送第三通知消息,所述第三通知消息包括所述第一标识;所述动效框调整模块根据第一标识获取对应的N个View框的四维坐标;所述动效调整模块根据所述N个View框的四维坐标调整所述显示屏中对应N个View框的范围,得到所述第一View框和所述第二View框;所述动效调整模块向所述动效添加模块发送第四通知消息,所述第四通知消息包括所述第一标识、所述第一View框与所述第一应用的第一映射关系、所述第二View框与所述 第二应用的第二映射关系;所述动效添加模块根据所述第一标识获取所述第一应用的动效内容和所述第二应用的动效内容;所述动效添加模块根据所述第一映射关系将所述第一应用的动效内容显示在所述第一View框上;所述动效添加模块根据所述第二映射关系将所述第二应用的动效内容显示在所述第二View框上。
- 如权利要求1所述的方法,其特征在于,所述电子设备包括分屏动效管理模块、动效框调整模块以及动效添加模块,若所述第一应用和所述第二应用不均为支持上下分屏和左右分屏的应用,所述显示第二界面,包括:所述分屏管理模块在基于所述第一控件的第一位置信息判断第一控件在热区范围内的情况下,向所述动效框调整模块发送第三通知消息,所述第三通知消息包括所述第一控件所在热区的标识信息;所述动效框调整模块根据所述标识信息获取对应的N个View框的四维坐标;所述动效调整模块根据所述N个View框的四维坐标调整所述显示屏中对应N个View框的范围,得到所述第一View框和所述第二View框;所述动效调整模块向所述动效添加模块发送第四通知消息,所述第四通知消息包括所述标识信息、所述第一View框与所述第一应用的第一映射关系、所述第二View框与所述第二应用的第二映射关系;所述动效添加模块根据所述标识信息获取所述第一应用的动效内容和所述第二应用的动效内容;所述动效添加模块根据所述第一映射关系将所述第一应用的动效内容显示在所述第一View框上;所述动效添加模块根据所述第二映射关系将所述第二应用的动效内容显示在所述第二View框上。
- 如权利要求7或8所述的方法,其特征在于,所述电子设备还包括所述第一应用的悬浮窗移动模块、热区设置模块,所述显示第二界面之前,还包括:所述悬浮窗移动模块响应所述第一操作,向所述热区设置模块发送第一通知消息,所述第一通知消息包括所述第一应用标识和所述第二应用标识,所述第一应用标识为所述第一应用的标识信息,所述第二应用标识为所述第二应用的标识信息;所述热区设置模块判断所述第一应用标识和所述第二应用标识是否均为在第一白名单内的应用标识;若为是,所述热区设置模块向所述分屏动效管理模块发送第一热区信息,所述第一热区信息用于指示所述第一应用和所述第二应用均为支持上下分屏和左右分屏的应用;若为否,所述热区设置模块向所述分屏动效管理模块发送第二热区信息,所述第二热区信息用于指示所述第一应用和所述第二应用不均为支持上下分屏和左右分屏的应用。
- 如权利要求9所述的方法,其特征在于,所述热区设置模块向所述分屏动效管理模块发送第一热区信息之后或所述热区设置模块向所述分屏动效管理模块发送第二热区信息之后,还包括:所述悬浮窗移动模块响应所述第二操作,向所述分屏动效管理模块发送第二通知消息,所述第二通知消息用于提示所述分屏动效管理模块获取所述第一控件的第一位置信息;所述分屏动效管理模块实时获取所述第一控件的第一位置信息。
- 如权利要求7所述的方法,其特征在于,所述电子设备还包括第一热区的悬浮窗移动模块,所述显示第二界面之后,还包括:所述悬浮窗移动模块响应所述第三操作,向所述动效添加模块发送第五通知消息;所述动效添加模块向所述第一应用发送第一指示消息,所述第一指示消息包括所述第一标识;所述动效添加模块向所述第二应用发送第二指示消息,所述第二指示消息包括所述第一标识;所述第一应用基于所述第一标识在所述第三界面上显示第一分屏界面;所述第二应用基于所述第一标识在所述第三界面上显示第二分屏界面。
- 如权利要求8所述的方法,其特征在于,所述电子设备还包括第一热区的悬浮窗移动模块,所述显示第二界面之后,还包括:所述悬浮窗移动模块响应所述第三操作,向所述动效添加模块发送第五通知消息;所述动效添加模块向所述第一应用发送第一指示消息,所述第一指示消息包括所述标识信息;所述动效添加模块向所述第二应用发送第二指示消息,所述第二指示消息包括所述标识信息;所述第一应用基于所述标识信息在所述第三界面上显示第一分屏界面;所述第二应用基于所述标识信息在所述第三界面上显示第二分屏界面。
- 一种电子设备,其特征在于,包括:存储器、处理器和触控屏;其中:所述触控屏用于显示内容;所述存储器,用于存储计算机程序,所述计算机程序包括程序指令;所述处理器用于调用所述程序指令,使得所述电子设备执行如权利要求1-12任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,该计算机程序被处理器执行时,实现如权利要求1-13任意一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310278303.9A CN118672696A (zh) | 2023-03-15 | 2023-03-15 | 一种屏幕显示方法及相关电子设备 |
CN202310278303.9 | 2023-03-15 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024187845A1 true WO2024187845A1 (zh) | 2024-09-19 |
Family
ID=92730695
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/136762 WO2024187845A1 (zh) | 2023-03-15 | 2023-12-06 | 一种屏幕显示方法及相关电子设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118672696A (zh) |
WO (1) | WO2024187845A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104898952A (zh) * | 2015-06-16 | 2015-09-09 | 魅族科技(中国)有限公司 | 一种终端分屏实现方法及终端 |
CN107908351A (zh) * | 2017-11-30 | 2018-04-13 | 北京小米移动软件有限公司 | 应用界面的显示方法、装置及存储介质 |
CN111966252A (zh) * | 2020-05-14 | 2020-11-20 | 华为技术有限公司 | 应用窗口显示方法和电子设备 |
CN113672133A (zh) * | 2020-05-13 | 2021-11-19 | 华为技术有限公司 | 一种多指交互方法及电子设备 |
WO2023010940A1 (zh) * | 2021-08-03 | 2023-02-09 | 荣耀终端有限公司 | 分屏显示方法和装置 |
-
2023
- 2023-03-15 CN CN202310278303.9A patent/CN118672696A/zh active Pending
- 2023-12-06 WO PCT/CN2023/136762 patent/WO2024187845A1/zh unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104898952A (zh) * | 2015-06-16 | 2015-09-09 | 魅族科技(中国)有限公司 | 一种终端分屏实现方法及终端 |
CN107908351A (zh) * | 2017-11-30 | 2018-04-13 | 北京小米移动软件有限公司 | 应用界面的显示方法、装置及存储介质 |
CN113672133A (zh) * | 2020-05-13 | 2021-11-19 | 华为技术有限公司 | 一种多指交互方法及电子设备 |
CN111966252A (zh) * | 2020-05-14 | 2020-11-20 | 华为技术有限公司 | 应用窗口显示方法和电子设备 |
WO2023010940A1 (zh) * | 2021-08-03 | 2023-02-09 | 荣耀终端有限公司 | 分屏显示方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
CN118672696A (zh) | 2024-09-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112269527B (zh) | 应用界面的生成方法及相关装置 | |
WO2021057830A1 (zh) | 一种信息处理方法及电子设备 | |
CN103631768B (zh) | 协作数据编辑和处理系统 | |
CN109191549B (zh) | 显示动画的方法及装置 | |
CN112527174B (zh) | 一种信息处理方法及电子设备 | |
WO2022105445A1 (zh) | 基于浏览器的应用投屏方法及相关装置 | |
CN113837920B (zh) | 一种图像渲染方法及电子设备 | |
CN111666075B (zh) | 一种多设备交互的方法及系统 | |
CN112527222A (zh) | 一种信息处理方法及电子设备 | |
WO2020181956A1 (zh) | 应用标识的显示方法及终端设备 | |
WO2022028241A1 (zh) | 预览封面生成方法及电子设备 | |
WO2023005900A1 (zh) | 一种投屏方法、电子设备及系统 | |
CN113961157A (zh) | 显示交互系统、显示方法及设备 | |
WO2024021519A1 (zh) | 卡片显示方法、终端设备 | |
WO2021052488A1 (zh) | 一种信息处理方法及电子设备 | |
CN113867657A (zh) | 跨设备桌面管理方法、第一电子设备及第二电子设备 | |
WO2024187845A1 (zh) | 一种屏幕显示方法及相关电子设备 | |
WO2023029565A9 (zh) | 一种触控采样率调节方法及相关装置 | |
CN114356186A (zh) | 一种拖动阴影动画效果的实现方法及相关设备 | |
WO2024109198A1 (zh) | 窗口调整方法及相关装置 | |
KR20200019028A (ko) | 모바일 디바이스 및 그 제어 방법 | |
WO2023138267A1 (zh) | 一种音频通知的显示方法及电子设备 | |
WO2024078306A1 (zh) | 横幅通知消息的显示方法与电子设备 | |
WO2023217142A1 (zh) | 窗口尺寸调整方法、相关装置及通信系统 | |
WO2024046010A1 (zh) | 一种界面显示方法、设备及系统 |