CN111857488B - Method and device for popping up menu in applet, electronic equipment and storage medium - Google Patents
Method and device for popping up menu in applet, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111857488B CN111857488B CN202010621951.6A CN202010621951A CN111857488B CN 111857488 B CN111857488 B CN 111857488B CN 202010621951 A CN202010621951 A CN 202010621951A CN 111857488 B CN111857488 B CN 111857488B
- Authority
- CN
- China
- Prior art keywords
- picture
- long
- determining
- press position
- menu
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000009471 action Effects 0.000 claims abstract description 22
- 230000006870 function Effects 0.000 claims description 41
- 230000015654 memory Effects 0.000 claims description 20
- 230000004044 response Effects 0.000 claims description 12
- 238000001514 detection method Methods 0.000 claims description 7
- 238000012545 processing Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 7
- 238000011161 development Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001151 other effect Effects 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/0482—Interaction with lists of selectable items, e.g. menus
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application discloses a method and a device for popping up a menu in an applet, an electronic device and a storage medium, and relates to the technical field of processing of the applet and picture editing. The implementation scheme adopted when the menu in the applet pops up is as follows: after detecting that the user generates a long press action in the applet, acquiring a long press position; and responding to the fact that the long pressing position is determined to have the picture, and popping up a menu corresponding to the picture. According to the method and the device, the operation steps of the user can be simplified, and the operation efficiency of the user is improved.
Description
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for popping up a menu in an applet, an electronic device, and a storage medium in the technical field of editing and processing the applet and the picture.
Background
In the prior art, when a user presses a picture for a long time in an applet, a menu providing a plurality of functions related to the picture is not popped up for the user. Therefore, if the user wants to realize the function related to the picture in the applet, the user needs to perform multiple operations, so the operation steps are complicated, and the operation efficiency is low.
Disclosure of Invention
The technical scheme adopted by the application to solve the technical problem is to provide a method for popping up a menu in an applet, which comprises the following steps: after detecting that the user generates a long press action in the applet, acquiring a long press position; and responding to the fact that the long pressing position is determined to have the picture, and popping up a menu corresponding to the picture.
The technical solution adopted by the present application to solve the technical problem is to provide a device for popping up a menu in an applet, comprising: the detection unit is used for acquiring a long-press position after detecting that a user generates a long-press action in the applet; and the popup unit is used for responding to the fact that the long press position has the picture and popping up a menu corresponding to the picture.
An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above method.
A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the above method.
A computer program product comprising a computer program which, when executed by a processor, implements the above method.
One embodiment in the above application has the following advantages or benefits: according to the method and the device, the operation steps of the user can be simplified, and the operation efficiency of the user is improved. Because the technical means of popping up the menu after detecting that the user long presses the picture in the applet is adopted, the technical problem that the menu cannot be popped up when the user long presses the picture in the applet in the prior art is solved, the operation steps of the user are simplified, the operation efficiency of the user is improved, and the like.
Other effects of the above alternatives will be described below with reference to specific embodiments.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present application;
FIG. 2 is a schematic diagram according to a second embodiment of the present application;
FIG. 3 is a schematic illustration according to a third embodiment of the present application;
FIG. 4 is a schematic illustration according to a fourth embodiment of the present application;
FIG. 5 is a schematic illustration according to a fifth embodiment of the present application;
fig. 6 is a block diagram of an electronic device for implementing a method for menu popup in an applet according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application to assist in understanding, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram according to a first embodiment of the present application. As shown in fig. 1, the method for popping up a menu in an applet of this embodiment may specifically include the following steps:
s101, after detecting that a user generates a long press action in an applet, acquiring a long press position;
s102, responding to the fact that the long press position has the picture, and popping up a menu corresponding to the picture.
According to the menu popping method, in the small program using process of the user, after the long press action of the user is detected, the menu corresponding to the picture is popped in response to the fact that the picture exists in the long press position, and a plurality of functions related to the picture are provided for the user through the popped menu, so that the problem that the related functions can be realized only by the user needing to perform multiple operations in the prior art is solved, the operation steps of the user are simplified, and the operation efficiency of the user is improved.
The functions related to the picture provided by the pop-up menu in the embodiment include at least one of the functions of viewing the picture, recognizing and searching the picture, saving the picture, sharing the picture, setting wallpaper and the like. It is understood that the present embodiment does not limit the number and types of picture-related functions provided by the pop-up menu.
When executing S101 to detect that the user generates a long press action in the applet, the present embodiment may adopt the following manner: monitoring the operation of the user when using the applet, for example, clicking, sliding and the like when the user uses the applet in the terminal equipment; and when the fact that the time length of clicking the same position by the user exceeds a preset threshold value is detected, determining that the user generates a long press action in the applet, otherwise, determining that the user does not generate the long press action.
After the embodiment determines that the user generates the long press action in the applet, the long press position is obtained, and the long press position is the coordinate of the screen clicked when the user generates the long press action.
After the long-press position is acquired by executing S101, executing S102 to determine whether a picture exists in the long-press position, if so, popping up a menu of a corresponding picture, otherwise, not popping up the menu.
When executing S102 to determine that there is a picture in the long-press position, the present embodiment may include the following contents: acquiring a view element at the topmost layer at the long press position; determining whether the acquired view element is an image component; if yes, determining that the long-press position has the picture.
In this embodiment, when the step S102 is executed to determine that the long-press position has the picture, the following contents may be further included: after determining that the acquired view element is not an image component, determining whether the acquired view element is an image tag; if yes, determining that the long-press position has the picture.
In this embodiment, when the step S102 is executed to determine that the long-press position has the picture, the following contents may be further included: after determining that the acquired view element is not an image tag, determining whether the acquired view element has a background image; if so, determining that the picture exists in the long-press position, otherwise, determining that the picture does not exist in the long-press position.
That is to say, in the present embodiment, whether a picture exists in the long-press position is determined through the above-mentioned multiple determination processes, so that a problem that a menu cannot be popped up after determining that no picture exists is avoided through single determination, and thus whether a picture exists in the long-press position is determined more accurately, and accuracy of menu popping up is improved.
By using the method provided by the embodiment, when the picture is determined to exist in the long-press position of the long-press action generated by the user, the menu corresponding to the picture can be popped up, so that the purpose of conveniently providing a plurality of functions related to the picture for the user is realized, the operation steps of the user are simplified, and the operation efficiency of the user is improved.
Fig. 2 is a schematic diagram according to a second embodiment of the present application. As shown in fig. 2, the method for menu pop-up in an applet of this embodiment may specifically include the following steps:
s201, after detecting that a user generates a long press action in the applet, acquiring a long press position;
s202, after the long-press position is determined to have the picture, whether the menu pop-up function is forbidden is determined;
s203, responding to the situation that the menu popup function is not forbidden, popping up a menu corresponding to the picture.
Therefore, in the embodiment, after the long-press position is determined to have the picture, the operation of popping up the menu is not immediately executed, but the menu is popped up when the fact that the menu pop-up function of the applet is not forbidden is determined, so that the problem that the menu can still be popped up when the menu pop-up function is forbidden can be solved, and the accuracy of menu pop-up is improved.
It is understood that, the developer of the applet may set the disabled state of the menu pop-up function of the applet, so that in executing S202, the present embodiment may obtain the disabled state of the menu pop-up function of the applet through the development log of the applet, so as to determine whether the menu pop-up function is disabled.
After executing S202, if it is determined that the menu pop-up function of the applet is disabled, the embodiment does not execute the operation of popping up the menu corresponding to the picture, and may return a prompt message to the user to notify that the menu pop-up function is disabled.
Fig. 3 is a schematic diagram according to a third embodiment of the present application. As shown in fig. 3, the method for popping up a menu in an applet of this embodiment may specifically include the following steps:
s301, after detecting that a user generates a long press action in an applet, acquiring a long press position;
s302, after determining that the long-press position has the picture and the menu popup function is not forbidden, determining whether a long-press event is bound to a current component at the long-press position;
s303, responding to the fact that the current component at the long press position is not bound with the long press event, and popping up a menu corresponding to the picture.
Therefore, in the embodiment, after it is determined that the long-press position has the picture and the menu popup function is not disabled, the operation of popping up the menu is not immediately executed, but the menu popup is performed when it is determined that the current component at the long-press position is not bound to the long-press event, so that the problem that the menu pops up by mistake when the user executes the long-press event of the current component can be avoided, and the accuracy of menu popup is improved.
It can be understood that, in executing S302 to determine the current component at the position of the long press, the present embodiment may take the component corresponding to the top-most view element at the position of the long press as the current component.
Since the developer of the applet can set the events bound by different components in the applet, in executing S302, the present embodiment can determine whether the current component at the long-press position binds the long-press event by acquiring the development log of the applet.
After executing S302, if it is determined that the long-press event is bound to the current component at the long-press position, the present embodiment does not perform an operation of popping up a menu of a corresponding picture.
Fig. 4 is a schematic diagram of a fourth embodiment according to the present application. As shown in fig. 4, the method for menu pop-up in an applet of this embodiment may specifically include the following steps:
S401, after detecting that a user generates a long press action in the applet, acquiring a long press position;
s402, after determining that a picture exists in the long press position, a menu popup function is not disabled, and a long press event is not bound to a current component at the long press position, determining whether an N-level parent component above the current component is bound to the long press event, wherein N is a positive integer;
s403, responding to the fact that the N-level parent components above the current component are not bound with the long press event, and popping up a menu corresponding to the picture.
Therefore, in the embodiment, after it is determined that a picture exists in the long-press position, the menu popup function is not disabled, and the long-press event is not bound to the current component at the long-press position, the operation of popping up the menu is not immediately performed, but the popup of the menu is performed when it is determined that none of the parent components of the current component at the upper N-th level are bound to the long-press event, so that the problem that the menu pops up by mistake when the long-press event of the parent component of the current component is performed by the user can be avoided, and the accuracy of popup of the menu is improved.
It can be appreciated that the present embodiment, when executing S402, can determine whether the N-level parent component above the current component binds the long press event through the development log of the applet.
After executing S402, if it is determined that the N-level parent component above the current component is bound with the long press event, the operation of popping up the menu of the corresponding picture is not performed.
Fig. 5 is a schematic diagram according to a fifth embodiment of the present application. As shown in fig. 5, the apparatus for menu pop-up in an applet of the present embodiment includes:
the detection unit 501 is configured to obtain a long-press position after detecting that a user generates a long-press action in an applet;
and the popup unit 502 is used for responding to the fact that the picture exists in the long-press position and popping up a menu corresponding to the picture.
When detecting that the user generates a long press action in the applet, the detection unit 501 may adopt the following modes: monitoring the operation of a user when using the applet; and when the fact that the time length of clicking the same position by the user exceeds a preset threshold value is detected, determining that the user generates a long press action in the applet, otherwise, determining that the user does not generate the long press action.
After the detection unit 501 determines that the user generates the long press action in the applet, the long press position is obtained, and the long press position is the coordinate of the screen clicked when the user generates the long press action.
After the detection unit 501 acquires the long-press position, the pop-up unit 502 determines whether a picture exists in the long-press position, if so, a menu corresponding to the picture is popped up, otherwise, the picture is not popped up.
The popup unit 502 may contain the following when determining that a picture exists at a long-press position: acquiring a view element at the topmost layer at the long press position; determining whether the acquired view element is an image component; if yes, determining that the long-press position has the picture.
When determining that a picture exists at the long-press position, the pop-up unit 502 may further include the following: after determining that the acquired view element is not an image component, determining whether the acquired view element is an image tag; if yes, determining that the long-press position has the picture.
When determining that a picture exists at the long-press position, the pop-up unit 502 may further include the following: after determining that the acquired view element is not an image tag, determining whether the acquired view element has a background image; if so, determining that the picture exists in the long-press position, otherwise, determining that the picture does not exist in the long-press position.
That is to say, the pop-up unit 502 determines whether a picture exists at the long-press position through the above-mentioned multiple determination processes, so as to avoid the problem that a menu cannot be popped up after determining that no picture exists through single determination, thereby more accurately determining whether a picture exists at the long-press position, and thus improving the accuracy of menu pop-up.
The popup unit 502 may also include the following contents when executing a popup menu in response to determining that a picture exists at the long-press position: determining whether a menu pop-up function is forbidden after determining that a picture exists according to the position; and popping up the menu corresponding to the picture in response to determining that the menu pop-up function is not disabled.
Therefore, after determining that the long-press position has a picture, the pop-up unit 502 does not immediately execute the operation of popping up the menu, but pops up the menu when determining that the menu pop-up function of the applet is not disabled, so that the problem that the menu can still pop up when the menu pop-up function is disabled can be avoided, and the accuracy of menu pop-up is improved.
It is understood that the developer of the applet can set the disabled state of the menu pop-up function of the applet, and thus the pop-up unit 502 can acquire the disabled state of the menu pop-up function of the applet through the development log of the applet, thereby determining whether the menu pop-up function is disabled.
When determining that the menu pop-up function of the applet is disabled, the pop-up unit 502 does not perform an operation of popping up the menu of the corresponding picture, and may return a prompt message to the user to inform that the menu pop-up function is disabled.
The popup unit 502 may also include the following contents when executing a popup menu in response to determining that a picture exists at the long-press position: determining whether a long press event is bound to a current component at the long press position after determining that an image exists at the long press position and the menu popup function is not disabled; popping up a menu of the picture in response to determining that a current component at the long press location is not bound to the long press event.
Therefore, the popping unit 502 does not immediately execute the operation of popping up the menu after determining that the long-press position has the picture and the menu popping function is not disabled, but pops up the menu when determining that the current component at the long-press position is not bound to the long-press event, so that the problem that the menu is popped up by mistake when the user executes the long-press event of the current component can be avoided, and the accuracy of menu popping up is improved.
It is understood that the pop-up unit 502 may take the component corresponding to the topmost view element at the long-press position as the current component when determining the current component at the long-press position.
Since the developer of the applet can set events bound by different components in the applet, the pop-up unit 502 can determine whether the long press event is bound to the current component at the long press position by acquiring a development log of the applet.
The pop-up unit 502 does not perform an operation of popping up a menu of a corresponding picture if it is determined that the long press event is bound to the current component at the long press position.
The popup unit 502 may further include the following when executing a menu popup menu corresponding to a picture in response to determining that the picture exists at the long-press position: after determining that a picture exists in a long press position, a menu popup function is not disabled and a current component at the long press position is not bound to a long press event, determining whether an N-level parent component above the current component is bound to the long press event, wherein N is a positive integer; and responding to the fact that the N-level parent components above the current component are not bound with the long-press event, and popping up a menu of the corresponding picture.
Therefore, the popup unit 502 does not immediately execute the operation of popup menu after determining that a picture exists at the long-press position, the menu popup function is not disabled, and the current component at the long-press position is not bound to the long-press event, but pops up the menu when determining that none of the parent components of the current component at the upper N-th level is bound to the long-press event, so that the problem that the menu is popped up by mistake when the user executes the long-press event of the parent component of the current component can be avoided, and the accuracy of menu popup is improved.
It is understood that the pop-up unit 502 can determine whether the N-level parent component above the current component has bound the long press event through the development log of the applet.
The pop-up unit 502 does not perform an operation of popping up a menu of a corresponding picture if it is determined that the N-level parent component above the current component is bound to the long press event.
There is also provided, in accordance with an embodiment of the present application, an electronic device, a computer-readable storage medium, and a computer program product.
Fig. 6 is a block diagram of an electronic device according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 6, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 6, one processor 601 is taken as an example.
The memory 602 is a non-transitory computer readable storage medium as provided herein. The memory stores instructions executable by at least one processor to cause the at least one processor to perform the method for menu pop-up in an applet provided herein. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to perform the method of menu popup in an applet provided by the present application.
The memory 602, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the method for menu popping in the applet in the embodiments of the present application (e.g., the detection unit 501 and the pop-up unit 502 shown in fig. 5). The processor 601 executes various functional applications of the server and data processing, i.e., a method of menu popup in an applet in the above-described method embodiments, by executing non-transitory software programs, instructions, and modules stored in the memory 602.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the electronic device, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 may optionally include memory located remotely from the processor 601, and these remote memories may be connected over a network to the electronic device of the method of menu pop-up in an applet. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the method of menu pop-up in an applet may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603, and the output device 604 may be connected by a bus or other means, and are exemplified by being connected by a bus in fig. 6.
The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device of the method of menu pop-up in the applet, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, etc. The output devices 404 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, the menu is popped up after the user is detected to press the pictures in the applet for a long time, so that the purpose of conveniently providing a plurality of functions related to the pictures for the user is achieved, the operation steps of the user are simplified, and the operation efficiency of the user is improved.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (8)
1. A method of menu pop-up in an applet, comprising:
after detecting that the user generates a long press action in the applet, acquiring a long press position;
responding to the image existing in the long press position, popping up a menu corresponding to the image, wherein the popped up menu provides a plurality of functions related to the image, judging whether the image component is an image component, whether the image label is the image label or not and whether a background image exists or not according to the view element at the topmost layer of the long press position in sequence to determine whether the image exists or not,
Wherein the determining that the long-press position exists the picture comprises: acquiring the topmost view element at the long press position; determining whether the view element is an image component; if yes, determining that the long press position has a picture; after determining that the view element is not an image component, determining whether the view element is an image tag; if yes, determining that the long press position has a picture; and after determining that the view element is not the image tag, determining whether the view element has a background picture, and if so, determining that a picture exists at the long-press position.
2. The method of claim 1, wherein, in response to determining that a picture exists in the long-press position, popping up a menu corresponding to the picture comprises:
after determining that the long press position has the picture, determining whether a current component at the long press position is bound with a long press event;
in response to determining that the current component at the long press position is not bound to a long press event, popping up a menu corresponding to the picture.
3. The method of claim 2, wherein, in response to determining that a picture exists in the long-press position, popping up a menu corresponding to the picture comprises:
Determining whether an N-level parent component above the current component is bound with a long press event or not after determining that a picture exists in the long press position and the current component at the long press position is not bound with the long press event, wherein N is a positive integer;
and responding to the fact that the N-level parent components above the current component are not bound with the long-time press event, and popping up a menu corresponding to the picture.
4. An apparatus for menu popup in an applet, comprising:
the detection unit is used for acquiring a long press position after detecting that a user generates a long press action in the applet;
a popup unit used for responding to the picture existing at the long press position and popping up a menu corresponding to the picture, wherein the popped menu provides a plurality of functions related to the picture, and the judgment of whether the picture exists or not, whether the picture is an image component or not, whether the picture is an image label or not and whether a background picture exists or not are sequentially carried out according to the view element at the topmost layer of the long press position so as to determine whether the picture exists or not,
wherein, when determining that the long-press position has a picture, the pop-up unit specifically executes: acquiring the top view element at the long pressing position; determining whether the view element is an image component; if yes, determining that the long press position has a picture; after determining that the view element is not an image component, determining whether the view element is an image tag; if yes, determining that the long press position has a picture; and after determining that the view element is not the image tag, determining whether the view element has a background picture, and if so, determining that a picture exists at the long-press position.
5. The apparatus according to claim 4, wherein the popup unit, when popping up the menu corresponding to the picture in response to determining that the long-press position has the picture, specifically performs:
after determining that the long-press position has the picture, determining whether a current component at the long-press position is bound with a long-press event;
in response to determining that the current component at the long press location is not bound to a long press event, popping up a menu corresponding to the picture.
6. The apparatus according to claim 5, wherein the popup unit, when popping up the menu corresponding to the picture in response to determining that the long-press position has the picture, specifically performs:
after determining that a picture exists in the long press position and a long press event is not bound to a current component at the long press position, determining whether an N-level parent component above the current component is bound to the long press event, wherein N is a positive integer;
and responding to the fact that the N-level parent components above the current component are not bound with the long press event, and popping up a menu corresponding to the picture.
7. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-3.
8. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010621951.6A CN111857488B (en) | 2020-06-30 | 2020-06-30 | Method and device for popping up menu in applet, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010621951.6A CN111857488B (en) | 2020-06-30 | 2020-06-30 | Method and device for popping up menu in applet, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111857488A CN111857488A (en) | 2020-10-30 |
CN111857488B true CN111857488B (en) | 2022-06-28 |
Family
ID=72988353
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010621951.6A Active CN111857488B (en) | 2020-06-30 | 2020-06-30 | Method and device for popping up menu in applet, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111857488B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110069734A (en) * | 2017-08-16 | 2019-07-30 | 阿里巴巴集团控股有限公司 | A kind of page assembly shows method and apparatus |
CN110362248A (en) * | 2019-06-19 | 2019-10-22 | 北京字节跳动网络技术有限公司 | Control method, device, equipment and the medium of small routine side menu bar |
CN110727383A (en) * | 2019-09-18 | 2020-01-24 | 北京百度网讯科技有限公司 | Touch interaction method and device based on small program, electronic equipment and storage medium |
CN110827119A (en) * | 2019-10-18 | 2020-02-21 | 用友网络科技股份有限公司 | Information interaction system based on WeChat applet |
CN111580879A (en) * | 2020-04-30 | 2020-08-25 | 北京字节跳动网络技术有限公司 | Applet running method and device, electronic equipment and computer storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE50002313D1 (en) * | 2000-02-01 | 2003-06-26 | Swisscom Mobile Ag | SYSTEM AND METHOD FOR DISTRIBUTING IMAGE OBJECTS |
US20110016378A1 (en) * | 2004-11-29 | 2011-01-20 | Ariel Inventions, Llc | System and method of automatically identifying and marking hyperimages when displayed |
CN102663056B (en) * | 2012-03-29 | 2014-05-28 | 北京奇虎科技有限公司 | Method and device for displaying picture elements |
-
2020
- 2020-06-30 CN CN202010621951.6A patent/CN111857488B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110069734A (en) * | 2017-08-16 | 2019-07-30 | 阿里巴巴集团控股有限公司 | A kind of page assembly shows method and apparatus |
CN110362248A (en) * | 2019-06-19 | 2019-10-22 | 北京字节跳动网络技术有限公司 | Control method, device, equipment and the medium of small routine side menu bar |
CN110727383A (en) * | 2019-09-18 | 2020-01-24 | 北京百度网讯科技有限公司 | Touch interaction method and device based on small program, electronic equipment and storage medium |
CN110827119A (en) * | 2019-10-18 | 2020-02-21 | 用友网络科技股份有限公司 | Information interaction system based on WeChat applet |
CN111580879A (en) * | 2020-04-30 | 2020-08-25 | 北京字节跳动网络技术有限公司 | Applet running method and device, electronic equipment and computer storage medium |
Non-Patent Citations (1)
Title |
---|
小程序-长按保存图片;没_有_人;《https://www.jianshu.com/p/e592e9b28192》;20190228;1-5 * |
Also Published As
Publication number | Publication date |
---|---|
CN111857488A (en) | 2020-10-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111586128B (en) | Method, device, equipment and storage medium for acquiring applet data | |
US11175823B2 (en) | Method and apparatus for controlling terminal device using gesture control function, and non-transitory computer-readable storage medium | |
US11361453B2 (en) | Method and apparatus for detecting and tracking target, electronic device and storage media | |
CN111475259B (en) | Applet loading method and device and electronic equipment | |
CN111158799A (en) | Page rendering method and device, electronic equipment and storage medium | |
CN110992112B (en) | Advertisement information processing method and device | |
CN111708653B (en) | Memory fault processing method and device, electronic equipment and storage medium | |
US11169652B2 (en) | GUI configuration | |
CN113158098A (en) | Page generation method, device, equipment and medium | |
CN110933227A (en) | Assistance method, device, equipment and medium for intelligent terminal | |
CN110727383A (en) | Touch interaction method and device based on small program, electronic equipment and storage medium | |
CN111966471B (en) | Access method, device, electronic equipment and computer storage medium | |
CN112163143B (en) | Page switching method, device, equipment and storage medium | |
CN111596897B (en) | Code multiplexing processing method and device and electronic equipment | |
CN111857488B (en) | Method and device for popping up menu in applet, electronic equipment and storage medium | |
CN112162800A (en) | Page display method and device, electronic equipment and computer readable storage medium | |
CN111506499B (en) | Method and device for detecting availability of parameters in applet and electronic equipment | |
CN110531952B (en) | Voice skill processing method, device and equipment | |
CN111651229A (en) | Font changing method, device and equipment | |
CN110851187A (en) | Video memory processing method, device, equipment and medium | |
CN111966576A (en) | Abnormal code positioning method and device, electronic equipment and storage medium | |
CN111352685A (en) | Input method keyboard display method, device, equipment and storage medium | |
CN115145730B (en) | Operation monitoring method and device, electronic equipment and storage medium | |
CN112836153A (en) | Page processing method and device for hosted application, electronic device and readable storage medium | |
CN112148279A (en) | Log information processing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |