CN114911547A - Pendant mutual exclusion display method and related device - Google Patents

Pendant mutual exclusion display method and related device Download PDF

Info

Publication number
CN114911547A
CN114911547A CN202110180303.6A CN202110180303A CN114911547A CN 114911547 A CN114911547 A CN 114911547A CN 202110180303 A CN202110180303 A CN 202110180303A CN 114911547 A CN114911547 A CN 114911547A
Authority
CN
China
Prior art keywords
pendant
display
target
updating
exists
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
Application number
CN202110180303.6A
Other languages
Chinese (zh)
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN202110180303.6A priority Critical patent/CN114911547A/en
Publication of CN114911547A publication Critical patent/CN114911547A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms

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 invention provides a pendant mutual exclusion display method and related equipment, belongs to the technical field of computers, and aims to realize the function of mutual exclusion display among pendants in different area positions in the pendant operation process. The method comprises the following steps: when the pendant display updating operation is determined to be needed, generating a pendant updating notice, wherein the pendant display updating operation is determined based on a pendant operation instruction of a user, the pendant display updating operation is used for representing that a first pendant needs to be displayed, and the pendant updating notice is used for judging whether the pendant display layout in a screen display area needs to be adjusted or not; judging whether a second pendant exists in a target area according to the pendant updating notice, wherein the target area is an area required by the first pendant when displayed, and the second pendant and the first pendant are pendants in different position areas in the screen display area; if the first pendant exists, the display position of the second pendant in the screen display area is adjusted, so that the first pendant is not influenced by the second pendant when displayed.

Description

Pendant mutual exclusion display method and related device
Technical Field
The invention relates to the technical field of computers, in particular to a pendant mutual exclusion display method and a related device.
Background
With the continuous development of computer and software technologies, pendants are becoming more and more popular as a tool capable of suspending in a display interface after being triggered, and people also prefer to use the pendants to perform some convenient operations or obtain some image-text information displayed after the pendants are triggered in the process of using browsers, players and various applications. This makes the development and placement of the pendant more and more important to both the browser's provider and the software developer. Thus, in the use process of many software or applications, a plurality of hangers may coexist. If the display adjustment is not performed when the pendant is triggered, the user experience is affected by mutual coverage and even conflict.
Currently, in displaying the pendant, the display of the pendant in the same position in the screen is generally adjusted to avoid the situation that the pendant in the same area is affected by each other (wherein, the "same position" as described herein can be understood as "the same area" in the screen, such as two pendants in the upper part of the display screen, or two pendants in the middle part of the display screen, or two pendants in the lower part of the display screen). However, in practical applications, there are often two hangers belonging to different positions, but there is a problem that the two hangers may affect each other after being triggered, for example, as shown in fig. 1-a, where the position of the hanger a is the upper portion of the display screen, the display position of the hanger B is the middle portion of the display screen, and the setting positions of the two hangers are not the same, but because the display effects of the two display positions affect each other during actual display, how to adjust the display condition of another hanger when a certain hanger is triggered to achieve exclusive display of the hanger becomes a problem to be solved in the field.
Disclosure of Invention
The invention aims to provide a pendant mutual exclusion display method which can ensure that a first pendant which belongs to a different area is correctly displayed when being triggered by adjusting the display position of a second pendant in a target area in a screen display area when determining that the pendant display updating operation needs to be executed, thereby realizing the function of mutually exclusive display among pendants in different display partitions.
In a first aspect, the invention provides a method for displaying mutual exclusion of pendants, which comprises the following steps:
when the pendant display updating operation is determined to be needed, generating a pendant updating notification, wherein the pendant display updating operation is determined based on a pendant operation instruction of a user, the pendant display updating operation is used for representing that a first pendant needs to be displayed, and the pendant updating notification is used for judging whether the pendant display layout in a screen display area needs to be adjusted or not;
judging whether a second pendant exists in a target area according to the pendant updating notice, wherein the target area is an area required by the first pendant when displayed, and the second pendant and the first pendant are pendants in different position areas in the screen display area;
and if the first pendant exists, adjusting the display position of the second pendant in the screen display area so that the first pendant is not influenced by the second pendant when being displayed.
Optionally, when it is determined that the pendant display update operation needs to be executed, generating the pendant update notification includes:
acquiring a plurality of pieces of view information, and adding the view information into a preset set, wherein each piece of view information corresponds to one type of pendant;
when a pendant operation instruction is detected, judging whether target view information determined by the pendant operation instruction exists in the preset set or not;
if the target view information exists, generating a pendant updating notification according to the target view information, wherein the pendant updating notification comprises a target pendant, the target pendant is other pendants except the first pendant in the screen display area, and the target pendant corresponds to the target view information.
Optionally, before determining whether target view information determined according to the pendant operation instruction exists in the preset set when the pendant operation instruction is detected, the method further includes:
setting a pendant updating notification function;
when the pendant operation instruction is detected, judging whether target view information determined by corresponding to the pendant operation instruction exists in the preset set or not comprises the following steps:
judging whether target view information corresponding to the pendant operation instruction exists in the preset set or not through the pendant notification function;
if it is determined that target view information determined corresponding to the pendant operation instruction exists in the preset set, generating the pendant update notification according to the target view information, including:
if the view information exists, outputting a corresponding pendant updating notice through the activity manager, wherein the pendant updating notice comprises pendant identification and pendant types, and the pendant identification corresponds to the view information.
Optionally, the determining, according to the pendant update notification, whether a second pendant exists in the target area includes:
detecting whether the pendant updating notice exists or not through a preset monitoring function;
if the target parameters exist, acquiring target parameters from the pendant updating notice according to the preset monitoring function, wherein the target parameters comprise pendant identification, pendant type and pendant detail information;
and judging whether the second pendant exists in the target area or not according to the target parameters.
Optionally, the adjusting the display position of the second pendant in the screen display area includes:
and removing the second pendant from the target position through a preset removal interface program.
Optionally, the pendant update notification function is specifically a notifyGuajianUpdate function; the target view information is a container view;
the judging whether the target view information corresponding to the pendant operation instruction exists in the preset set or not through the pendant notification function comprises:
judging whether the container view exists through a preset if (self. container View) statement in a notifyGuajianUpdate function.
Optionally, the activity manager is specifically dyheodongmanager;
the outputting of the corresponding pendant update notification by the activity manager includes:
and controlling the activity manager of the DYHUODONGManager to output the pendant update notification by using a notifyObserversWhenContainersUpdate notification function.
According to the pendant mutual exclusion display method and the related device, the pendant updating notice is generated when the pendant display updating operation is determined to be required to be executed; then, judging whether a second pendant exists in the target area or not according to the pendant updating notice; and finally, if the first pendant exists, adjusting the display position of the second pendant in the screen display area so that the first pendant is not influenced by the second pendant when displayed, thereby realizing the mutually exclusive display function of the hanger. In the above scheme, the pendant display updating operation is determined based on a pendant operation instruction of a user, the pendant display updating operation is used for representing that a first pendant needs to be displayed, and the pendant updating notification is used for judging whether the pendant display layout in the screen display area needs to be adjusted, so that when the method is executed, the subsequent display layout can be controlled based on the operation need of the user, the execution can be performed based on the actual need of the user, and the method has flexibility. Meanwhile, the target area is an area required by the first pendant when the first pendant is displayed, and the second pendant and the first pendant are pendants in areas at different positions in the screen display area, so that the effect of automatically adjusting the other pendant when one pendant is triggered between pendants in different display partitions can be realized in the process of adjusting the display position of the second pendant, mutual influence is avoided, and the mutual exclusion display function between pendants is realized. In addition, because the method can be carried out only aiming at the pendants in the target area, individual pendants can be adjusted in a targeted mode in the process of adjusting the display positions of the pendants, particularly when the pendants belong to different systems, the positions of all pendants do not need to be adjusted and changed, the method has good adaptability, and the complexity of the control process is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1-a is a schematic diagram illustrating the display effect of a pendant in the prior art;
FIG. 1-b is a flowchart illustrating a method for displaying mutual exclusion of pendants according to an embodiment of the present invention;
FIG. 1-c is a schematic diagram illustrating a display effect of a method for displaying mutual exclusion of pendants according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of a display apparatus with a mutex hanging according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an embodiment of an electronic device according to an embodiment of the present application;
fig. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The terms "comprising" and "having" and any variations thereof as referred to in the embodiments of the invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As shown in fig. 1-b, a method for displaying a pendant mutual exclusion provided by an embodiment of the present invention includes the following steps:
101. and when the pendant display updating operation is determined to be required to be executed, generating a pendant updating notice.
The pendant display updating operation is determined based on a pendant operation instruction of a user, the pendant display updating operation is used for representing that a first pendant needs to be displayed, and the pendant updating notification is used for judging whether the pendant display layout in the screen display area needs to be adjusted.
Because the pendant mutual exclusion display method adopted in this embodiment is mainly used for adaptively adjusting the display effect of another pendant when any one pendant is triggered in the process of displaying pendants in two different areas, in the prior art, management and adjustment of the display mode of the current commonly used pendant often require adjustment of a code layer for pendants influencing the display effect mutually, for example, in the scheme of displaying an icon based on a mutual exclusion manager, a method and a device (CN109271229A) for processing mutual exclusion, a device, equipment and a medium (CN109388498B), a method and a device (CN109640147A) for realizing mutual exclusion display of an icon in a live broadcast, and a method and a device (CN109343758A) for displaying an icon by a mutual exclusion manager, internal codes of pendants influencing mutually often need to be adjusted simultaneously so that the display modes after adjustment do not interfere with each other and influence each other, that is to say, the above solutions need to adjust with highly-coupled cross-region management logic in the process of adjusting display, which is actually a huge burden for software engineers, for example, when there is display effect influence among multiple pendants, a lot of manpower is needed to adjust and modify the code of each pendant. In view of this, the method described in this embodiment needs to adjust the display effect in order to achieve a low-coupling code modification manner. Therefore, in the execution process, it is first required to confirm which pendant the user wants to display, that is, it is required to perform the operation based on the pendant operation instruction of the user. In this embodiment, the pendant operation instruction includes, but is not limited to, a click operation instruction, a drag operation instruction, and the like.
When the pendant operation instruction is detected, it indicates that the user wants to operate a certain pendant (a first pendant) to display a corresponding image or picture, so that it indicates that the pendant display updating operation needs to be executed currently.
In the execution process of this step, when it is detected that the display layout of the pendant needs to be updated, the- (void) layout view within the widget may be called: executing a (BOOL) enable function and obtaining corresponding view information, wherein the implementation process can be as follows:
first, by NSArray topview keys ═ self getCurrentDisplayViews: 1] acquiring all key values, namely keys, existing in the system. Each key represents view information, each view has priority when being displayed, so that the views can be sorted, unnecessary views can be discarded and deleted based on needs and system settings after sorting is finished, and the remaining required views are reserved and added into a preset set, so that the data volume brought by unnecessary data during subsequent traversal analysis is reduced. Then, after the addition is completed, the notifyGuajianUpdate pendant is used for updating the pendant display, an enable parameter able can be judged in the function to determine whether the pendant needs to be updated, if so, the notifyGuajianUpdate function is called, and meanwhile, the function outputs the executed notification.
Based on the above description, in some examples, the method of step 101 may include, when executed:
A. acquiring a plurality of pieces of view information, and adding the view information into a preset set, wherein each piece of view information corresponds to one type of pendant;
B. when a pendant operation instruction is detected, judging whether target view information determined by the pendant operation instruction exists in the preset set or not;
C. and if the target pendant exists, generating a pendant updating notification according to the target view information, wherein the pendant updating notification comprises a target pendant, the target pendant is other pendants except the first pendant in the screen display area, and the target pendant corresponds to the target view information.
Since each pendant actually corresponds to one view, in this embodiment, all view information corresponding to the pendant related to the current screen display area can be acquired as a basis for adjusting the display effect of the pendant subsequently.
In some examples, in order to facilitate automatic control and detection of the method described in the above steps, in practical applications, the method may further be executed based on a function or a macro command, so that before step B is executed to determine whether there is target view information determined according to the pendant operation instruction in the preset set, a function for the above function needs to be set first, and therefore before the above step is executed, the method further includes: and setting a pendant updating notification function.
Based on this, the method in step B in the foregoing example: when a pendant operation instruction is detected, whether target view information determined by the pendant operation instruction exists in the preset set or not is judged, and when the target view information is executed, the judgment can be specifically carried out through a pendant updating notification function:
and judging whether the target view information corresponding to the pendant operation instruction exists in the preset set or not through the pendant notification function.
Likewise, the method in step C in the foregoing example: if it is determined that target view information determined corresponding to the pendant operating instruction exists in the preset set, generating the pendant update notification according to the target view information, which may also specifically be:
if the view information exists, outputting a corresponding pendant updating notice through the activity manager, wherein the pendant updating notice comprises a pendant identifier and a pendant type, and the pendant identifier corresponds to the view information.
In some embodiments, the pendant update notification function is specifically a notifyguajianununbupdate function; the target view information is a container view;
in this way, in the method in the foregoing example, the determining, by the pendant notification function, whether target view information corresponding to a pendant operation instruction exists in the preset set may specifically be: judging whether the container view exists through a preset if (self. container View) statement in a notifyGuajianUpdate function.
Similarly, in some embodiments, the campaign manager is specifically DYHouodengManager; in the foregoing steps, outputting the corresponding pendant update notification through the activity manager may specifically be:
and controlling the activity manager of the DYHUODONGManager to output the pendant update notification by using a notifyObserversWhenContainersUpdate notification function.
As an example of the above example, in practical applications, a specific construction form of the notifyguajianununpdate function may be as follows:
Figure BDA0002941274930000111
if (self. container view) { is used to determine whether the currently required target view exists, and if so, the activity manager dyhouodongmanager is used to output a notification. In practical application, the function for outputting the notification may be notifyOciversWhenContainersUpdate, and the type of the output notification is used to characterize the content of the indication of the notification as belonging to the pendant category, so that the changed event of the pendant may be output in this way. In addition, in the process of implementing the notifyObserversWhencontainersUpdate function through the activity manager DYHUODONGManager, the implementation needs to be performed based on two parameters, wherein the first parameter is the pendant identifier, and the second parameter is the type of the pendant when the pendant is updated.
Meanwhile, a unique key value is constructed for the pendant after the type of the pendant is obtained, and the constructed unique key value is constructed in the following command mode: NSString key [ NSString string stroke format: @ "% lu", (unidimed long) type ]; a unique key value is thus constructed, while at the same time it is possible to use the key value based on the command nsmustablearray updates object forkey: key ]; all views are acquired. If the view parameter observers does not exist, then the return instruction is executed directly, whereas if the view does exist, then a loop traversal of this view is required.
The specific process of loop traversal during execution can be performed according to the following instructions:
[observers enumerateObjectsUsingBlock:^(id_Nonnull obj,NSUInteger idx,BOOL*_Nonnull stop){
in the above instruction, ^ (id _ noninull obj, NSUInteger idx, boul _ noninull stop) { this statement is used for internal traversal of the function, determining whether each obj object complies with the protocol rules, and at the same time, determining whether the object complies with the protocol rules using the following statement:
if([obj respondsToSelector:@selector(HuodongContainerViewsUpdate:forType:)]){
when it is determined that the object complies with the protocol rules, then the output function of the notification needs to be performed using the following instructions: [ obj HuodongContainerViewsUpdate: currentViews for type: type ];
therefore, by the method, the pendant corresponding to the view which is actually required to be operated and is determined in a view mode based on the user instruction can be determined, and the execution basis of the subsequent display effect adjustment of the pendant is ensured.
102. And judging whether a second pendant exists in the target area or not according to the pendant updating notice.
The target area is an area required by the first pendant when the first pendant is displayed, and the second pendant and the first pendant are pendants in different position areas in the screen display area.
In some examples, this step may include: detecting whether the pendant updating notice exists or not through a preset monitoring function;
if the target parameters exist, acquiring target parameters from the pendant updating notice according to the preset monitoring function, wherein the target parameters comprise pendant identification, pendant type and pendant detail information;
and judging whether the second pendant exists in the target area or not according to the target parameters.
Based on the method, the pendant updating notice can be monitored in each service layer, any appointed notice can be monitored based on the requirement, meanwhile, the function design can be more flexible by monitoring based on the preset monitoring function, and the monitoring can be carried out when required, so that the subsequent mutual exclusion display effect can be executed when required.
In practical applications, to achieve the effect of automatic monitoring, the following steps may be performed:
first, three header files are required to be imported for monitoring the update notification of the pendant, and the three header files may be: # import "DYKUDONGManager.h", which header file is used to perform the snooping function; the header file is used for acquiring the unique identification ID of the pendant; # import "DYGAMLeGuajianmanager. h", which header file is used to process and execute specific business actions.
Meanwhile, when the monitoring listening function is used for execution, the executed controller needs to comply with a notification acceptance protocol, so as to ensure the realization of the function, wherein the notification acceptance protocol may be specifically dyhouodontcontainerinbserverptocol. In this way, the function of listening for pendant update notifications can only be implemented after this protocol is followed. Meanwhile, in the specific execution process, the monitoring function generally needs to be called in the boxload built-in function in a calling manner.
The specific execution method is implemented through the following instructions:
[DYHuodongManageraddContainerObserver:selfforType:DYHuodongComponentTypeGuajian];
in the above instruction, DYUodengManage is the activity manager, addContinaterObserver is the add snoop function, self is that the current snoop object is the controller of itself, ForType is the snoop type, DYUodengComponentTypeGuajian. Thus, the pendant update notification can be monitored
103. If the first pendant exists, the display position of the second pendant in the screen display area is adjusted, so that the first pendant is not influenced by the second pendant when being displayed.
Specifically, in some examples, in order to avoid that the display effect of the first pendant is still affected after the display position of the second pendant in the screen display area is adjusted, in this embodiment, the display position of the second pendant in the screen display area may also be adjusted in the following manner: and removing the second pendant from the target position through a preset removal interface program. Therefore, the second pendant can be directly removed from the target position on the display layer, the problem that the display effect of the first pendant is possibly influenced through other adjustment modes is avoided, and the user is ensured to have better viewing experience.
Specifically, the method in this step may be implemented as the following example: the notification is updated by the function of the hoodongcontaineviewsupate when a pendant message is received, and because the notification has two important parameters, the first parameter is: (NSArray < UIView >) currentViews, this parameter refers to the current view information (first pendant), this pendant view carries the only mark of the current pendant, meanwhile when the second pendant is a guess pendant, it needs to define a business variable, when this business variable is a guess pendant, it needs to pass the instruction _ block _ hasmask NO; that is, the value of the variable is set to NO, and then the view corresponding to the pendant is traversed, which is convenient to traverse based on the identifier (corresponding pendant) of the view information.
In the specific traversal process, the traversal is performed through a traversal function enumerateobjectuses block, where the traversal function needs to compare there through three main parameters, which are: the three parameters UIView _ nonomull obj, nsuiter idx, and BOOL _ nonomull stop characterize the identity, type, and object type, respectively. Meanwhile, in the traversal process, whether the traversed pendant is a guess pendant or not is judged by sentences, and the instruction of the judgment process is as follows: if ([ obj. rn ComponentId isEqualToString: @ "DYRNGuess. Guajian" ]) {/or
Based on the determination result, an aspect. If the parameters of the pendant reflect that the pendant is guessed, continuing to execute the next step; on the other hand, if the guess is not a pendant, the traversal is continued. When the traversed pendants are guessing pendants, the variable value of the variable parameter _ block hasGamble ═ NO set in the process needs to be changed into YES, so that _ block hasGamble ═ YSE is obtained, and meanwhile, the loop parameter × stop is set as YES; therefore, the traversal function is controlled to continue to execute, namely traversal stops, a manager of the guess pendant needs to be acquired after traversal stops, the manager of the guess pendant is DYGAMLeGuajianAnanager, and instructions of the manager of the guess pendant can be specifically as follows:
DYGamleGuajianManager*manager=DYGambleManager.sharedManager.dataCenter.gambleGuajianManager;
the manager is used for representing the acquired manager which is the guess pendant in the command.
Based on the above description, whether the variable parameter hasGamble is yes is judged, if yes, the guess pendant is already present in the target area, whether the current guess pendant exists needs to be judged, and if yes, a removal function [ manager unRegisterGuajian ] needs to be called; // removal is performed. On the contrary, if no guess pendant exists, it is necessary to determine whether the current pendant (first pendant) exists, and specifically, it may be determined whether the current pendant exists through a statement if (manager. Thus, the display effect when the above scheme is executed can be as shown in fig. 1-c, when detecting that the pendant B needs to be displayed, firstly, judging whether the pendant exists in the display area (target area) of the pendant B, when detecting that the pendant a is already displayed, at this time, the implementation position of the pendant B can be adjusted through the above steps, the original target area is changed to the current display position of the pendant B, so that the display effects of the pendant a and the pendant B are not conflicted,
according to the method, when the pendant display updating operation is determined to be required to be executed, a pendant updating notice is generated; then, judging whether a second pendant exists in the target area or not according to the pendant updating notice; and finally, if the first pendant exists, adjusting the display position of the second pendant in the screen display area so that the first pendant is not influenced by the second pendant when displayed, thereby realizing the mutually exclusive display function of the hanger. In the above scheme, the pendant display updating operation is determined based on a pendant operation instruction of a user, the pendant display updating operation is used for representing that a first pendant needs to be displayed, and the pendant updating notification is used for judging whether the pendant display layout in the screen display area needs to be adjusted, so that when the method is executed, the subsequent display layout can be controlled based on the operation need of the user, the execution can be performed based on the actual need of the user, and the method has flexibility. Meanwhile, the target area is an area required by the first pendant when the first pendant is displayed, and the second pendant and the first pendant are pendants in areas at different positions in the screen display area, so that the effect of automatically adjusting the other pendant when one pendant is triggered between pendants in different display partitions can be realized in the process of adjusting the display position of the second pendant, mutual influence is avoided, and the mutual exclusion display function between pendants is realized. In addition, the method can only control the pendants in the target area during execution, so that individual pendants can be pertinently adjusted in the process of adjusting the display positions of the pendants, and particularly when the pendants belong to different systems, the positions of all the pendants do not need to be adjusted and changed, the method has good adaptability, and the complexity of the control process is reduced.
The method for displaying the mutexes of the pendants in the embodiment of the present application is described above, and the device for displaying the mutexes of the pendants in the embodiment of the present application is described below.
Referring to FIG. 2, in one embodiment of the present application, the apparatus for displaying mutexes includes:
the generating unit 21 may be configured to generate a pendant update notification when it is determined that a pendant display update operation needs to be performed, the pendant display update operation being determined based on a pendant operation instruction of a user, the pendant display update operation being used to represent that a first pendant needs to be displayed, the pendant update notification being used to determine whether a pendant display layout in a screen display area needs to be adjusted;
a determining unit 22, configured to determine whether a second pendant exists in a target area according to the pendant update notification, where the target area is an area required by the first pendant when displayed, and the second pendant and the first pendant are pendants in different position areas in the screen display area;
the adjusting unit 23 may be configured to, if it is determined that a second pendant exists in the target area, adjust a display position of the second pendant in the screen display area, so that the first pendant is not affected by the second pendant when displaying.
Referring to fig. 3, fig. 3 is a schematic diagram of an embodiment of an electronic device according to an embodiment of the present disclosure.
As shown in fig. 3, an electronic device according to an embodiment of the present application includes a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320, where the processor 320 executes the computer program 311 to implement the following steps: when the pendant display updating operation is determined to be needed, generating a pendant updating notice, wherein the pendant display updating operation is determined based on a pendant operation instruction of a user, the pendant display updating operation is used for representing that a first pendant needs to be displayed, and the pendant updating notice is used for judging whether the pendant display layout in a screen display area needs to be adjusted; judging whether a second pendant exists in a target area according to the pendant updating notice, wherein the target area is an area required by the first pendant when displayed, and the second pendant and the first pendant are pendants in different position areas in the screen display area; and if the first pendant exists, adjusting the display position of the second pendant in the screen display area so that the first pendant is not influenced by the second pendant when being displayed.
Optionally, in some embodiments, the processor 320 is specifically configured to: when it is determined that the pendant display update operation needs to be performed, generating the pendant update notification includes:
acquiring a plurality of pieces of view information, and adding the view information into a preset set, wherein each piece of view information corresponds to one type of pendant;
when a pendant operation instruction is detected, judging whether target view information determined by the pendant operation instruction exists in the preset set or not;
if the target view information exists, generating a pendant updating notification according to the target view information, wherein the pendant updating notification comprises a target pendant, the target pendant is other pendants except the first pendant in the screen display area, and the target pendant corresponds to the target view information.
Optionally, in some embodiments, the processor 320 is specifically configured to: before the determining whether target view information determined according to the pendant operation instruction exists in the preset set when the pendant operation instruction is detected, the method further includes:
setting a pendant updating notification function;
when the pendant operation instruction is detected, judging whether target view information determined by the pendant operation instruction exists in the preset set or not comprises the following steps:
judging whether target view information corresponding to the pendant operation instruction exists in the preset set or not through the pendant notification function;
if it is determined that target view information determined corresponding to the pendant operation instruction exists in the preset set, generating the pendant update notification according to the target view information, including:
if the view information exists, outputting a corresponding pendant updating notice through the activity manager, wherein the pendant updating notice comprises pendant identification and pendant types, and the pendant identification corresponds to the view information.
Optionally, in some embodiments, the processor 320 is specifically configured to: the determining whether a second pendant exists in the target area according to the pendant update notification includes:
detecting whether the pendant updating notice exists or not through a preset monitoring function;
if the target parameters exist, acquiring target parameters from the pendant updating notice according to the preset monitoring function, wherein the target parameters comprise pendant identification, pendant type and pendant detail information;
and judging whether the second pendant exists in the target area or not according to the target parameter.
Optionally, in some embodiments, the processor 320 is specifically configured to: the adjusting the display position of the second pendant in the screen display area comprises:
and removing the second pendant from the target position through a preset removal interface program.
Optionally, in some embodiments, the processor 320 is specifically configured to: the pendant update notification function is specifically a notifyGuajianUpdate function; the target view information is a container view;
the judging whether the target view information corresponding to the pendant operation instruction exists in the preset set or not through the pendant notification function includes:
judging whether the container view exists or not through a preset if (self. container View) statement in a notifyGuajianUpdate function.
Optionally, in some embodiments, the processor 320 is specifically configured to: the activity manager is specifically DYHouodengManager;
the outputting of the corresponding pendant update notification by the activity manager includes:
and controlling the DYUodongManager activity manager to output the pendant update notification by using a notifyObserversWhencontenersUpdate notification function.
As shown in fig. 4, the present embodiment provides a computer-readable storage medium 400, on which a computer program 411 is stored, the computer program 411 implementing the following steps when executed by a processor: when the pendant display updating operation is determined to be needed, generating a pendant updating notice, wherein the pendant display updating operation is determined based on a pendant operation instruction of a user, the pendant display updating operation is used for representing that a first pendant needs to be displayed, and the pendant updating notice is used for judging whether the pendant display layout in a screen display area needs to be adjusted; judging whether a second pendant exists in a target area according to the pendant updating notice, wherein the target area is an area required by the first pendant when displayed, and the second pendant and the first pendant are pendants in different position areas in the screen display area; and if the first pendant exists, adjusting the display position of the second pendant in the screen display area so that the first pendant is not influenced by the second pendant when being displayed.
Optionally, in a possible embodiment, the computer program 411 is specifically adapted to, when executed by a processor: when it is determined that the pendant display update operation needs to be performed, generating the pendant update notification includes:
acquiring a plurality of pieces of view information, and adding the view information into a preset set, wherein each piece of view information corresponds to one type of pendant;
when a pendant operation instruction is detected, judging whether target view information determined corresponding to the pendant operation instruction exists in the preset set or not;
if the target view information exists, generating a pendant updating notification according to the target view information, wherein the pendant updating notification comprises a target pendant, the target pendant is other pendants except the first pendant in the screen display area, and the target pendant corresponds to the target view information.
Optionally, in a possible embodiment, the computer program 411 is specifically adapted to, when executed by a processor: before the determining whether target view information determined according to the pendant operation instruction exists in the preset set when the pendant operation instruction is detected, the method further includes:
setting a pendant updating notification function;
when the pendant operation instruction is detected, judging whether target view information determined by the pendant operation instruction exists in the preset set or not comprises the following steps:
judging whether target view information corresponding to the pendant operation instruction exists in the preset set or not through the pendant notification function;
if it is determined that target view information determined corresponding to the pendant operating instruction exists in the preset set, generating the pendant updating notification according to the target view information, including:
if the view information exists, outputting a corresponding pendant updating notice through the activity manager, wherein the pendant updating notice comprises a pendant identifier and a pendant type, and the pendant identifier corresponds to the view information.
Optionally, in a possible embodiment, the computer program 411 is specifically adapted to, when executed by a processor: the judging whether a second pendant exists in the target area according to the pendant updating notice comprises the following steps:
detecting whether the pendant updating notice exists or not through a preset monitoring function;
if yes, acquiring target parameters from the pendant updating notice according to the preset monitoring function, wherein the target parameters comprise pendant identification, pendant type and pendant detail information;
and judging whether the second pendant exists in the target area or not according to the target parameters.
Alternatively, in a possible embodiment, the computer program 411 is specifically adapted, when executed by a processor, to: the adjusting the display position of the second pendant in the screen display area comprises:
and removing the second pendant from the target position through a preset removing interface program.
Optionally, in a possible embodiment, the computer program 411 is specifically adapted to, when executed by a processor: the pendant update notification function is specifically a notifyGuajianUpdate function; the target view information is a container view;
the judging whether the target view information corresponding to the pendant operation instruction exists in the preset set or not through the pendant notification function includes:
judging whether the container view exists or not through a preset if (self. container View) statement in a notifyGuajianUpdate function.
Optionally, in a possible embodiment, the computer program 411 is specifically adapted to, when executed by a processor: the activity manager is specifically DYHouodengManager;
the outputting of the corresponding pendant update notification by the activity manager includes:
and controlling the activity manager of the DYHUODONGManager to output the pendant update notification by using a notifyObserversWhenContainersUpdate notification function.
It should be noted that the steps of the pendant mutual exclusion display method executed by the apparatus, the processor, and the electronic device are consistent with the method and steps corresponding to fig. 1-b in the foregoing method embodiment, and are not described in detail herein.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
For another example, the division of the above-mentioned units is only one logical function division, and there may be other division manners in actual implementation, and for another example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some communication interfaces, indirect coupling or communication connection between devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided by the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The above functions, if implemented in the form of software functional units and sold or used as a separate product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above methods of the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other media capable of storing program codes.
It should be noted that: like reference numerals and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and furthermore, the terms "first", "second", "third", etc. are used merely to distinguish one description from another, and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention. Are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A pendant mutual exclusion display method is characterized by comprising the following steps:
when the pendant display updating operation is determined to be needed, generating a pendant updating notification, wherein the pendant display updating operation is determined based on a pendant operation instruction of a user, the pendant display updating operation is used for representing that a first pendant needs to be displayed, and the pendant updating notification is used for judging whether the pendant display layout in a screen display area needs to be adjusted or not;
judging whether a second pendant exists in a target area according to the pendant updating notice, wherein the target area is an area required by the first pendant when displayed, and the second pendant and the first pendant are pendants in different position areas in the screen display area;
if the first pendant exists, the display position of the second pendant in the screen display area is adjusted, so that the first pendant is not influenced by the second pendant when displayed.
2. The pendant mutex display method according to claim 1, wherein the generating of the pendant update notification when it is determined that the pendant display update operation needs to be performed comprises:
acquiring a plurality of pieces of view information, and adding the view information into a preset set, wherein each piece of view information corresponds to one pendant;
when a pendant operation instruction is detected, judging whether target view information determined corresponding to the pendant operation instruction exists in the preset set or not;
if the target view information exists, generating a pendant updating notification according to the target view information, wherein the pendant updating notification comprises a target pendant, the target pendant is other pendants except the first pendant in the screen display area, and the target pendant corresponds to the target view information.
3. The pendant mutual exclusion display method according to claim 2, wherein before the determining whether target view information determined corresponding to the pendant operation instruction exists in the preset set when the pendant operation instruction is detected, the method further includes:
setting a pendant updating notification function;
when the pendant operation instruction is detected, judging whether target view information determined by the pendant operation instruction exists in the preset set or not comprises the following steps:
judging whether target view information corresponding to the pendant operation instruction exists in the preset set or not through the pendant notification function;
if it is determined that target view information determined corresponding to the pendant operating instruction exists in the preset set, generating the pendant updating notification according to the target view information, including:
if the view information exists, outputting a corresponding pendant updating notice through the activity manager, wherein the pendant updating notice comprises a pendant identifier and a pendant type, and the pendant identifier corresponds to the view information.
4. The pendant mutex display method according to claim 3, wherein the determining whether a second pendant exists in a target area according to the pendant update notification includes:
detecting whether the pendant updating notice exists or not through a preset monitoring function;
if the target parameters exist, acquiring target parameters from the pendant updating notice according to the preset monitoring function, wherein the target parameters comprise pendant identification, pendant type and pendant detail information;
and judging whether the second pendant exists in the target area or not according to the target parameter.
5. The pendant mutex display method according to claim 4, wherein the adjusting of the display position of the second pendant in the screen display area comprises:
and removing the second pendant from the target position through a preset removal interface program.
6. The pendant mutex display method according to claim 3, wherein the pendant update notification function is specifically a notifyGuajianUpdate function; the target view information is a container view;
the judging whether the target view information corresponding to the pendant operation instruction exists in the preset set or not through the pendant notification function includes:
judging whether the container view exists or not through a preset if (self. container View) statement in a notifyGuajianUpdate function.
7. The pendant mutex display method according to claim 6, wherein the activity manager is specifically DYHUODONgManager;
the outputting of the corresponding pendant update notification by the activity manager includes:
and controlling the DYUodongManager activity manager to output the pendant update notification by using a notifyObserversWhencontenersUpdate notification function.
8. The display device for the mutual exclusion of the pendants is characterized by comprising:
the generating unit is used for generating a pendant updating notice when determining that a pendant display updating operation needs to be executed, wherein the pendant display updating operation is determined based on a pendant operation instruction of a user, the pendant display updating operation is used for representing that a first pendant needs to be displayed, and the pendant updating notice is used for judging whether the pendant display layout in a screen display area needs to be adjusted or not;
the judging unit is used for judging whether a second pendant exists in a target area according to the pendant updating notice, wherein the target area is an area required by the first pendant when being displayed, and the second pendant and the first pendant are pendants in different position areas in the screen display area;
and the adjusting unit is used for adjusting the display position of the second pendant in the screen display area if the second pendant is judged to exist in the target area, so that the first pendant is not influenced by the second pendant when being displayed.
9. An electronic device, comprising: the memory, the processor and the computer program stored in the memory and capable of running on the processor, wherein the processor is configured to implement the steps of the pendant mutual exclusion display method according to any one of claims 1-7 when the computer program stored in the memory is executed.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program, when executed by a processor, implements the steps of the pendant mutual exclusion display method of any of claims 1-7.
CN202110180303.6A 2021-02-09 2021-02-09 Pendant mutual exclusion display method and related device Pending CN114911547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110180303.6A CN114911547A (en) 2021-02-09 2021-02-09 Pendant mutual exclusion display method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110180303.6A CN114911547A (en) 2021-02-09 2021-02-09 Pendant mutual exclusion display method and related device

Publications (1)

Publication Number Publication Date
CN114911547A true CN114911547A (en) 2022-08-16

Family

ID=82761817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110180303.6A Pending CN114911547A (en) 2021-02-09 2021-02-09 Pendant mutual exclusion display method and related device

Country Status (1)

Country Link
CN (1) CN114911547A (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104216752A (en) * 2014-09-30 2014-12-17 珠海市君天电子科技有限公司 Window-based information loading method and device
US20150121270A1 (en) * 2013-10-28 2015-04-30 Lenovo (Beijing) Co., Ltd. Information processing method and electronic device
CN104657048A (en) * 2013-11-20 2015-05-27 腾讯科技(深圳)有限公司 Adjusting method and device for response area
CN105005430A (en) * 2015-07-17 2015-10-28 深圳市金立通信设备有限公司 Window display method and terminal
WO2016106781A1 (en) * 2015-01-04 2016-07-07 华为技术有限公司 Notification information processing method, device, and terminal
CN106155471A (en) * 2015-04-22 2016-11-23 阿里巴巴集团控股有限公司 A kind of operate the display packing at interface, device and electronic equipment
CN108182019A (en) * 2018-01-16 2018-06-19 维沃移动通信有限公司 A kind of suspension control display processing method and mobile terminal
CN108958841A (en) * 2018-07-12 2018-12-07 维沃移动通信有限公司 A kind of setting method and mobile terminal of desktop pendant
CN109388498A (en) * 2018-09-30 2019-02-26 武汉斗鱼网络科技有限公司 A kind of processing method of mutual exclusion, device, equipment and medium
CN110362373A (en) * 2019-06-29 2019-10-22 华为技术有限公司 A kind of method and relevant device controlling screen wicket
CN110830839A (en) * 2018-08-08 2020-02-21 腾讯科技(深圳)有限公司 Multi-pendant display method and device and storage medium
CN111182345A (en) * 2019-12-20 2020-05-19 海信视像科技股份有限公司 Display method and display equipment of control
CN111651109A (en) * 2020-05-11 2020-09-11 广州视源电子科技股份有限公司 Display interface layout adjusting method and device, electronic equipment and storage medium
CN111752451A (en) * 2020-05-29 2020-10-09 维沃移动通信有限公司 Information display method and device and electronic equipment
CN112148174A (en) * 2020-09-30 2020-12-29 维沃移动通信有限公司 Application information display method and device and electronic equipment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150121270A1 (en) * 2013-10-28 2015-04-30 Lenovo (Beijing) Co., Ltd. Information processing method and electronic device
CN104657048A (en) * 2013-11-20 2015-05-27 腾讯科技(深圳)有限公司 Adjusting method and device for response area
CN104216752A (en) * 2014-09-30 2014-12-17 珠海市君天电子科技有限公司 Window-based information loading method and device
WO2016106781A1 (en) * 2015-01-04 2016-07-07 华为技术有限公司 Notification information processing method, device, and terminal
CN106155471A (en) * 2015-04-22 2016-11-23 阿里巴巴集团控股有限公司 A kind of operate the display packing at interface, device and electronic equipment
CN105005430A (en) * 2015-07-17 2015-10-28 深圳市金立通信设备有限公司 Window display method and terminal
CN108182019A (en) * 2018-01-16 2018-06-19 维沃移动通信有限公司 A kind of suspension control display processing method and mobile terminal
CN108958841A (en) * 2018-07-12 2018-12-07 维沃移动通信有限公司 A kind of setting method and mobile terminal of desktop pendant
CN110830839A (en) * 2018-08-08 2020-02-21 腾讯科技(深圳)有限公司 Multi-pendant display method and device and storage medium
CN109388498A (en) * 2018-09-30 2019-02-26 武汉斗鱼网络科技有限公司 A kind of processing method of mutual exclusion, device, equipment and medium
CN110362373A (en) * 2019-06-29 2019-10-22 华为技术有限公司 A kind of method and relevant device controlling screen wicket
CN111182345A (en) * 2019-12-20 2020-05-19 海信视像科技股份有限公司 Display method and display equipment of control
CN111651109A (en) * 2020-05-11 2020-09-11 广州视源电子科技股份有限公司 Display interface layout adjusting method and device, electronic equipment and storage medium
CN111752451A (en) * 2020-05-29 2020-10-09 维沃移动通信有限公司 Information display method and device and electronic equipment
CN112148174A (en) * 2020-09-30 2020-12-29 维沃移动通信有限公司 Application information display method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US8972884B2 (en) Presenting information pertaining to a plurality of tabs in an instant messaging application
EP3493059A1 (en) Application data migration method and device
US10592312B2 (en) Message oriented middleware with integrated rules engine
US20150317059A1 (en) Application management method for a mobile terminal and the mobile terminal
CN111880879B (en) Playing method, device, equipment and storage medium of dynamic wallpaper
CN113407086B (en) Object dragging method, device and storage medium
CN108810646A (en) Group information pushes control method, device and computer readable storage medium
US8495637B2 (en) Apparatus and method for temporarily freeing up resources in a computer
CN107124652A (en) One kind connects wheat live middle windows switching method and device
CN109564517A (en) The content locally deleted is deposited at storage service
CN107526591A (en) Switch the method and apparatus of direct broadcasting room type
CN107395770B (en) Data synchronization method and device
CN114911547A (en) Pendant mutual exclusion display method and related device
CN106775445B (en) Data migration method and device
CN110574006A (en) System and method for automatically synchronizing responses and conditions on a device
CN109698974B (en) Method, device, electronic equipment and medium for displaying progress
US10324603B2 (en) Modifying the appearance of objects based on a progress of a task
CN108184016A (en) A kind of method, terminal and computer readable storage medium that ringing tone is set
CN109698973B (en) Progress updating method and device, electronic equipment and medium
CN112579144B (en) Data processing method and device
CN110658969B (en) Picture processing method, device, equipment and storage medium
CN112426722A (en) Node map hot updating method and device, storage medium and computer equipment
CN116524136B (en) Computer room three-dimensional visualization method, system, electronic equipment and readable storage medium
CN107797716A (en) A kind of information display control method and mobile terminal
JPWO2017122365A1 (en) Reverse command generation program, reverse command generation method, and reverse command generation device

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