CN117472489A - Popup window display method, popup window display device, popup window display equipment and storage medium - Google Patents
Popup window display method, popup window display device, popup window display equipment and storage medium Download PDFInfo
- Publication number
- CN117472489A CN117472489A CN202311235741.3A CN202311235741A CN117472489A CN 117472489 A CN117472489 A CN 117472489A CN 202311235741 A CN202311235741 A CN 202311235741A CN 117472489 A CN117472489 A CN 117472489A
- Authority
- CN
- China
- Prior art keywords
- popup
- popup window
- label
- class
- current
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 80
- YWXYYJSYQOXTPL-SLPGGIOYSA-N isosorbide mononitrate Chemical compound [O-][N+](=O)O[C@@H]1CO[C@@H]2[C@@H](O)CO[C@@H]21 YWXYYJSYQOXTPL-SLPGGIOYSA-N 0.000 claims description 7
- 230000004044 response Effects 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 6
- 230000008034 disappearance Effects 0.000 claims description 4
- 230000000694 effects Effects 0.000 description 17
- 230000007246 mechanism Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 230000001360 synchronised effect Effects 0.000 description 6
- 230000004888 barrier function Effects 0.000 description 4
- 230000000903 blocking effect Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000009977 dual effect Effects 0.000 description 2
- 239000012634 fragment Substances 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 206010021639 Incontinence Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- 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
-
- 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application discloses a popup window display method, which comprises the following steps: acquiring a current label of a target interface; judging whether the current tag is the same as the expected tag in the display callback of the popup window; if the current label is the same as the expected label, setting the multi-label control in the target interface to be in a closed state, and setting the multi-label control to be in an open state when a popup window corresponding to the current label is drawn on the screen; if the current tag is different from the expected tag, closing the popup window displayed in the current tag, and putting the popup window displayed at present into the popup window queue again. The problem of the indiscriminate bullet of bullet window can be improved to this application.
Description
Technical Field
The present disclosure relates to the field of interface display technologies, and in particular, to a method, an apparatus, a device, and a storage medium for popup display.
Background
To facilitate the user to switch and browse different modules, the home page of the App usually needs to present a plurality of different functional or content modules, so that a plurality of labels are often present on the home page of the App to display these different functions or content classifications in different label pages, and the switching of the labels is implemented by carrying different fragments by one activity. In order to maintain the context of the user interface consistent and user expectations, it is often necessary to pop up a pop-up window over the fixed label.
However, when the labels are switched rapidly, the popup window can be displayed on other labels which are not expected, namely, the popup window popup phenomenon occurs.
Disclosure of Invention
The application provides a popup window display method, a popup window display device, popup window display equipment and a popup window storage medium, which can improve the phenomenon of popup window popup.
In a first aspect, the present application provides a pop-up window display method, including:
acquiring a current label of a target interface;
judging whether the current tag is the same as the expected tag in the display callback of the popup window;
if the current label is the same as the expected label, setting the multi-label control in the target interface to be in a closed state, and setting the multi-label control to be in an open state when a popup window corresponding to the current label is drawn on the screen;
if the current tag is different from the expected tag, closing the popup window displayed in the current tag, and putting the popup window displayed at present into the popup window queue again.
If the current tag is different from the expected tag, closing a popup window displayed in the current tag, including:
creating a target popup class in the popup queue, wherein the target popup class inherits popups in the popup queue;
adding an interface name and a popup window display method and a popup window disappearance method defined in an interface into a target popup window class;
and when the current label is different from the expected label, calling a popup vanishing method in the target popup class.
The further technical scheme is that an interface for displaying the callback is arranged in the target popup window class.
The further technical scheme is that an interface for displaying callback is arranged in a target popup window class, and the method comprises the following steps:
and setting a class object in the target popup class, wherein the class object inherits the display monitor of the target popup class.
The method further comprises the steps of setting a marking bit in a click event of a response multi-label, wherein the marking bit comprises an enabling state and a disabling state, and setting the multi-label control in a target interface to be in a closing state, and the method comprises the following steps:
setting the flag bit to an enabled state;
setting the multi-label control to an open state includes:
the flag bit is set to a disabled state.
The method further comprises the following steps:
adding a frame callback operation in a preset dancer class;
judging the relation between the number of frame callback times and the preset number of times, and if the number of frame callback times meets the preset number of times, indicating that the popup window corresponding to the current tag is drawn on the screen.
The further technical proposal is that the preset times range is 1-3.
In a second aspect, the present application provides a popup window display device comprising means for performing a method as any one of the above described methods of the present application.
In a third aspect, the present application provides a popup display device comprising a display and a controller for performing the steps of any of the methods described herein above.
In a fourth aspect, the present application also provides a computer readable storage medium storing a computer program for implementing a pop-up display method as described above when executed by a controller.
The beneficial effects of this application are: compared with the prior art, the method and the device have the advantages that the current label of the target interface is obtained, the current label and the expected label are judged, when the current label is identical to the expected label, the multi-label control in the target interface is set to be in a closed state, so that a user is blocked from clicking the multi-label control in time, when the popup window is not drawn yet, the user clicks the multi-label control to switch the label, the popup window corresponding to the current label is caused to appear on the switched label, when the current label is different from the expected label, the popup window displayed in the current label is closed, the popup window displayed at present is put back in a popup window queue again, and the replaced popup window is displayed again when the corresponding correct label appears.
In addition, because the message queue will add the synchronous barrier to block the synchronous message, so that the asynchronous message can be executed preferentially, and the user tag-cutting click event contained in the asynchronous message needs to be processed inside the system, the programmer cannot interfere, that is, the phenomenon that the popup window appears in disorder generally appears in the execution of the asynchronous message.
And because the popup window can indicate that the asynchronous message is executed completely when the popup window displays the callback, the method and the device can ensure that the popup window appears on the correct label by judging the current label and the expected label in the time of displaying the popup window, and avoid the problem of popup window disordered popup caused by the fact that the user cuts the label and clicks the event again in the asynchronous message executing process because the asynchronous message is not ensured to be executed completely when the popup window displays the callback.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. Wherein:
fig. 1 is an execution schematic diagram of a message queue in a pop-up window display method provided in the present application;
fig. 2 is a schematic flow chart of a first embodiment of a pop-up window display method provided in the present application;
FIG. 3 is a flowchart of a second embodiment of a pop-up window display method provided in the present application;
fig. 4 is a schematic flow chart of a third embodiment of a pop-up window display method provided in the present application;
fig. 5 is an interaction schematic diagram of the inside of the system in the popup window display method provided in the present application;
fig. 6 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are for purposes of illustration only and are not limiting. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
First, terms of art to which the present application relates are explained.
tab (tab or label): tab is a common user interface element for switching different views or functions. It is typically located at the top or bottom of the screen and is presented in a horizontal arrangement. By clicking on a different tab, the user can switch to the corresponding page or module.
Activity (Activity object): activity is a basic component in Android applications for exposing user interfaces and responding to user interactions. An application is typically made up of a number of activities, each representing a separate user interface. The Activity may be initiated by other components, as well as other activities.
Dialog (Dialog or popup): dialogs are a floating user interface element for displaying short-term tasks, warnings, or other information that requires user confirmation. The dialog box may be displayed in a popup window over the current interface and may block other operations until the user responds. It typically contains text, buttons and other interactive elements for simple interaction with the user.
Where Message, tab, and Dialog are displayed in a floating or fixed manner over the current interface, they typically do not occupy the primary content area. Activity is an independent page, which may contain tab, message, and Dialog as the main interactive interface for the entire application.
To facilitate the user to switch and browse different modules, the home page of the App usually needs to present a plurality of different functional or content modules, so that a plurality of labels are often present on the home page of the App to display these different functions or content classifications in different label pages, and the switching of the labels is implemented by carrying different fragments by one activity. In order to maintain the context of the user interface consistent and user expectations, it is often necessary to pop up a pop-up window over the fixed label.
However, when the labels are switched quickly, the popup window will appear on other labels which are not expected, namely, the popup window popup phenomenon occurs, and referring to fig. 1 specifically.
In the android system, the bottom layer uses one Message Queue (Message Queue) to handle different events and tasks. This message queue acts as an event scheduler responsible for sending various messages to the corresponding handler in a particular order to execute the corresponding code logic. When a user interacts with the android device, or when certain events occur in the system, such as clicking a button, touching a screen, receiving a notification, etc., these events are converted into corresponding messages and sent to a message queue. Each message contains an identifier and associated data for uniquely identifying the message and conveying the necessary information.
The main loop of the android system (also called a message loop) then takes messages from the message queue and sends them to the corresponding handler (typically via a message handling function or callback function) to execute the corresponding code logic. The handler responds accordingly, e.g., updates the interface, handles user input, initiates services, etc., depending on the type and content of the message.
For example, when the popup (i.e. Dialog) triggers logic execution, the popup is driven by a message (i.e. message), and by means of a message queue, the android system can effectively manage and schedule various events and tasks, so that the execution sequence and response speed of codes are ensured. The asynchronous message processing mechanism enables the android application to have good response performance and user experience.
Meanwhile, when a UI drawing operation Message is sent to the main thread, because there are many messages in the Message queue at this time, the processing of the Message may be delayed, and the drawing may not be timely to cause interface blocking, so in order to ensure the timeliness and smoothness of UI drawing, the Message queue may add a synchronization barrier, that is, when a Message (such as Message-a in fig. 1) triggers that a UI drawing related operation is required, the android bottom layer may add an asynchronous Message (such as Message-B in fig. 1) to the Message queue, so as to block the synchronous Message (such as Message-C in fig. 1) and ensure that the asynchronous Message (such as Message-B in fig. 1) can be preferentially executed.
Specifically, executing the message A, and when the window is added to the frame work layer Window manager in the Dialog, sending an immediately executed message-C to the queue to notify the display callback of the pop (i.e. the onshaw callback of the Dialog); when the window is added to the message a, the message queue will eventually call to the viewrootpmpl to trigger drawing of a frame, and at this time, the message queue will add a synchronous barrier, i.e. add an asynchronous message, i.e. message-B of fig. 1, and after the message-a is executed, the system will execute the asynchronous message-B of drawing preferentially.
A click event may be processed in an asynchronous message, so that a user's tab-cutting click event may be included in message-B, and an asynchronous message is a message that belongs to the processing of the asynchronous message in the system, that is, a tab-cutting click event in message-B belongs to the processing of the asynchronous message, and a programmer cannot interfere with the processing of the asynchronous message, so that if a tab-cutting click event of the user is included in message-B and is not processed in a subsequent message, a problem that a popup window finally displays on other tabs, that is, a popup window is disordered occurs.
Although the related art triggers the tab determination operation when the tab is switched rapidly, that is, determines whether the tab currently located is consistent with the tab expected by the Dialog, if so, triggers the pop-up, and if not, waits for being awakened in the pop-up window queue. However, in the related art, the judgment is performed at the time of triggering the display of the dialogs, and because the asynchronous operation of the message queue is not completely completed at the time of triggering the display of the dialogs, the phenomenon of popup window disorder still occurs in the follow-up after the judgment is performed at the time of triggering the display of the dialogs.
Therefore, in order to solve the technical problem that the popup window is disordered in the prior art, the application provides a popup window display method. See in particular the examples below.
The popup window display method provided by the application is described in detail below. Referring to fig. 2 specifically, fig. 2 is a flow chart of a first embodiment of a pop-up window display method provided in the present application. The method comprises the following steps:
step 101: and acquiring the current label of the target interface.
The target interface may be an interface currently presented by the app, and a tab where the target interface is currently located may be queried through an abstract interface. For example, the interface can be realized by using the activity object of the home page, and the tab switching is processed in the multi-tab control click event, so that the current label of the target interface is obtained.
The method and the device solve the problem that a Dialog type popup window needs to be transmitted into an activity object when the Dialog type popup window is constructed, so that a corresponding home page activity object is acquired in the Dialog, and tab of a current interface can be queried through the activity object.
Step 102: and judging whether the current tag is the same as the expected tag in the display callback of the popup window.
The message queue shown in FIG. 1, for example, determines in the onShow callback message-C of Dialog whether the current tab is consistent with the intended tab.
Because the android bottom layer can execute the asynchronous message preferentially under the condition of the synchronous barrier, when the asynchronous message is executed, the synchronous Dialog callback message is executed, so that the label is judged in the display callback time of the popup window, the asynchronous operation can be ensured to be completed, the phenomenon that popup window is disordered due to the fact that tab clicking events in the asynchronous message cannot be processed in time by a system is avoided, the popup window is ensured to be displayed on a proper page under proper conditions, and the user experience is improved.
Step 103: if the current label is the same as the expected label, setting the multi-label control in the target interface to be in a closed state, and setting the multi-label control to be in an open state when the popup window corresponding to the current label is drawn on the screen.
Because the current label is the same as the expected label, when the popup window is not drawn yet, the multi-label control in the target interface needs to be set to be in a closed state so as to prevent the user from switching the label, and the popup window after drawing is finished appears on the switched label.
Wherein the visibility or disabled state of the multi-label control may be set to prevent the user from switching labels
In addition, the popup usually contains some important information or operation options, if the tag is switched when the popup is not drawn yet, the popup content may be only displayed partially, or the user cannot see the complete popup content, so that the tag is switched after waiting for the popup to be drawn completely, the popup content can be ensured to be displayed to the user completely, better interaction experience is provided, interface flickering or incontinent can be avoided, and interface transition is smoother.
Step 104: if the current tag is different from the expected tag, closing the popup window displayed in the current tag, and putting the popup window displayed at present into the popup window queue again.
The method for closing the popup window displayed in the current tag can be a method or a function for closing the popup window, and the popup window displayed in the current tag can be ensured to be displayed again when being switched to the corresponding tag next time by putting the popup window in the popup window queue again, namely, the popup window waits for the time for next display in the original popup window queue.
According to the embodiment, the current label of the target interface is obtained, the current label and the expected label are judged, when the current label is the same as the expected label, the multi-label control in the target interface is set to be in a closed state so as to prevent a user from clicking the multi-label control in time, the situation that when the popup is not drawn yet, the user clicks the multi-label control to switch the labels, so that the popup corresponding to the current label appears on the switched label is avoided, when the current label is different from the expected label, the popup displayed in the current label is closed, and the popup displayed at present is put back into a popup queue again, so that the display is performed again when the replaced popup is equal to the corresponding correct label.
In addition, the embodiment can ensure that the popup window appears on the correct label by judging the current label and the expected label in the time of displaying the callback of the popup window, and avoid the problem of popup window disorder caused by the fact that the user cuts the label and clicks the event again in the executing process of the asynchronous message because the asynchronous message is not ensured to be executed.
Referring to fig. 3, fig. 3 is a flow chart of a second embodiment of a pop-up window display method provided in the present application. The method comprises the following steps:
step 201: and acquiring the current label of the target interface.
Step 202: and judging whether the current tag is the same as the expected tag in the display callback of the popup window.
Step 203: if the current label is the same as the expected label, setting the multi-label control in the target interface to be in a closed state, and setting the multi-label control to be in an open state when the popup window corresponding to the current label is drawn on the screen.
Step 204: creating a target popup class in the popup queue, wherein the target popup class inherits popups in the popup queue.
Step 205: and adding an interface name and a popup display method and a popup disappearance method defined in the interface into the target popup class.
For step 204 and step 205, the popup window display method and the popup window disappearance method are respectively the showWindow method and the distsswindow method.
The target popup window class may be a custom dialog class, and when creating the custom dialog class in the popup window queue, an interface custom dialoginterface is created to define the showWindow and distsswindow methods. The expected tab value is set through the setExpectedtab method, and the showWindow method is called at an appropriate time to display the popup window.
Step 206: and when the current label is different from the expected label, calling a popup window vanishing method in the target popup window class, and putting the popup window displayed currently into a popup window queue again.
For example, the disassignssWindow method in step 205 is invoked, and the currently displayed popup window is put back into the popup window queue.
Step 201, step 202, and step 203 have the same or similar technical schemes as the above embodiments, and are not described herein.
According to the embodiment, the current label of the target interface is obtained, the current label and the expected label are judged, when the current label is the same as the expected label, the multi-label control in the target interface is set to be in a closed state so as to prevent a user from clicking the multi-label control in time, the situation that when the popup is not drawn yet, the user clicks the multi-label control to switch the labels, so that the popup corresponding to the current label appears on the switched label is avoided, when the current label is different from the expected label, the popup displayed in the current label is closed, and the popup displayed at present is put back into a popup queue again, so that the display is performed again when the replaced popup is equal to the corresponding correct label.
In addition, the embodiment realizes a custom interface by creating a class inheritance system Dialog and is used for realizing the method of the window and the method of the dismisWindow.
Since not all dialogs have the presentation callbacks set, in some embodiments, the interfaces of the presentation callbacks are set in the target bullet class.
The interface of the exhibition callback is set in the target popup class, specifically, a class object is set in the target popup class, and the class object inherits the exhibition monitor of the target popup class.
Specifically, the class object class is set when the Dialog object is initialized, that is, an interface for displaying a callback is set in the target popup class, where the interface for displaying the callback defines an onShow method, so that each Dialog object is notified when executing the onShow callback, and therefore, when the popup is displayed, the onShow method is triggered, so that a determination about whether the expected tab and the tab currently located are the same can be made in the method, if not, the dissuswindow method in step 205 is invoked, and the current popup is closed and put back into the popup queue.
According to the embodiment, an onShow callback interface in the Dialog is realized by creating a class, namely, class objects are set in the Dialog, and inherit the onShowListener of the Dialog itself, so that each time the Dialog callback onShow can callback to the newly created class object in the Dialog, and all the Dialog can be used for comparing the expected tab with the truly displayed tab acquired from the activity object in the onShow method.
In some embodiments, in order to block the clicking of the multi-label in time, the blocking may be performed in a clicking event of the response label, for example, a flag bit is added, the flag bit includes an enabling state and a disabling state, when the blocking is required, the flag bit is set to the enabling state true, that is, the enabling state, and when the blocking is not required, the flag bit is set to the false, that is, the disabling state, so that the clicking control of the multi-label can be implemented.
Referring to fig. 4, fig. 4 is a flow chart of a third embodiment of a pop-up window display method provided in the present application. The method comprises the following steps:
step 301: and acquiring the current label of the target interface.
Step 302: and judging whether the current tag is the same as the expected tag in the display callback of the popup window.
Step 303: if the current label is the same as the expected label, setting the multi-label control in the target interface to be in a closed state, and setting the multi-label control to be in an open state when the popup window corresponding to the current label is drawn on the screen.
Step 304: and adding the operation of the frame callback in the preset dancer class.
The android dancer class contains an api, and frame callback operation can be added.
Step 305: judging the relation between the number of frame callback times and the preset number of times range, and if the number of frame callback times meets the preset number of times range, indicating that the popup window corresponding to the current tag is drawn on the screen.
In the interface controller, a frame callback monitor is set for the popup corresponding to the current tag, as in the above embodiment, a class object is set in the target popup class, and inherits the display monitor of the target popup class, and the interface of the display callback defines an onShow callback method, so that whether the number of frame callbacks meets the preset number of times range can be judged in the onShow callback method, and if yes, the popup corresponding to the current tag is indicated to be drawn on the screen.
In some embodiments, the preset number of times ranges from 1 to 3.
When the UI is drawn, the caching mode of the android bottom layer comprises a double caching mechanism and a triple caching mechanism.
When the buffer mode of the bottom layer of the android is a dual buffer mechanism, the bottom layer of the android has two levels of buffer to store two frames of data, and the asynchronous message such as message-B in fig. 1 will put the frame of data with the dialogs into the buffer after the execution is completed, so that the tab clicking event of one frame needs to be blocked again later, that is, when the buffer mode of the bottom layer of the android is the dual buffer mechanism, the clicking of multiple tabs needs to be released again when the preset times are 1, so that the dialogs can appear on the correct tab.
When the buffer mode of the android bottom layer is a triple buffer mechanism, three-level buffer is arranged on the android bottom layer to store three frames of data, a certain time is needed for completing the dialogs, and the response time of the tab clicking event is relatively fast, so that the preset frequency range is 2-3 in the triple buffer mechanism. Specifically, after the asynchronous message such as message-B in fig. 1 is executed, the frame data with the Dialog is put into the buffer, and then the tab clicking event of two frames needs to be blocked again, that is, when the preset frequency range is 2 is satisfied, the clicking of multiple tabs is released again, so that the Dialog can appear on the correct tab.
In addition, in the triple buffer mechanism, a certain time is required for completing the Dialog drawing, and the response time of the tab-cutting clicking event is relatively fast, so that the clicking of the multi-tab can be released when the next Dialog draws the first frame, that is, the tab-cutting clicking event of three frames is blocked after the asynchronous message is executed as the message-B in fig. 1, that is, the tab-cutting clicking event is released when the preset frequency range is 3 is satisfied.
In the embodiment, the preset times range is 1-3 so as to meet different cache modes of the android bottom layer, and clicking of the tab is released when the Dialog is drawn on the screen, so that the Dialog appears on the tab in the expectation.
Step 306: if the current tag is different from the expected tag, closing the popup window displayed in the current tag, and putting the popup window displayed at present into the popup window queue again.
Steps 301 to 303 and 306 have the same or similar technical solutions as the above embodiments, and are not described here.
In combination with the above embodiments, it can be seen that the popup window display method provided in the present application specifically includes the following procedures, and specifically referring to fig. 5.
1) Switching the tab in a multi-tab control clicking event by utilizing the activity of the home page, and triggering a popup window queue;
2) The queue head in the popup queue performs dialogs display;
3) Creating a new Dialog of a Dialog inheritance system in a popup window queue, and realizing a showWindow method and a distssWindow method through an interface;
4) Newly building a class in the dialogs created in the 3) to realize an onShow callback interface in the dialogs, and inheriting the onShow Listener of the dialogs, namely the customized dialogonShow Listener, so that each time the dialogs callback onShow is called back to the newly built class object in the 4);
5) Inquiring the currently displayed tab from the activity of the home page so as to enable the custom dialogonshawListener to acquire the currently displayed tab, and comparing and judging the currently displayed tab with the expected tab; if the displayed tab is consistent with the expected tab, calling the activity object of the 1) to block the multi-tab control clicking event, adding the DOFrame callback of the android editor, namely the operation of the frame callback, and executing the step 6); if the displayed current tab is inconsistent with the expected tab, invoking the distssWindow method in 3), and putting the displayed tab into a rebound window queue again to wait for the next time display;
6) Judging whether the doFrame callback times, namely the frame callback times, meet a preset time range or not, and if the doFrame callback times meet the preset time range, for example, if the doFrame callback times in fig. 5 are more than two times, releasing a multi-tab control clicking event.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of a computer readable storage medium provided in the present application, where the computer readable storage medium 90 is used to store a computer program 91, and the computer program 91 when executed by the controller 201 is used to implement the following method steps:
acquiring a current label of a target interface; judging whether the current tag is the same as the expected tag in the display callback of the popup window; if the current label is the same as the expected label, setting the multi-label control in the target interface to be in a closed state, and setting the multi-label control to be in an open state when a popup window corresponding to the current label is drawn on the screen; if the current tag is different from the expected tag, closing the popup window displayed in the current tag, and putting the popup window displayed at present into the popup window queue again.
It will be appreciated that the computer program 91, when executed by the controller 201, is also adapted to carry out the technical solutions of any of the embodiments of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed methods and apparatuses may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units of the other embodiments described above may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as stand alone products. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all or part of the technical solution contributing to the prior art or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a controller (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is only the embodiments of the present application, and not the patent scope of the present application is limited by the foregoing description, but all equivalent structures or equivalent processes using the contents of the present application and the accompanying drawings, or directly or indirectly applied to other related technical fields, which are included in the patent protection scope of the present application.
Claims (10)
1. A pop-up display method, the method comprising:
acquiring a current label of a target interface;
judging whether the current tag is the same as the expected tag or not in a display callback of the popup window;
if the current label is the same as the expected label, setting a multi-label control in the target interface to be in a closed state, and setting the multi-label control to be in an open state when a popup window corresponding to the current label is drawn on a screen;
if the current tag is different from the expected tag, closing the popup window displayed in the current tag, and putting the popup window displayed currently in a popup window queue again.
2. The method for displaying a pop-up window according to claim 1, wherein closing the pop-up window displayed in the current tag if the current tag is not the same as the expected tag, comprises:
creating a target popup class in the popup queue, wherein the target popup class inherits popups in the popup queue;
adding an interface name and a popup window display method and a popup window disappearance method defined in an interface into the target popup window class;
and when the current tag is different from the expected tag, calling the popup vanishing method in the target popup class.
3. The method for displaying a popup window according to claim 2, wherein an interface for displaying a callback is set in the target popup window class.
4. The method for displaying a popup window according to claim 3, wherein the setting an interface for displaying a callback in the target popup window class includes:
and setting a class object in the target popup class, wherein the class object inherits the display monitor of the target popup class.
5. The method of claim 1, wherein setting a flag bit in response to a multi-tab click event, the flag bit including an enabled state and a disabled state, the setting the multi-tab control in the target interface to the off state comprises:
setting the flag bit to the enabled state;
the setting the multi-label control to an open state includes:
the flag bit is set to the disabled state.
6. The popup window display method of claim 1, further comprising:
adding a frame callback operation in a preset dancer class;
judging the relation between the number of the frame callback times and the preset number of times range, and if the number of the frame callback times meets the preset number of times, indicating that the popup window corresponding to the current tag is drawn on a screen.
7. The popup window display method of claim 1, wherein the predetermined number of times is in the range of 1-3.
8. A popup window display device comprising means for performing the method of any one of claims 1-7.
9. A popup display device, the popup display device comprising: a display, and a controller for performing the steps of the method according to any of claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a controller, implements the steps of the method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311235741.3A CN117472489A (en) | 2023-09-22 | 2023-09-22 | Popup window display method, popup window display device, popup window display equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311235741.3A CN117472489A (en) | 2023-09-22 | 2023-09-22 | Popup window display method, popup window display device, popup window display equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117472489A true CN117472489A (en) | 2024-01-30 |
Family
ID=89635479
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311235741.3A Pending CN117472489A (en) | 2023-09-22 | 2023-09-22 | Popup window display method, popup window display device, popup window display equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117472489A (en) |
-
2023
- 2023-09-22 CN CN202311235741.3A patent/CN117472489A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10969944B2 (en) | Application reporting in an application-selectable user interface | |
US20220229521A1 (en) | Displaying a translucent version of a user interface element | |
US8776078B2 (en) | Method for dynamically freeing computer resources | |
US8694920B2 (en) | Displaying application information in an application-switching user interface | |
US10389666B2 (en) | Event notification | |
EP2390796A1 (en) | Method and system for realizing message interaction in multi-tabs application | |
US9965132B2 (en) | Presenting text messages | |
CN105988860B (en) | Method for executing application program and mobile device | |
US9720557B2 (en) | Method and apparatus for providing always-on-top user interface for mobile application | |
US20070083821A1 (en) | Creating viewports from selected regions of windows | |
US10416994B2 (en) | Control method | |
US20080155455A1 (en) | Notification of state transition of an out-of-focus application with clustering | |
US10277664B2 (en) | Displaying an application in a window in a graphical user interface environment on a computer system | |
CN111880879B (en) | Playing method, device, equipment and storage medium of dynamic wallpaper | |
US5838315A (en) | Support for custom user-interaction elements in a graphical, event-driven computer system | |
CN113268286B (en) | Application starting method and device, projection equipment and storage medium | |
US20230376321A1 (en) | Method and apparatus for running application program, electronic device, and storage medium | |
CN106155768A (en) | Split screen runs the method and device of application | |
US7549132B2 (en) | Presenting identifiers and states of processes in a stacked cursor | |
CN117472489A (en) | Popup window display method, popup window display device, popup window display equipment and storage medium | |
CN117519875A (en) | Popup window processing method, popup window processing device, popup window processing equipment and popup window processing medium | |
US20140282128A1 (en) | System and Method for a User Interface Controller for Mandatory and Shared User Interface Functions | |
CN111273972A (en) | Window management method, device, storage medium and terminal | |
CN118519558A (en) | Popup window display control method and device, electronic equipment and storage medium | |
CN116107575B (en) | Window manager |
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 |