CN108279835B - Window display control method and device - Google Patents

Window display control method and device Download PDF

Info

Publication number
CN108279835B
CN108279835B CN201710007251.6A CN201710007251A CN108279835B CN 108279835 B CN108279835 B CN 108279835B CN 201710007251 A CN201710007251 A CN 201710007251A CN 108279835 B CN108279835 B CN 108279835B
Authority
CN
China
Prior art keywords
window
application
token
floating layer
active component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710007251.6A
Other languages
Chinese (zh)
Other versions
CN108279835A (en
Inventor
任晓帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710007251.6A priority Critical patent/CN108279835B/en
Publication of CN108279835A publication Critical patent/CN108279835A/en
Application granted granted Critical
Publication of CN108279835B publication Critical patent/CN108279835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction 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/0486Drag-and-drop
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction 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

Abstract

The disclosure discloses a window display control method and device. The method comprises the following steps: receiving an instruction for displaying a floating layer window in an application; configuring the attributes of the floating layer windows according to the instructions to obtain layout information for storing the attributes of the floating layer windows, wherein the types of the windows in the layout information are configured to be conversation frame types; acquiring a window token of an application window, and specifying the acquired window token as a token value of the floating layer window in the layout information; and displaying the floating layer window in the application window through the layout information. Therefore, the authority does not need to be applied, the realization of the floating layer window is not limited by the authority, in addition, the token value of the floating layer window is specified to be the window token of the application window, the floating layer window exists depending on the application window, and the window type is the dialog box type, so that the floating layer window is ensured to be displayed on the layer of the application window, and the full-screen dragging of the floating layer window is also ensured under the action of the attribute of the floating layer window.

Description

Window display control method and device
Technical Field
The present disclosure relates to the field of computer application technologies, and in particular, to a method and an apparatus for controlling window display.
Background
In the display of a screen, for example, a computer screen, a movable small window is usually displayed in the lower left or right corner of the screen to display a notification message or activity information. The mobile terminal also has a similar mechanism, and a small window can be displayed on the interface.
The small window in the mobile terminal, namely the floating layer window, can be realized in two ways. One way is to adopt a floating layer window implementation mechanism supported by an operating system in the mobile terminal by default, and the other way is to acquire a root view (rootview) of each Activity component (Activity component) and add a floating layer window in the root view.
However, for the floating window implementation mechanism supported by default by the operating system in the mobile terminal, there are two problems:
(1) the realization of the floating layer window needs to apply for the authority, and in a part of ROM (memory for storing firmware codes of the mobile terminal), the authority is closed by default and needs to be guided to be manually opened by a user, which undoubtedly causes the use cost of the user, so that a certain part of users cannot use the function;
(2) the implementation of the floating layer window in the mobile terminal is global. That is, even if the application has been switched to the background, the floating window is still displayed on the interface, thereby interfering with the display of this interface.
For another method for realizing the floating layer window, the floating layer window is realized in the window, and the interference to the display of the interface caused by the global realization of the floating layer window is avoided.
However, there is a problem that the floating layer window implemented in the window cannot be dragged across the screen, thereby greatly limiting the interactive performance of the floating layer window.
In summary, the realization of the floating layer window in the mobile terminal needs to solve the defects that the realization is limited by the authority and the full-screen dragging cannot be realized.
Disclosure of Invention
In order to solve the technical problems that the realization of a floating layer window is limited by authority and the full-screen dragging cannot be realized in the related art, the disclosure provides a window display control method and device.
A window display control method, the method comprising:
receiving an instruction for displaying a floating layer window in an application;
configuring the attributes of the floating layer windows according to the instructions to obtain layout information for storing the attributes of the floating layer windows, wherein the types of the windows in the layout information are configured to be dialog box types;
acquiring a window token of an application window, and specifying the acquired window token as a token value of the floating layer window in the layout information;
and displaying the floating layer window in the application window through the layout information.
A window display control apparatus, the apparatus comprising:
the instruction receiving module is used for receiving an instruction for displaying the floating layer window in the application;
the layout information acquisition module is used for configuring the attributes of the floating layer windows according to the instructions to obtain layout information for storing the attributes of the floating layer windows, and the window types in the layout information are configured into dialogue frame types;
the token acquisition module is used for acquiring the window token of the application window and appointing the acquired window token as the token value of the floating layer window in the layout information;
and the display module is used for displaying the floating layer window in the application window through the layout information.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
to enable the display of the floating window only in the application, an instruction for the floating window display in the application is received, configuring the attribute of the floating layer window according to the instruction to obtain layout information for storing the attribute of the floating layer window, wherein the window type in the layout information is configured to be a dialog box type, acquiring a window token of the application window, and appointing the obtained window token as the token value of the floating layer window in the layout information, displaying the floating layer window in the application window through the layout information, thus, no rights will need to be applied, so that the implementation of the floating layer window is no longer restricted by rights, and, in addition, since the token value of the floating window is specified as the window token of the application window, so that the floating window exists in adherence to the application window, and the window type is the dialog box type, so that the floating layer window is ensured to be displayed on the level of the application window, and the full-screen dragging of the floating layer window is also ensured under the action of the attribute of the floating layer window.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a block diagram illustrating an apparatus according to an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method of displaying windows in accordance with an exemplary embodiment;
FIG. 3 is a flowchart illustrating details of a step of obtaining a window token of an application window and specifying the obtained window token as a token value of a floating window in layout information according to the corresponding embodiment of FIG. 2;
FIG. 4 is a flowchart illustrating details of a window token step for obtaining an application window from an active component being run in an application according to a corresponding embodiment of FIG. 3;
FIG. 5 is a flowchart illustrating a window display control method according to another exemplary embodiment;
FIG. 6 is a simplified timing diagram illustrating a floating layer window implementation in accordance with an exemplary embodiment;
FIG. 7 is a block diagram illustrating a window display control apparatus in accordance with an exemplary embodiment;
FIG. 8 is a flowchart illustrating details of a token acquisition module according to a corresponding embodiment shown in FIG. 7;
FIG. 9 is a block diagram illustrating details of a token acquisition execution unit according to the corresponding embodiment of FIG. 7;
fig. 10 is a block diagram illustrating a window display control apparatus according to another exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Fig. 1 is a block diagram illustrating an apparatus 100 according to an example embodiment. For example, the apparatus 100 may be a mobile terminal, e.g., a smartphone or the like.
Referring to fig. 1, the apparatus 100 may include one or more of the following components: a processing component 102, a memory 104, a power component 106, a multimedia component 108, an audio component 110, a sensor component 114, and a communication component 116.
The processing component 102 generally controls overall operation of the device 100, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations, among others. The processing components 102 may include one or more processors 118 to execute instructions to perform all or a portion of the steps of the methods described below. Further, the process component 102 can include one or more modules that facilitate interaction between the process component 102 and other components. For example, the processing component 102 can include a multimedia module to facilitate interaction between the multimedia component 108 and the processing component 102.
The memory 104 is configured to store various types of data to support operations at the apparatus 100. Examples of such data include instructions for any application or method operating on the device 100. The memory 104 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. Also stored in memory 104 are one or more modules configured to be executed by the one or more processors 118 to perform all or a portion of the steps of any of the methods illustrated in fig. 2, 3, 4, and 5, described below.
The power supply component 106 provides power to the various components of the device 100. The power components 106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 100.
The multimedia component 18 includes a screen that provides an output interface between the device 100 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. The screen may further include an organic electroluminescent display (OLED).
The audio component 110 is configured to output and/or input audio signals. For example, audio component 110 includes a Microphone (MIC) configured to receive external audio signals when apparatus 100 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 104 or transmitted via the communication component 116. In some embodiments, the audio component 110 further comprises a speaker for outputting audio signals.
The sensor assembly 114 includes one or more sensors for providing various aspects of status assessment for the device 100. For example, the sensor assembly 114 may detect the open/closed status of the device 100, the relative positioning of the components, the sensor assembly 114 may also detect a change in position of the device 100 or a component of the device 100, and a change in temperature of the device 100. In some embodiments, the sensor assembly 114 may also include a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 116 is configured to facilitate wired or wireless communication between the apparatus 100 and other devices. The device 100 may access a wireless network based on a communication standard, such as WiFi. In an exemplary embodiment, the communication component 116 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 116 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 100 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the methods described below.
FIG. 2 is a flow chart illustrating a method of displaying a window in accordance with an exemplary embodiment. The window display control method is applicable to the apparatus 100 shown in fig. 1. The window display control method, as shown in fig. 2, may include the following steps.
In step 210, an instruction for displaying a floating window in an application is received.
The application can be any application running in the mobile terminal, and the mobile terminal is a terminal loaded with an Android operating system. The application is operated on the mobile terminal and is provided with a corresponding application window so as to realize the display of the application. It should be noted that an application window, broadly any window of the application, includes sub-windows attached to a window, and is not a specific window.
The floating window is a window displayed in the uppermost layer in a floating manner. When the application window is created or activated during the running of the application, an instruction for displaying the floating layer window in the application is triggered and generated.
And the implementation process of the floating layer window in the application can be executed after the instruction for displaying the floating layer window in the application is received.
In step 230, the floating layer window attribute is configured according to the instruction to obtain layout information for storing the floating layer window attribute, and the window type in the layout information is configured as a dialog box type.
The realization of each window has the corresponding window attribute, and the layout and the display of the corresponding window are ensured through the window attributes. For the currently performed floating layer window creation, correspondingly, the floating layer window attribute also needs to be configured, so as to obtain the layout information storing the floating layer window attribute.
In one exemplary embodiment, the float window attributes include window type, length and width, background, display location. In the subsequent floating layer window display, the display position of the floating layer window changes along with the movement of the floating layer window. Specifically, the layout information is windowmanager, layout params, and the floating layer window attribute exists as a parameter in windowmanager, layout params.
In the floating window implementation of the present invention, the window TYPE of the floating window is configured as a DIALOG box TYPE, i.e., TYPE _ APPLICATION _ identified _ DIALOG, i.e., the floating window is essentially a DIALOG box.
The floating layer window is realized through a floating layer window realization mechanism supported by an operating system in a default mode, and because a system window is used, permission needs to be applied, so that the realization of the floating layer window is limited by the permission.
The dialog box type window is a window which does not need to apply for permission. On the other hand, the window TYPE in the APPLICATION window is a PANEL window TYPE, i.e., TYPE _ APPLICATION _ PANEL, and is a child window with the highest display hierarchy in the APPLICATION. In this case, the floating layer window is configured to be a dialog box type window, and the realized floating layer window can be ensured to be above any application window in display, so that the problem of authority is ingeniously avoided, the floating layer window is created, and the display level of the floating layer window is ensured to be higher than any application window in the application.
Based on this, the floating layer window is used as a single window and exists on the application window to move randomly, and the floating layer window is ensured not to cause interference on the original functions of the application.
In step 250, a window token of the application window is obtained, and the obtained window token is specified in the layout information as a token value of the floating-layer window.
The window token is used for marking the active component to which the window token belongs, and for the child window, the window token identifies the parent window to which the child window belongs, and for the implementation of an IPC (inter-process communication) call, the window token also passes through a driver object (Binder object) pointed by an application window where the window token is located, so that the IPC call of the window can be implemented by the window management service through the driver object.
Specifying the token value of the floating-layer window in the layout information as the window token of the application window will cause the floating-layer window to be present in display in adherence to the application window. The application window corresponding to the acquired window token is the application window which is currently activated by the application, so that the floating layer window is ensured to be above the application window which is currently activated by the application to be switched to be displayed previously.
In step 270, a floating layer window is displayed in the application window by the layout information.
The view of the floating layer Window, namely view, can be obtained through the layout information, and the display of the floating layer Window on the application Window can be realized by adding the view to a Window management interface function (Window Manager).
Therefore, in step 270, the specific process is as follows: and obtaining the view of the floating layer window through the layout information, obtaining a window management interface function, and adding the view of the floating layer window to the window management interface function to realize the floating display of the floating layer window in the application window.
It can be understood that the window management interface function encapsulates a method for adding a view to a screen, namely an addView method, so that the view addition performed on the window management interface function can realize window display in the screen, namely display of a floating layer window.
Through the process, the floating layer is realized on the application window in the mobile terminal in the form of the window, on one hand, the mechanism of the system is utilized without applying for the authority, and on the other hand, the realized floating layer window and the application window are not in the same layer, so that the possibility of mutual interference is avoided.
In addition, as can be seen from the above process, the floating layer window is implemented by adding a common view, so that the floating layer window has the same functions as the common view, for example, functions implemented by animation and functions of free movement, and the floating layer window can be freely moved on the full screen.
Fig. 3 is a flow chart illustrating the details of step 250 according to the corresponding embodiment of fig. 2. This step 250, as shown in FIG. 3, may include the following steps.
In step 251, a window token for an application window is obtained from an active component being run in the application.
Wherein the launching and running of active components in the application is used to enable the display of application windows in the application, each active component having one or more views. For example, when it corresponds to the display of only one application window, the corresponding active component has one view; however, if there are multiple application window displays, i.e., parent and child windows, then there are multiple views of the corresponding active component.
In the application, the creation and activation of the application window are realized by the running active component, and the window token indicates the application window to which the window token is attached for the subsequently created floating window, that is, the subsequently created floating window is a child window of the current application window, so that the token value is the token in the window of the current application window, and the corresponding active component obtains the token.
In step 253, the window token is specified as the token value of the floating-level window in the layout information.
And the assignment of the floating layer window password token value is realized in the layout information, namely the token value of the floating layer window in the layout information is the obtained window token in terms of value.
In a specific implementation of one exemplary embodiment, the designation of the token value for the floating layer window may be accomplished by executing an mlayoutparams.
Fig. 4 is a flowchart illustrating details of step 251 according to the corresponding embodiment of fig. 3. This step 251, as shown in fig. 4, may include the following steps.
At step 2511, the lifecycle of the active components in the application is monitored to obtain the active components for which the application window is created or activated.
At step 2513, a window token for the application window is obtained from the active component for which the application window was created or activated.
It can be understood that, the implementation of the floating layer window in the application is based on the application window that has been created or activated to switch to the foreground, so that the floating layer window exists only when the application creates or activates the application window, and the floating layer window display of the application does not exist if the application switches to the background operation or exits from the operation.
Based on this, lifecycle monitoring of active components in the application needs to be performed. As previously described, the active component is used to implement an application window, e.g., create or activate an application window. After an active component is started, the creation or activation of a corresponding application window is performed during the running process of the active component.
Thus, the active component for which the application window is created or activated is obtained through listening of the lifecycle of the active component in the application.
In a specific implementation of an exemplary embodiment, lifecycle listening for active components in an application will be implemented using characteristics of the system.
Specifically, the system characteristic is an ActivityLifecycleCallbacks interface, and an implementation mode in the interface is an observer mode which can monitor the life cycle of all active components in the application.
In a specific implementation, only registration snooping is required. The window token is obtained from the active component when the active component is performing window creation, e.g., performing an onCreate method, or is activated, e.g., performing an onResume method.
Through the process, specific implementation is provided for obtaining the token value in the creation of the floating layer window, and the token value configuration of the floating layer window can be completed through direct assignment of the obtained window token of the application window.
The realization of the monitoring of the life activity cycle of the movable assembly is provided by the system, so the separation of the codes of the floating layer window and other codes in the application can be realized under the condition of not increasing the codes, the functions are not influenced mutually, but the functions of the floating layer window can be increased, the non-invasive design of the floating layer window is realized, the uncertainty of the functions in the application and the application breakdown caused by the uncertainty of the functions in the application are further avoided, and the stable and reliable running of the application with the functions of the floating layer window is increased.
Fig. 5 is a flowchart illustrating a window display control method according to another exemplary embodiment. The window display control method, as shown in fig. 5, further includes the following steps after step 270.
In step 310, after the application window is destroyed or switched to the background, the monitoring result that the application window of the active component is destroyed or switched to the background is obtained through the active component monitoring.
In step 330, whether an active component exists in the application, wherein the active component is created or activated by the application window, is determined according to the monitoring result trigger, if not, step 350 is entered, and if yes, step 250 is returned.
In step 350, the floating layer window is destroyed according to the monitoring result.
The embodiment corresponding to fig. 3 realizes the display of the floating layer window on the application window in the application, and for the floating layer window displayed along with the attached application window, the floating layer window is destroyed or switched to the background, that is, the application window is removed in the current display of the screen, at this time, the application window attached to the floating layer window no longer exists, so the floating layer window has to be destroyed, and the floating layer window is correspondingly removed in the current display of the screen.
In the display of the floating layer window in the application, the monitoring of the active component is continuously performed, and when it is monitored that the application window which is originally displayed is destroyed or switched to the background by the active component, for example, the active component executes an onDestroy method to destroy the displayed application window, or executes an onPause method to switch the displayed application window to the background, at this time, if there is no other active component in the application to execute the creation or activation of the application window, the floating layer window can only be destroyed, and the floating layer window is removed in the display of the screen.
When the currently displayed application window is destroyed or switched to the background by the corresponding active component, if there is another active component in the application to create the application window or activate the application window, the process returns to step 250, and the window token is obtained from the other active component by executing step 250 and is specified as the token value in the layout information of the floating layer window, at this time, the floating layer window displayed by the layout information is a child window of the application window of the other active component and is attached to the application window of the other active component.
Through the process, the floating layer window can be displayed in the whole application window display process, namely, the floating layer window can be displayed as long as the window display exists in the application.
During the process of running the application by the mobile terminal, because an active component always exists, the floating layer window is always displayed.
In another exemplary embodiment, after step 350, the window display control method further includes the following steps.
After the application window is switched to the background, the lifecycle monitoring of the active components in the application is continuously carried out, and the monitoring result that the application window is reactivated is obtained.
And triggering to execute the step 250 according to the monitoring result that the application window is reactivated, so that the application switched from the background to the foreground can display the floating layer window.
As mentioned above, as the application is switched to the background, the application window displayed by the application is also switched to the background, and for the floating layer window attached to the application window, the floating layer window is destroyed and removed from the screen.
At this time, for the application which is still running, the lifecycle monitoring of the active component in the application is still performed, so that the reactivation of the application window in the application can be monitored in time, and the display of the floating layer window can be realized in time along with the switching of the application window to the front.
Specifically, as the application is switched from the background to the foreground again, the application window is also switched to the foreground, that is, the active component executes the onResume method to be reactivated, and at this time, it is monitored that the active component is activating the window, and a corresponding monitoring result is output.
FIG. 6 is a simplified timing diagram illustrating a floating layer window implementation, according to an example embodiment. As shown in fig. 6, for the implementation of the floating layer window in the application, it will be implemented by the Activity of the application.
Specifically, when the Activity executes the onCreate method or the onResume method, that is, when step 1 is executed, the display of the application window is realized, and the application window exists as a parent window for the floating window, and the Activity also exists as a parent window Activity for the floating window.
At this time, step 2 is executed, and a token value of the Activity of the parent window, namely the window token of the application window, is introduced, so that the token uniquely identifies the application window on one hand and the Activity on the other hand.
For the creation of the floating layer window, the floating layer window can be displayed after the window token of the application window is obtained.
If the parent window Activity executes step 3, that is, executes the onDestroy method or the onPause method to destroy the parent window or switch the parent window to the background, the token value will be null, that is, null, and the null will be transmitted, and at this time, the floating layer window will be removed from the screen.
The following are embodiments of the disclosed apparatus, which may be used to implement the above-described embodiments of the window display control method of the present disclosure. For details not disclosed in the embodiments of the disclosed apparatus, please refer to the embodiments of the disclosed window display control method.
Fig. 7 is a block diagram illustrating a window display control apparatus according to an exemplary embodiment. The window display control device, as shown in fig. 7, includes but is not limited to: an instruction receiving module 510, a layout information obtaining module 530, a token obtaining module 550, and a display module 570.
The instruction receiving module 510 is configured to receive an instruction for displaying a floating layer window in an application.
The layout information obtaining module 530 is configured to configure the floating layer window attribute according to the instruction to obtain layout information for storing the floating layer window attribute, where the window type in the layout information is configured to be the dialog box type.
The token obtaining module 550 is configured to obtain a window token of the application window, and specify the obtained window token as a token value of the floating layer window in the layout information.
And a display module 570 for displaying the floating layer window in the application window through the layout information.
Fig. 8 is a flowchart illustrating details of the token acquisition module according to a corresponding embodiment shown in fig. 7. The token obtaining module 550, as shown in fig. 8, may include but is not limited to: a token acquisition execution unit 551 and a token introduction unit 553.
A token obtaining execution unit 551, configured to obtain a window token of an application window from an active component being run in the application.
A token passing-in unit 553 for designating the window token as the token value of the floating-layer window in the layout information.
Fig. 9 is a block diagram illustrating details of a token obtaining execution unit according to the corresponding embodiment shown in fig. 7. The token obtaining execution unit 551, as shown in fig. 9, includes but is not limited to: a lifecycle listening subunit 5511 and a window token acquisition subunit 5513.
And a life cycle monitoring subunit 5511, configured to monitor a life cycle of an active component in the application, and obtain the active component for which the application window is created or activated.
A window token obtaining subunit 5513, configured to obtain a window token of an application window from an active component in which the application window is created or activated.
Fig. 10 is a block diagram illustrating a window display control apparatus according to another exemplary embodiment. The window display control device, as shown in fig. 10, includes but is not limited to: the active component monitoring module 710, the determining module 730, and the floating layer destruction module 750.
The active component monitoring module 710 is configured to monitor, after the application window is destroyed or switched to the background, a monitoring result that the application window of the active component is destroyed or switched to the background is obtained through the active component;
the determining module 730 is configured to trigger, according to the monitoring result, to determine whether an active component in which the application window is created or activated exists in the application, if not, notify the floating layer destruction module 750, and if so, trigger the token obtaining module 550.
The floating layer destruction module 750 is configured to destroy the floating layer window according to the monitoring result.
In another exemplary embodiment, the window display control apparatus further includes a continuous listening module.
And the continuous monitoring module is used for continuously monitoring the life cycle of the active component in the application after the application window is switched to the background, acquiring a monitoring result of the reactivated application window, and triggering the token acquisition module according to the monitoring result.
Optionally, the present disclosure further provides a mobile terminal, which may be the apparatus shown in fig. 1, and execute all or part of the steps of the window display control method shown in any one of fig. 2, fig. 3, fig. 4, and fig. 5. The device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform:
receiving an instruction for displaying a floating layer window in an application;
configuring the attributes of the floating layer windows according to the instructions to obtain layout information for storing the attributes of the floating layer windows, wherein the types of the windows in the layout information are configured to be dialog box types;
acquiring a window token of an application window, and specifying the acquired window token as a token value of the floating layer window in the layout information;
and displaying the floating layer window in the application window through the layout information.
The specific manner in which the processor of the apparatus in this embodiment performs operations has been described in detail in the embodiment related to the window display control method, and will not be explained in detail here.
In an exemplary embodiment, a storage medium is also provided that is a computer-readable storage medium, such as may be transitory and non-transitory computer-readable storage media, including instructions. The storage medium refers to, for example, the memory 204 including instructions executable by the processor 218 of the apparatus 200 to perform the window display control method.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (13)

1. A window display control method, characterized in that the method comprises:
receiving an instruction for displaying a floating layer window in an application;
configuring the attribute of the floating layer window according to the instruction to obtain layout information for storing the attribute of the floating layer window, wherein the window type in the layout information is configured to be a dialogue frame type, and the dialogue frame type window is a window which does not need to apply for permission;
acquiring a window token of an application window, and specifying the acquired window token as a token value of the floating layer window in the layout information, wherein the window type in the application window is a panel window type;
and displaying the floating layer window in the application window through the layout information.
2. The method of claim 1, wherein the obtaining the window token of the application window and specifying the obtained window token as the token value of the floating-layer window in the layout information comprises:
obtaining a window token for an application window from an active component being run in the application;
designating the window token as a token value for the floating-level window in the layout information.
3. The method of claim 2, wherein obtaining a window token for an application window from an active component being run in the application comprises:
monitoring the life cycle of an active component in the application to obtain the active component of which the application window is created or activated;
obtaining a window token for the application window from an active component in which the application window is created or activated.
4. The method of claim 3, wherein after the displaying the floating-layer window in the application window by the layout information, the method further comprises:
after the application window is destroyed or switched to the background, a monitoring result that the application window of the active component is destroyed or switched to the background is obtained through the active component monitoring;
triggering and judging whether an active component with an application window created or activated exists in the application according to the monitoring result, and if not, judging whether the active component exists in the application window
And destroying the floating layer window according to the monitoring result.
5. The method of claim 4, further comprising:
and returning to the step of acquiring the window token of the application window and appointing the acquired window token as the token value of the floating layer window in the layout information if the active component of the application window which is created or activated exists in the application according to the monitoring result trigger.
6. The method of claim 4, wherein after destroying the floating window according to the listening result, the method further comprises:
after the application window is switched to the background, continuously monitoring the life cycle of an active component in the application, and obtaining the monitoring result of the reactivated application window;
and triggering and executing the window token of the acquired application window according to the monitoring result, and designating the acquired window token as the token value of the floating layer window in the layout information.
7. A window display control apparatus, characterized in that the apparatus comprises:
the instruction receiving module is used for receiving an instruction for displaying the floating layer window in the application;
the layout information acquisition module is used for configuring the attributes of the floating layer windows according to the instructions to obtain layout information for storing the attributes of the floating layer windows, the window types in the layout information are configured to be dialogue frame types, and the dialogue frame type windows are windows which do not need to apply for permission;
the system comprises a token acquisition module, a token acquisition module and a display module, wherein the token acquisition module is used for acquiring a window token of an application window, and appointing the acquired window token as a token value of a floating layer window in layout information, and the window type in the application window is a panel window type;
and the display module is used for displaying the floating layer window in the application window through the layout information.
8. The apparatus of claim 7, wherein the token acquisition module comprises:
a token obtaining execution unit, configured to obtain a window token of an application window from an active component running in the application;
a token passing-in unit for designating the window token as a token value of the floating-layer window in the layout information.
9. The apparatus of claim 8, wherein the token obtaining execution unit comprises:
the life cycle monitoring subunit is used for monitoring the life cycle of the activity component in the application and obtaining the activity component of which the application window is created or activated;
a window token obtaining subunit, configured to obtain a window token of the application window from the active component in which the application window is created or activated.
10. The apparatus of claim 9, further comprising:
the active component monitoring module is used for acquiring a monitoring result that the application window of the active component is destroyed or switched to the background through the active component monitoring after the application window is destroyed or switched to the background;
the judging module is used for triggering and judging whether an application window is created or activated in the application or not according to the monitoring result, and if not, the judging module informs the floating layer destroying module;
the floating layer destroying module is used for destroying the floating layer window according to the monitoring result.
11. The apparatus according to claim 10, wherein the determining subunit is further configured to trigger the token obtaining module if it is determined that there is an active component in the application, where an application window is created or activated, according to the listening result trigger.
12. The apparatus of claim 10, further comprising:
and the continuous monitoring module is used for continuously monitoring the life cycle of the active component in the application after the application window is switched to the background, obtaining the monitoring result of the reactivated application window and triggering the token acquisition module according to the monitoring result.
13. A computer-readable storage medium, on which a computer program is stored, the computer program being for a processor to carry out the method of any one of claims 1 to 6.
CN201710007251.6A 2017-01-05 2017-01-05 Window display control method and device Active CN108279835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710007251.6A CN108279835B (en) 2017-01-05 2017-01-05 Window display control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710007251.6A CN108279835B (en) 2017-01-05 2017-01-05 Window display control method and device

Publications (2)

Publication Number Publication Date
CN108279835A CN108279835A (en) 2018-07-13
CN108279835B true CN108279835B (en) 2021-03-02

Family

ID=62800499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710007251.6A Active CN108279835B (en) 2017-01-05 2017-01-05 Window display control method and device

Country Status (1)

Country Link
CN (1) CN108279835B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958876B (en) * 2018-07-23 2022-02-01 郑州云海信息技术有限公司 Display method and device of browser page
CN109246466B (en) * 2018-10-30 2021-06-11 北京达佳互联信息技术有限公司 Video playing method and device and electronic equipment
CN109933401B (en) * 2019-03-22 2023-01-24 北京城市网邻信息技术有限公司 Display method and device of suspended window view
DE112021001955T5 (en) * 2021-03-01 2023-01-26 Boe Technology Group Co., Ltd. INTERFACE DISPLAY METHOD AND APPARATUS, COMPUTER READABLE STORAGE MEDIUM AND ELECTRONIC DEVICE

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101000611A (en) * 2006-08-29 2007-07-18 曾文均 Method for providing and inquiry information for public by interconnection network
CN101562636A (en) * 2009-05-26 2009-10-21 腾讯科技(北京)有限公司 Method, device and system for displaying advertising messages
CN102830928A (en) * 2012-08-14 2012-12-19 北京金山软件有限公司 Method and device for acquiring text inquiry result and mobile equipment
CN104238746A (en) * 2014-08-25 2014-12-24 联想(北京)有限公司 Information processing method and electronic equipment
CN104899269A (en) * 2015-05-26 2015-09-09 北京金山安全软件有限公司 Method and device for accessing website link

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2385224C (en) * 2002-05-07 2012-10-02 Corel Corporation Dockable drop-down dialogs

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101000611A (en) * 2006-08-29 2007-07-18 曾文均 Method for providing and inquiry information for public by interconnection network
CN101562636A (en) * 2009-05-26 2009-10-21 腾讯科技(北京)有限公司 Method, device and system for displaying advertising messages
CN102830928A (en) * 2012-08-14 2012-12-19 北京金山软件有限公司 Method and device for acquiring text inquiry result and mobile equipment
CN104238746A (en) * 2014-08-25 2014-12-24 联想(北京)有限公司 Information processing method and electronic equipment
CN104899269A (en) * 2015-05-26 2015-09-09 北京金山安全软件有限公司 Method and device for accessing website link

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"android APP应用在锁屏界面之上的时候怎么弹消息,Toast.makeText弹不出消息,用自定义窗口模式";W歹匕示申W;《https://blog.csdn.net/csh86277516/article/details/52470650?utm_source=blogxgwz9》;20160908;正文第1页 *
"Android悬浮窗体问题";Superr爬爬虫;《https://blog.csdn.net/wangbole/article/shareArticleCardPage?article_id=8535502》;20130123;正文第1页 *

Also Published As

Publication number Publication date
CN108279835A (en) 2018-07-13

Similar Documents

Publication Publication Date Title
CN113473204B (en) Information display method and device, electronic equipment and storage medium
CN108279835B (en) Window display control method and device
KR102318877B1 (en) Apparatus and method for displaying user interface
CN105955765B (en) Application preloading method and device
EP3073379A1 (en) Firmware recovery method, device and terminal
KR20160077011A (en) Method and apparatus for adjusting operating status of smart home device
CN105260671A (en) Control method and device for notification bar of mobile terminal and mobile equipment
CN106775709B (en) Prompt message display method and device
CN109669730B (en) Process keep-alive method, device, electronic equipment and medium
US20150026648A1 (en) Method for triggering applications with a smart device
US20200186484A1 (en) Method and apparatus for processing image in application, terminal device and storage medium
EP3232325B1 (en) Method and device for starting application interface
CN110851057A (en) Method and device for configuring configuration options of BIOS
CN107463372B (en) Data-driven page updating method and device
CN108132736B (en) Display control method and device in window
US11397596B2 (en) Method and device for controlling pop-up window, electronic device, and storage medium
CN109783144B (en) Method and device for processing variable in interactive realization of virtual environment and storage medium
CN107402756B (en) Method, device and terminal for drawing page
CN107436782B (en) Application silent installation method and device
CN112631492A (en) Task creation method and device
EP3200075A1 (en) Method and device for calling process
CN107426401B (en) Mute reminding method, device and terminal
CN107368562B (en) Page display method and device and terminal
US11347988B2 (en) Method and device for configuring NFC smart card
CN109213550B (en) Interactive implementation method, device and equipment of embedded application and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant