Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
Fig. 1 shows the flow diagram of the multi-screen display method of terminal screen according to an embodiment of the invention.Such as
Shown in Fig. 1, this method comprises the following steps:
Step S101 creates suspended window, the location parameter and dimensional parameters of suspended window is arranged, makes suspended window with dimensional parameters
Corresponding size is shown in the corresponding position of location parameter of terminal screen, and wherein the size of suspended window is less than the ruler of terminal screen
It is very little.
The embodiment of the present invention is realizing split screen by way of creating suspended window (Floatwindow).Suspended window is to exist
The floating frame of terminal screen top layer, suspended window are not affiliated with the interface Activity, because without the Life Cycle by Activity
The influence of phase is not also just influenced by the covering at the interface Activity.It belongs to the view of the process where its application program of starting
Figure is survived in process.In the embodiment of the present invention, suspended window is created by a background application.When terminal receives user's
When split screen instructs, which creates suspended window;It is then followed by and user is waited to start third-party application or other clothes
The instruction of business.
The creation of Floatwindow is related to WindowManager interface, realizes that class has WindowManagerImpl,
CompatModeWrapper, LocalWindowManager.Specifically, the code of background application starts one
Then Service creates suspended window in Service.When creating suspended window, need to define the layout of suspended window, creation is outstanding
The object of floating window setting layout parameter;Window type and window background are set;The location parameter and size ginseng of suspended window are set
Number (including width and height).The location parameter and dimensional parameters of suspended window determine that suspended window is shown in pre-set dimension
The predeterminated position of terminal screen.In order to realize that split screen effect, the pre-set dimension of suspended window should be less than the size of terminal screen.
Step S102 is embedded in window view in suspended window, and the window view is for drawing user interface to be shown.
In order to the user interface of the application or service that make the suspended window show that user is started, background application exists
After creating suspended window, it is embedded in window view in suspended window, the window view is for drawing user interface to be shown.Here
Window view can not limit this for any view that can be shown application or service provided user interface, the present invention
System.
Step S103, when user triggers the first application program of starting, in its of the terminal screen other than suspended window
The validated user interface of the first application program is presented in its display area.
A part of display area of the suspended window occupied terminal screen created through the above steps, for showing that user is opened
The user interface of dynamic application or service;Other display areas of terminal screen other than suspended window are for showing user institute
The user interface of the other application of starting, to realize the visual effect of split screen.For example, a left side for suspended window occupied terminal screen
The user interface of A is applied in half part, display, and remaining right half part shows the user interface using B, realizes left and right split screen;Or
The user interface of A is applied in the top half of suspended window occupied terminal screen, display, and remaining lower half portion shows the user using B
Split screen up and down is realized at interface.
Further, if not triggering the first application program of starting, then in addition to suspended window after user's input split screen instruction
Desktop is presented in other display areas of terminal screen in addition, the use of display user is started in suspended window application or service
Family interface.If also blank interface is presented in the inactive application or service that should be shown in suspended window, suspended window to user.
The split screen method of the terminal screen provided according to that above embodiment of the present invention, by creating suspended window occupied terminal screen
A part of display area of curtain, for showing the application that user is started or the user interface serviced;Other than suspended window
The validated user interface for the first application program that other display areas of terminal screen are used to show that user is started, realizes
The user interface of multiple applications is shown simultaneously on terminal screen, to realize the visual effect of split screen.User can start simultaneously
Multiple applications, multiple application programs run simultaneously, are independent of each other, and substantially increase the simplicity of user's operation.
Fig. 2 shows the flow diagrams of the multi-screen display method of terminal screen in accordance with another embodiment of the present invention.
As shown in Fig. 2, this method comprises the following steps:
Step S201 creates suspended window, the location parameter and dimensional parameters of suspended window is arranged, makes suspended window with dimensional parameters
Corresponding size is shown in the corresponding position of location parameter of terminal screen, and wherein the size of suspended window is less than the ruler of terminal screen
It is very little.
When terminal receives the split screen instruction of user, Floatwindow is created.The creation of Floatwindow is related to
WindowManager interface realizes that class has WindowManagerImpl, CompatModeWrapper,
LocalWindowManager.Specifically, the code of background application starts a Service, then creates in Service
Build suspended window.When creating suspended window, need to define the layout of suspended window, the object of creation suspended window setting layout parameter;If
Set window type and window background;The location parameter and dimensional parameters (comprising width and height) of suspended window are set.It suspends
The location parameter and dimensional parameters of window determine that suspended window is shown in the predeterminated position of terminal screen with pre-set dimension.In order to realize
The pre-set dimension of split screen effect, suspended window should be less than the size of terminal screen.
Suspended window is there are the floating frame on terminal screen, and suspended window is not affiliated with the interface Activity, because without
It is influenced by the life cycle of Activity, is not also just influenced by the covering at the interface Activity.It belongs to its backstage of starting
The view of process where application program is survived in process.
Step S202 is embedded in window view in suspended window, creates the drawing surface of window view.
In order to the user interface of the application or service that make the suspended window show that user is started, background application exists
After creating suspended window, it is embedded in window view in suspended window, the window view is for drawing user interface to be shown.Here
Window view can not limit this for any view that can be shown application or service provided user interface, the present invention
System.The present embodiment is illustrated so that window view is surfaceview view as an example.
In android system, surfaceview has independent drawing surface, it is not shared same with its host window
One drawing surface.Since the user interface with independent drawing surface, surfaceview can be in an independent line
It is drawn in journey, and main thread resource will not be occupied again.On the one hand surfaceview may be implemented complicated and efficient
UI is drawn, and on the other hand not will lead to user's input again cannot timely respond to.Therefore, use surfaceview as window
View is embedded into suspended window, and complicated and efficient drafting may be implemented.
Step S203 is being drawn using the second application program or video playing service or camera service control window view
The user interface that the second application program of surface rendering or video playing service or camera service provide.
Once background application may wait for user's triggering after suspended window creation is completed, window view layout is completed
The instruction for starting the second application program or video playing service or camera service, after receiving corresponding instruction, backstage
Application program is made window view in its second application program of drawing surface rendering or view by the application started or the control of service
Frequency plays the user interface that service or camera service provide.
In a kind of implement scene, in mobile terminal (such as mobile phone) or other smart machines (such as the intelligence in automobile
Backsight mirror device) in, the scheme provided through the embodiment of the present invention realizes that the split screen at navigation interface and other application interface is aobvious
Show, facilitates user and understand navigation routine and road conditions in real time.In this scene, the second application program is navigation application, such as high
Moral navigation etc., navigation application control surfaceview in drawing surface rendering navigation user interface.Meanwhile second application program
Input of user, such as input destination, the nearest route of selection etc. can be also responded by surfaceview, thus realize with it is general
The identical function of admittance boat APP.Since navigation interface only takes up a part of display area of terminal screen, user can be
Start the other applications such as music, search in another part display area.
In another implement scene, in mobile terminal (such as mobile phone) or other smart machines (such as the intelligence in automobile
Energy backsight mirror device) in, the scheme provided through the embodiment of the present invention realizes that the split screen at video clip and other application interface is aobvious
Show, watches video convenient for user.In this scene, controlling window view is video playing service or camera service.Video
The service of broadcasting can draw for video playing application or other services, video playing Service controll surfaceview on drawing surface
Video clip processed such as watches video;Camera service also can control surfaceview in drawing surface rendering video clip, such as
Intelligent back vision mirror device has the function of automobile data recorder, provides driving picture by camera service.Only due to driving picture
A part of display area of occupied terminal screen, thus user can start in another part display area music, search etc. its
It is applied.
Step S204, when user trigger starting the first application program when, modify the dimensional parameters of suspended window, make suspended window with
The corresponding position of location parameter that the corresponding size of modified dimensional parameters is shown in terminal screen, wherein modified ruler
The corresponding size of very little parameter is less than the corresponding size of dimensional parameters before modification.
A part of display area of the suspended window occupied terminal screen created through the above steps, for showing that user is opened
The user interface of dynamic application or service.When user triggers the first application program of starting (such as in above-mentioned two implement scene
Music, search application) when, for the ease of the first application program of user's operation, the dimensional parameters of suspended window can be modified, suspended window is made
The corresponding position of location parameter of terminal screen is shown in the corresponding size of modified dimensional parameters, wherein modified
The corresponding size of dimensional parameters is less than the corresponding size of dimensional parameters before modification.Such as the window height of modification suspended window
(height) or window width (width), suspended window is reduced, original one third is such as reduced into, thus for the first application
Program reserves bigger display space.
Step S204 is the optional step of the present embodiment.If not executing step S204, journey is applied in user's starting first
After sequence, the size of suspended window is remained unchanged.
The first application program is presented in other display areas of the terminal screen other than suspended window in step S205
Validated user interface.
Since suspended window is that there are the floating frames of terminal screen top layer, for operating system, below suspended window
Display area there is still a need for distributing to specified window, this is the primary demand of system.In order to meet the demand, suspended window with
Under display area still distribute to the first application program, this requires the user interface of the first application program be located at suspended window it
Under part be inactive users interface, for example, blank interface;And the user interface of the first application program is other than suspended window
Part in other display areas is validated user interface.That is, the interface UI element of the first application program concentrates on hanging
It is presented in other display areas other than floating window.
Left and right split screen and upper and lower split screen can be realized using method provided in an embodiment of the present invention.For example, suspended window occupies eventually
The left-half of screen is held, the user interface of A is applied in display, and remaining right half part shows the user interface using B, realizes left and right
Split screen;Or the user interface of A is applied in the top half of suspended window occupied terminal screen, display, remaining lower half portion, which is shown, answers
With the user interface of B, split screen up and down is realized.And the present invention is not limited only to this, the present invention can also create multiple suspended windows, multiple outstanding
Floating window is laid out according to predeterminated position and pre-set dimension, in each suspended window can presentation user starting specified application or clothes
The user interface of business, the part other than the occupied display area of suspended window are left other application for and are presented, final energy
It is enough to realize the visual effect for more applying split screen.
The split screen method of the terminal screen provided according to that above embodiment of the present invention, by creating suspended window occupied terminal screen
A part of display area of curtain, for showing the application that user is started or the user interface serviced;Other than suspended window
The validated user interface for the first application program that other display areas of terminal screen are used to show that user is started, realizes
The user interface of multiple applications is shown simultaneously on terminal screen, to realize the visual effect of split screen.Further, can also lead to
It crosses and creates the visual effect that split screen is applied in multiple suspended windows realizations more.Using the embodiment of the present invention, user can start multiple simultaneously
Using multiple application programs are run simultaneously, are independent of each other, and the simplicity of user's operation is substantially increased.
Fig. 3 shows the functional structure signal of the split screen display available device of terminal screen according to an embodiment of the invention
Figure.As shown in figure 3, the device includes: creation module 301, window view control module 302, and presentation module 303.
Creation module 301 is suitable for creation suspended window, and the location parameter and dimensional parameters of suspended window is arranged.It is received in terminal
When the split screen instruction of user, creation module 301 creates Floatwindow.The creation of Floatwindow is related to
WindowManager interface realizes that class has WindowManagerImpl, CompatModeWrapper,
LocalWindowManager.Specifically, creation module 301 starts a Service, then creates and suspends in Service
Window.When creating suspended window, creation module 301 needs to define the layout of suspended window, pair of creation suspended window setting layout parameter
As;Window type and window background are set;Be arranged suspended window location parameter and dimensional parameters (comprising width and
height).The location parameter and dimensional parameters of suspended window determine that suspended window is shown in the default of terminal screen with pre-set dimension
Position.In order to realize that split screen effect, the pre-set dimension of suspended window should be less than the size of terminal screen.
Window view control module 302 is suitable for being embedded in window view in suspended window, and window view is to be shown for drawing
User interface.In order to the user interface of the application or service that make the suspended window show that user is started, suspend in creation
After window, window view control module 302 is embedded in window view in suspended window, and the window view is for drawing use to be shown
Family interface.Here window view can be any view that can be shown application or service provided user interface, the present invention
With no restriction to this.
By taking window view is surfaceview view as an example, surfaceview has independent in android system
Drawing surface, it does not share the same drawing surface with its host window.Due to independent drawing surface,
The user interface of surfaceview can be drawn in an independent thread, and will not occupy main thread resource again.
On the one hand surfaceview may be implemented complicated and efficient UI and draw, on the other hand not will lead to user's input again cannot get
It timely responds to.Therefore, use surfaceview to be embedded into suspended window as window view, may be implemented complicated and efficient
It draws.
Once the starting second that may wait for user's triggering is applied after suspended window creation is completed, window view layout is completed
The instruction of program or video playing service or camera service, after receiving corresponding instruction, window view control module
302, by the application started or the control serviced, broadcast window view in its second application program of drawing surface rendering or video
Put the user interface that service or camera service provide.
If user interface to be shown is the user interface that provides of the second application program, window view control module 302 into
One step is suitable for: being embedded in window view in suspended window, creates the drawing surface of window view;Utilize the second application program controlling window
The user interface that mouth view is provided in the second application program of drawing surface rendering.
In a kind of implement scene, in mobile terminal (such as mobile phone) or other smart machines (such as the intelligence in automobile
Backsight mirror device) in, the scheme provided through the embodiment of the present invention realizes that the split screen at navigation interface and other application interface is aobvious
Show, facilitates user and understand navigation routine and road conditions in real time.In this scene, the second application program is navigation application, such as high
Moral navigation etc., navigation application control surfaceview in drawing surface rendering navigation user interface.Meanwhile second application program
Input of user, such as input destination, the nearest route of selection etc. can be also responded by surfaceview, thus realize with it is general
The identical function of admittance boat APP.Since navigation interface only takes up a part of display area of terminal screen, user can be
Start the other applications such as music, search in another part display area.
If user interface to be shown is video clip, window view control module 302 is further adapted for: in suspended window
It is embedded in window view, creates the drawing surface of window view;Utilize video playing service or camera service control window view
In the video clip that drawing surface rendering video playing service or camera service provide.
In another implement scene, in mobile terminal (such as mobile phone) or other smart machines (such as the intelligence in automobile
Energy backsight mirror device) in, the scheme provided through the embodiment of the present invention realizes that the split screen at video clip and other application interface is aobvious
Show, watches video convenient for user.In this scene, controlling window view is video playing service or camera service.Video
The service of broadcasting can draw for video playing application or other services, video playing Service controll surfaceview on drawing surface
Video clip processed such as watches video;Camera service also can control surfaceview in drawing surface rendering video clip, such as
Intelligent back vision mirror device has the function of automobile data recorder, provides driving picture by camera service.Only due to driving picture
A part of display area of occupied terminal screen, thus user can start in another part display area music, search etc. its
It is applied.
Module 303 is presented to be suitable for showing suspended window into the location parameter pair in terminal screen with the corresponding size of dimensional parameters
The position answered, wherein the size of suspended window is less than the size of terminal screen;And when user triggers the first application program of starting
When, the validated user interface of the first application program is presented in other display areas of the terminal screen other than suspended window.
Since suspended window is that there are the floating frames of terminal screen top layer, for operating system, below suspended window
Display area there is still a need for distributing to specified window, this is the primary demand of system.In order to meet the demand, suspended window with
Under display area still distribute to the first application program, this requires the user interface of the first application program be located at suspended window it
Under part be inactive users interface, for example, blank interface;And the user interface of the first application program is other than suspended window
Part in other display areas is validated user interface.That is, the interface UI element of the first application program concentrates on hanging
It is presented in other display areas other than floating window.
Left and right split screen and upper and lower split screen can be realized using device provided in an embodiment of the present invention.For example, suspended window occupies eventually
The left-half of screen is held, the user interface of A is applied in display, and remaining right half part shows the user interface using B, realizes left and right
Split screen;Or the user interface of A is applied in the top half of suspended window occupied terminal screen, display, remaining lower half portion, which is shown, answers
With the user interface of B, split screen up and down is realized.And the present apparatus is not limited only to this, the present apparatus can also create multiple suspended windows, multiple outstanding
Floating window is laid out according to predeterminated position and pre-set dimension, in each suspended window can presentation user starting specified application or clothes
The user interface of business, the part other than the occupied display area of suspended window are left other application for and are presented, final energy
It is enough to realize the visual effect for more applying split screen.
Further, which may also include that modified module 304, be suitable for when user triggers the first application program of starting,
Modify the dimensional parameters of suspended window.Module 303 is presented to be further adapted for: suspended window is shown with the corresponding size of modified dimensional parameters
Show in the corresponding position of location parameter of terminal screen, wherein before the corresponding size of modified dimensional parameters is less than modification
The corresponding size of dimensional parameters.
When user triggers the first application program of starting (such as music in above-mentioned two implement scene, search application),
For the ease of the first application program of user's operation, the dimensional parameters of suspended window can be modified, join suspended window with modified size
The corresponding position of location parameter that the corresponding sizes of number are shown in terminal screen, wherein the corresponding ruler of modified dimensional parameters
The very little corresponding size of dimensional parameters being less than before modification.Such as the window height (height) or window width of modification suspended window
(width), suspended window is reduced, is such as reduced into original one third, to reserve bigger display for the first application program
Space.
The present invention also provides a kind of terminal, the split screen display available device including terminal screen described above.
The split screen device and terminal of the terminal screen provided according to that above embodiment of the present invention are occupied by creation suspended window
A part of display area of terminal screen, for showing the application that user is started or the user interface serviced;In addition to suspended window
The validated user interface for the first application program that other display areas of terminal screen in addition are used to show that user is started, it is real
The user interface of multiple applications is showed on a terminal screen while having shown, to realize the visual effect of split screen.Further,
The visual effect of split screen can be also applied by creating multiple suspended windows realizations more.Using the embodiment of the present invention, user can open simultaneously
Multiple applications are moved, multiple application programs run simultaneously, are independent of each other, and substantially increase the simplicity of user's operation.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein.
Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system
Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various
Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect
Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself
All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment
Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any
Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed
All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power
Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors
Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice
Microprocessor or digital signal processor (DSP) realize split screen device and the end of terminal screen according to an embodiment of the present invention
The some or all functions of some or all components in end.The present invention is also implemented as described here for executing
Method some or all device or device programs (for example, computer program and computer program product).This
The program that the realization of sample is of the invention can store on a computer-readable medium, or can have one or more signal
Form.Such signal can be downloaded from an internet website to obtain, and perhaps be provided on the carrier signal or with any other
Form provides.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability
Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch
To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame
Claim.