CN113760146A - Method and device for presenting menu view - Google Patents

Method and device for presenting menu view Download PDF

Info

Publication number
CN113760146A
CN113760146A CN202110007685.2A CN202110007685A CN113760146A CN 113760146 A CN113760146 A CN 113760146A CN 202110007685 A CN202110007685 A CN 202110007685A CN 113760146 A CN113760146 A CN 113760146A
Authority
CN
China
Prior art keywords
menu
gesture
target
data
instruction
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
CN202110007685.2A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110007685.2A priority Critical patent/CN113760146A/en
Publication of CN113760146A publication Critical patent/CN113760146A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method and a device for presenting a menu view, and relates to the technical field of computers. One embodiment of the method comprises: receiving a sliding gesture operated by a user on a target page, and analyzing to obtain gesture data; determining operated target elements in the target page according to the gesture data; calling menu display information of the target element based on the menu display instruction under the condition that the menu display instruction of the target element is determined to be triggered according to the gesture data; and based on the item to be displayed, the display area information and the layout mode in the menu display information, the item to be displayed is laid out in the corresponding display area on the target page by using the layout mode so as to present the menu view of the target element on the target page. According to the embodiment, the corresponding target element can be determined according to the sliding gesture, the menu display information is called after the menu display instruction of the target element is triggered, and then the menu view is displayed in the designated area on the target page, so that the effect of flexibly displaying the menu view is achieved.

Description

Method and device for presenting menu view
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for presenting a menu view.
Background
The method is characterized in that a sliding gesture is usually used for triggering a menu display view on the mobile terminal, and a view display method provided by a system is usually utilized in the prior art for menu display.
In the process of implementing the invention, the prior art at least has the following problems:
the view display method provided by the system has certain limitations, can be only used on the designated view, and can only use all areas of the designated view to display the menu, and the menu view display has poor self-definition capability and poor universality.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for presenting a menu view, which can determine a corresponding target element according to a sliding gesture, call menu display information of the target element under a condition that a menu display instruction of the target element is triggered, and further, based on an item to be displayed, display area information, and a layout manner in the menu display information, layout the item to be displayed in a corresponding display area on a target page by using the layout manner, so as to present the menu view of the target element in an appointed display area on the appointed target page, thereby achieving an effect of flexibly displaying the menu view.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for presenting a menu view, including:
receiving a sliding gesture operated by a user on a target page, and analyzing the sliding gesture to obtain gesture data;
determining an operated target element in the target page according to the gesture data; calling menu display information of the target element based on the menu display instruction under the condition that the menu display instruction of the target element is determined to be triggered according to the gesture data;
and based on the item to be displayed, the display area information and the layout mode in the menu display information, the item to be displayed is laid out in the corresponding display area on the target page by using the layout mode so as to present the menu view of the target element on the target page.
Optionally, the determining, according to the gesture data, the operated target element in the target page includes:
calling page layout information of the target page;
determining the coordinate range of each element in the target page according to the page layout information;
and determining a coordinate range where the gesture starting coordinate in the gesture data is located, and taking an element corresponding to the coordinate range as the target element.
Optionally, judging whether the gesture data triggers a menu display instruction for the target element according to the following method, including:
calling a gesture instruction library of the target element;
acquiring a gesture track in the gesture data, and judging whether a display instruction corresponding to the gesture track exists in the gesture instruction library or not; and if so, determining that the gesture data triggers a menu display instruction of the target element, and taking the display instruction corresponding to the gesture track in the gesture instruction library as the menu display instruction of the target element.
Optionally, the invoking of the gesture instruction library of the target element includes:
acquiring the type of the target element; calling an element gesture instruction library corresponding to the element type to serve as the gesture instruction library of the target element; or the like, or, alternatively,
acquiring the type of the target page; and calling a page gesture instruction library corresponding to the page type to serve as the gesture instruction library of the target element.
Optionally, the laying out the to-be-displayed item in the corresponding display area on the target page by using the layout manner based on the to-be-displayed item, the display area information, and the layout manner in the menu display information to present the menu view of the target element on the target page includes:
determining coordinate data and shape attribute data according to the display area information;
determining a window creation area based on the coordinate data and the shape attribute data, creating a target view window in the window creation area in the target page;
and drawing the item to be shown on the target view window by utilizing the layout mode so as to realize the presentation of the menu view of the target element on a target page.
Optionally, the determining coordinate data and shape attribute data according to the display area information includes:
when the display area information contains designated coordinate data, taking the designated coordinate data as the coordinate data; when the display area information does not contain designated coordinate data, acquiring gesture ending coordinates in the gesture data according to a coordinate calling method in the display area information to serve as the coordinate data;
when the display area information contains appointed shape attribute data, taking the appointed shape attribute data as the shape attribute data; and when the display area information does not contain the appointed shape attribute data, acquiring a gesture track in the gesture data according to a shape attribute calling method in the display area information so as to determine the shape attribute data.
Optionally, before the layout is performed on the item to be displayed in the corresponding display area on the target page by using the layout manner, the method further includes:
confirming that the menu view of the target element does not exist in the target page; and the number of the first and second groups,
if the menu view exists, when the menu display information contains a display area resetting method, calling the display area resetting method to obtain gesture ending coordinates in the gesture data, and determining shape attribute data according to the display area information; determining a display area after the gesture is reset according to the gesture ending coordinates and the shape attribute data; and utilizing the layout mode to display the reset display area on the target page and layout the items to be displayed.
Optionally, before determining that a menu presentation instruction for the target element is triggered according to the gesture data, the method further includes:
confirming that the displayed menu view of the target element does not exist in the target page; and the number of the first and second groups,
if the displayed menu view of the target element exists in the target page, judging whether a menu closing instruction is triggered to the displayed menu view or not according to the gesture data; and under the condition of triggering, closing the displayed menu view corresponding to the menu closing instruction.
Optionally, the determining whether a menu closing instruction is triggered for the displayed menu view according to the gesture data includes:
acquiring a gesture track in the gesture data, and calling a second gesture instruction library of the target element;
under the condition that a menu closing instruction corresponding to the gesture track exists in the second gesture instruction library, judging whether the menu closing instruction triggers the closing of the displayed menu view or not;
and if so, determining that the gesture data triggers a menu closing instruction for the displayed menu view.
Optionally, after presenting the menu view of the target element on the target page, the method further includes:
when other menu views exist in the target page, acquiring the coexistable attribute of each other menu view; closing the other menu views with the coexistence possible attribute being negative.
According to still another aspect of an embodiment of the present invention, there is provided a menu view presenting apparatus including:
the receiving module is used for receiving a sliding gesture operated by a user on a target page and analyzing the sliding gesture to obtain gesture data;
the acquisition module is used for determining the operated target elements in the target page according to the gesture data; calling menu display information of the target element based on the menu display instruction under the condition that the menu display instruction of the target element is determined to be triggered according to the gesture data;
and the layout module is used for laying out the items to be displayed in the corresponding display areas on the target page by using the layout mode based on the items to be displayed, the display area information and the layout mode in the menu display information so as to present the menu view of the target elements on the target page.
Optionally, the determining, by the obtaining module, the operated target element in the target page according to the gesture data includes:
calling page layout information of the target page;
determining the coordinate range of each element in the target page according to the page layout information;
and determining a coordinate range where the gesture starting coordinate in the gesture data is located, and taking an element corresponding to the coordinate range as the target element.
Optionally, the determining, by the obtaining module, whether the gesture data triggers a menu display instruction for the target element according to the following method includes:
calling a gesture instruction library of the target element;
acquiring a gesture track in the gesture data, and judging whether a display instruction corresponding to the gesture track exists in the gesture instruction library or not; and if so, determining that the gesture data triggers a menu display instruction of the target element, and taking the display instruction corresponding to the gesture track in the gesture instruction library as the menu display instruction of the target element.
Optionally, the obtaining module calls a gesture instruction library of the target element, including:
acquiring the type of the target element; calling an element gesture instruction library corresponding to the element type to serve as the gesture instruction library of the target element; or the like, or, alternatively,
acquiring the type of the target page; and calling a page gesture instruction library corresponding to the page type to serve as the gesture instruction library of the target element.
Optionally, the layout module, based on the item to be displayed, the display area information, and the layout mode in the menu display information, lays out the item to be displayed in the corresponding display area on the target page by using the layout mode, so as to present the menu view of the target element on the target page, including:
determining coordinate data and shape attribute data according to the display area information;
determining a window creation area based on the coordinate data and the shape attribute data, creating a target view window in the window creation area in the target page;
and drawing the item to be shown on the target view window by utilizing the layout mode so as to realize the presentation of the menu view of the target element on a target page.
Optionally, the determining, by the layout module, coordinate data and shape attribute data according to the display area information includes:
when the display area information contains designated coordinate data, taking the designated coordinate data as the coordinate data; when the display area information does not contain designated coordinate data, acquiring gesture ending coordinates in the gesture data according to a coordinate calling method in the display area information to serve as the coordinate data;
when the display area information contains appointed shape attribute data, taking the appointed shape attribute data as the shape attribute data; and when the display area information does not contain the appointed shape attribute data, acquiring a gesture track in the gesture data according to a shape attribute calling method in the display area information so as to determine the shape attribute data.
Optionally, before the layout module lays out the item to be shown in the corresponding display area on the target page by using the layout mode, the layout module further includes:
confirming that the menu view of the target element does not exist in the target page; and the number of the first and second groups,
if the menu view exists, when the menu display information contains a display area resetting method, calling the display area resetting method to obtain gesture ending coordinates in the gesture data, and determining shape attribute data according to the display area information; determining a display area after the gesture is reset according to the gesture ending coordinates and the shape attribute data; and utilizing the layout mode to display the reset display area on the target page and layout the items to be displayed.
Optionally, before determining that the menu display instruction for the target element is triggered according to the gesture data, the obtaining module further includes:
confirming that the displayed menu view of the target element does not exist in the target page; and the number of the first and second groups,
if the displayed menu view of the target element exists in the target page, judging whether a menu closing instruction is triggered to the displayed menu view or not according to the gesture data; and under the condition of triggering, closing the displayed menu view corresponding to the menu closing instruction.
Optionally, the determining, by the obtaining module, whether a menu closing instruction is triggered for the displayed menu view according to the gesture data includes:
acquiring a gesture track in the gesture data, and calling a second gesture instruction library of the target element;
under the condition that a menu closing instruction corresponding to the gesture track exists in the second gesture instruction library, judging whether the menu closing instruction triggers the closing of the displayed menu view or not;
and if so, determining that the gesture data triggers a menu closing instruction for the displayed menu view.
Optionally, after the layout module presents the menu view of the target element on the target page, the layout module further includes:
when other menu views exist in the target page, acquiring the coexistable attribute of each other menu view; closing the other menu views with the coexistence possible attribute being negative.
According to another aspect of the embodiments of the present invention, there is provided an electronic device for presenting a menu view, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the menu view presentation method provided by the present invention.
According to a further aspect of the embodiments of the present invention, there is provided a computer-readable medium on which a computer program is stored, the program, when executed by a processor, implementing the method for presenting a menu view provided by the present invention.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps of determining a corresponding target element according to a sliding gesture, calling menu display information of the target element under the condition of triggering a menu display instruction of the target element, and then distributing the item to be displayed in a corresponding display area on a target page by using a layout mode based on the item to be displayed, the display area information and the layout mode in the menu display information, so that the technical problems of poor self-definition capability and poor universality of menu view display in the prior art are solved, the menu view of the target element can be presented in a specified display area on a specified target page, and the effect of flexibly displaying the menu view is realized.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a menu view presenting method according to a first embodiment of the present invention;
FIG. 2 is a diagram illustrating a menu presentation effect in a method for presenting a menu view according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of the main blocks of a presentation apparatus for a menu view according to a third embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. 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 invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a method for presenting a menu view according to a first embodiment of the present invention, as shown in fig. 1, including:
s101, receiving a sliding gesture operated by a user on a target page, and analyzing the sliding gesture to obtain gesture data;
s102, determining operated target elements in the target page according to the gesture data; calling menu display information of the target element based on the menu display instruction under the condition that the menu display instruction of the target element is determined to be triggered according to the gesture data;
step S103, based on the item to be displayed, the display area information and the layout mode in the menu display information, the item to be displayed is laid out in the corresponding display area on the target page by using the layout mode, so that the menu view of the target element is presented on the target page.
The invention provides a menu view presenting method, which can determine a corresponding target element according to a sliding gesture, call menu display information of the target element under the condition of triggering a menu display instruction of the target element, and further, based on an item to be displayed, display area information and a layout mode in the menu display information, arrange the item to be displayed in a corresponding display area on a target page by using the layout mode so as to present a menu view of the target element in an appointed display area on an appointed target page, thereby realizing the effect of flexibly displaying the menu view.
The general method protocols related to the menu view presentation can be preset, and the general protocols are applied in the development and writing process to realize the processes and the effects; the method specifically comprises the following steps: whether the view can respond to the sliding gesture, a configuration method of the menu, a mode of the view responding to the sliding gesture, whether the menu can respond to a click event, a menu state (display state, closing state and the like) change callback processing method, a closing method of the menu and the like;
the configuration for menu presentation may be implemented by invoking the aforementioned general protocol, such as: the ' view can respond to the sliding gesture ' can be used for setting a page view where an element is located and whether the element view can respond to the sliding gesture, ' the configuration method of the menu ' can be used for configuration of menu display, ' the ' view responds to the sliding gesture ' can be used for configuring which sliding gesture (such as gestures in different directions) the menu is triggered by, the ' menu can respond to a click event ' can be used for configuring whether the menu can trigger a closing instruction of the menu by being clicked, the ' menu state change callback processing method ' can be used for a developer to acquire a menu state in some scene requirements, and the ' closing method of the menu ' can be used for configuring a method for triggering closing of the menu.
In some practical applications, when a menu triggered by a sliding gesture is added to a view, different life cycles correspond to different times when the menus are added to different types of views; for example, in the IOS system, for UIView, it needs to be created at View initialization, and for other tabular UI components (e.g., UITableView, UICollectionView), it needs to be created at list item creation.
In some embodiments, the determining, according to the gesture data, the operated target element in the target page includes:
calling page layout information of the target page;
determining the coordinate range of each element in the target page according to the page layout information;
and determining a coordinate range where the gesture starting coordinate in the gesture data is located, and taking an element corresponding to the coordinate range as the target element.
The page layout information of the current page can be called after the sliding gesture is received, the coordinate ranges of all elements in the current page are obtained, the gesture initial coordinates are obtained by analyzing the sliding gesture, and then the gesture initial coordinates can be matched with the coordinate ranges of all the elements to obtain the elements corresponding to the gesture initial coordinates to serve as target elements; namely: the element to which the start point of the swipe gesture input by the user is operated may be regarded as the target element. By which the element operated by the swipe gesture can be determined.
In some embodiments, determining whether the gesture data triggers a menu presentation instruction for the target element according to the following method includes:
calling a gesture instruction library of the target element;
acquiring a gesture track in the gesture data, and judging whether a display instruction corresponding to the gesture track exists in the gesture instruction library or not; if yes, determining that the gesture data triggers a menu display instruction of the target element, and taking a display instruction corresponding to the gesture track in the gesture instruction library as the menu display instruction of the target element;
after a target element operated by the sliding gesture is determined, judging whether an instruction corresponding to a gesture track of the sliding gesture exists in a gesture instruction library of the target element or not and judging whether the instruction is a menu display instruction or not; if so, the sliding gesture can be considered to trigger the menu display of the target element, and then information for the menu display can be called according to the menu display instruction so as to realize the display of the menu view in the subsequent steps.
Further, in some embodiments, the library of gesture instructions to invoke the target element includes: acquiring the type of the target element; calling an element gesture instruction library corresponding to the element type to serve as the gesture instruction library of the target element; or the like, or, alternatively,
acquiring the type of the target page; and calling a page gesture instruction library corresponding to the page type to serve as the gesture instruction library of the target element.
A gesture instruction library can be set for each element; or a gesture instruction library can be set for one type of element; or a gesture instruction library is set for the elements on the same page, or a gesture instruction library can be set for the elements in the same application; specifically, the method comprises the following steps: the gesture track of "sliding right" can be set as a menu display instruction of an A-type element, and the gesture track of "drawing a circle" can also be set as a menu display instruction of a B-type menu, and the gesture tracks of "sliding up" and "sliding left" are menu display instructions of a C-type element. The gesture instruction library can be flexibly configured for the elements in different application scenes, and various scene requirements are met.
In some embodiments, the laying out the item to be shown in the corresponding display area on the target page by using the layout mode based on the item to be shown, the display area information, and the layout mode in the menu display information to present the menu view of the target element on the target page includes:
determining coordinate data and shape attribute data according to the display area information; determining a window creation area based on the coordinate data and the shape attribute data, creating a target view window in the window creation area in the target page; and drawing the item to be shown on the target view window by utilizing the layout mode so as to realize the presentation of the menu view of the target element on a target page.
According to the method, firstly, a good view window (for example, a view window corresponding to the shape attribute is created according to the starting point by taking the coordinate data as the upper left starting point of the view window) based on the coordinate data and the shape attribute data (for example, information such as the shape, the length, the height and the like), then, the layout mode (for example, list type layout, tab layout, multi-panel layout and the like) is utilized, the menu element configuration in the menu configuration method protocol is combined, the item to be displayed (for example, a picture, a character, a text window, an operable element and the like) is drawn on the target view window, so that the menu view of the target element is presented on a target page, and the defects that in the prior art, the menu view can be presented only by using the designated view and only using all areas of the designated view, and further, the self-defining capability of the menu view presentation is poor, and the like are caused, The universality is not enough.
Further, in some embodiments, the determining coordinate data and shape attribute data from the presentation area information comprises:
when the display area information contains designated coordinate data, taking the designated coordinate data as the coordinate data; when the display area information does not contain designated coordinate data, acquiring gesture ending coordinates in the gesture data according to a coordinate calling method in the display area information to serve as the coordinate data; when the display area information contains appointed shape attribute data, taking the appointed shape attribute data as the shape attribute data; and when the display area information does not contain the data of the specified layout shape attribute, acquiring a gesture track in the gesture data according to a shape attribute calling method in the display area information so as to determine the shape attribute data.
For the coordinate data, specific designated coordinate data can be directly configured in the display area information to be used as coordinate data for displaying the menu; it is also possible to set a method of acquiring coordinate data to determine coordinate data, instead of setting a specific numerical value in the presentation area information, such as: calling a gesture ending coordinate in the gesture data to serve as coordinate data; other methods for acquiring coordinate data may also be provided in some practical applications, such as: and setting a certain coordinate in the track as coordinate data for displaying the menu according to the gesture track in the gesture data.
Similarly, for the shape attribute data, specific specified shape attribute data can be directly configured in the display area information to serve as the shape attribute data for menu display; it is also possible to set a method of acquiring shape attribute data to determine shape attribute data, instead of setting a specific numerical value in the presentation area information, such as: the gesture track in the gesture data is called to determine the shape attribute data according to the gesture track, specifically, different shapes can be configured for different gesture tracks (for example, a wave-shaped track can correspond to a rectangular shape, a circular track can correspond to a circular shape, and the like), and the shape attribute data can also be determined according to a closed loop shape formed by the gesture track.
The method for determining the coordinate data and the shape attribute data for the menu display can be flexibly configured, so that the method for determining the display area of the menu is diversified, and the requirements of various scenes are met.
In some embodiments, before the layout is performed on the item to be presented in the corresponding presentation area on the target page by using the layout manner, the method further includes:
confirming that the menu view of the target element does not exist in the target page; and the number of the first and second groups,
if the menu view exists, when the menu display information contains a display area resetting method, calling the display area resetting method to obtain gesture ending coordinates in the gesture data, and determining shape attribute data according to the display area information; determining a display area after the gesture is reset according to the gesture ending coordinates and the shape attribute data; and utilizing the layout mode to display the reset display area on the target page and layout the items to be displayed.
Such as: when the corresponding instruction is 'b menu for opening element a' matched for the sliding gesture through the gesture instruction library, if the b menu for the element a already exists in the page at the moment, whether a display area resetting method is included in the menu display information corresponding to the instruction can be judged; if not, the instruction can be ignored, namely the b menu of the element a is not repeatedly opened; if the element a is contained in the menu, a new display area can be determined according to a display area resetting method so as to display the b menu of the element a.
In some practical applications, such as in an IOS system, a caching method may be additionally provided for the list components such as UITableView and UICollectionView: caching the whole menu management object in a memory by using a method provided by a system framework < obj c/runtime.h >, so that the expanded menu in a preset time period can be cached; when the menu needs to be expanded again, the required menu object data can be called directly from the cache through the method obj _ getAssociatedObject, so that the overhead can be reduced when the menu is repeatedly opened, and the sliding gesture can be responded quickly.
In some embodiments, before determining from the gesture data that a menu presentation instruction for the target element is triggered, further comprising:
confirming that the displayed menu view of the target element does not exist in the target page; if the displayed menu view of the target element exists in the target page, judging whether a menu closing instruction is triggered to the displayed menu view or not according to the gesture data; and under the condition of triggering, closing the displayed menu view corresponding to the menu closing instruction.
Further, in some embodiments, the determining whether a menu closing instruction is triggered for the presented menu view according to the gesture data includes:
acquiring a gesture track in the gesture data, and calling a second gesture instruction library of the target element; under the condition that a menu closing instruction corresponding to the gesture track exists in the second gesture instruction library, judging whether the menu closing instruction triggers the closing of the displayed menu view or not; and if so, determining that the gesture data triggers a menu closing instruction for the displayed menu view.
In some practical applications, there may be other displayed menus in the page, in which case, it may be determined whether the sliding gesture can trigger the closing of the displayed menu, and if so, the closing instruction of the displayed menu will be triggered preferentially; the following are exemplified:
after the operation element of the gesture track is determined to be element a, judging that a menu d of the element a in the current page exists; if the gesture instruction library and the second instruction library of the target element are obtained through matching: the gesture trajectory may correspond to an open instruction of the unexpanded menu c or a close instruction of the expanded menu d, and then the close instruction of the menu d is preferentially responded, that is: this swipe gesture can only trigger a close command of menu d. By the method, ordered management of the menu can be realized, and confusion is avoided.
In some embodiments, after presenting the menu view of the target element on the target page, further comprising: when other menu views exist in the target page, acquiring the coexistable attribute of each other menu view; closing the other menu views with the coexistence possible attribute being negative.
The closing method of the menu can be called, and the protocol sets the closing logic of the menu, such as: a coexistence attribute of "whether the menu can coexist with other menus" may be added to the menu, where if the coexistence attribute is yes, it indicates that the menu can coexist with other menus; if the coexistence attribute is negative, when other menus are triggered to be opened, the expanded menu with the coexistence attribute being negative is triggered to be closed. For a menu with a coexistence attribute of yes, the closing may not be triggered by the "opening action" of other menus, and other specified closing instructions may be set to implement the closing operation thereof, such as: a single tap gesture, a double tap gesture, a gesture specifying a trajectory, etc. By setting the coexistence attribute, a plurality of menus can be simultaneously expanded on the same page in some practical applications, and the corresponding scene requirements can be met.
Fig. 2 is a schematic diagram of a menu presentation effect in a method for presenting a menu view according to a second embodiment of the present invention, as shown in fig. 2, including:
page view 200, elements 201, 202, 203, 204, 205 in the page, and presented menu 202 of page element 201, presented menu 204 of page element 203, presented menu 206 of page element 205, presented menu 208 of page element 207, presented menu 210 of page element 209;
the coexistence possible attributes of the menus 202, 204, 205, 206, 210 are all yes, so they can be presented in the page view 200 at the same time; in some scenes, the method for flexibly presenting the menus can simultaneously compare the display contents in the menus without opening the menus one by using the method in the prior art, so that the application requirements of the scenes are met.
Fig. 3 is a schematic diagram of main blocks of a presentation apparatus 300 of a menu view according to a third embodiment of the present invention, and as shown in fig. 3, the presentation apparatus 300 of a menu view includes:
the receiving module 301 is configured to receive a sliding gesture operated by a user on a target page, and analyze the sliding gesture to obtain gesture data;
an obtaining module 302, configured to determine, according to the gesture data, an operated target element in the target page; calling menu display information of the target element based on the menu display instruction under the condition that the menu display instruction of the target element is determined to be triggered according to the gesture data;
the layout module 303 is configured to, based on the item to be displayed, the display area information, and the layout manner in the menu display information, layout the item to be displayed in the corresponding display area on the target page by using the layout manner, so as to present the menu view of the target element on the target page.
The invention provides a menu view presenting device, which can determine a corresponding target element according to a sliding gesture, call menu display information of the target element under the condition of triggering a menu display instruction of the target element, and further, based on an item to be displayed, display area information and a layout mode in the menu display information, arrange the item to be displayed in a corresponding display area on a target page by using the layout mode so as to present a menu view of the target element in an appointed display area on an appointed target page, thereby realizing the effect of flexibly displaying the menu view.
The general method protocols related to the menu view presentation can be preset, and the general protocols are applied in the development and writing process to realize the processes and the effects; the method specifically comprises the following steps: whether the view can respond to the sliding gesture, a configuration method of the menu, a mode of the view responding to the sliding gesture, whether the menu can respond to a click event, a menu state (display state, closing state and the like) change callback processing method, a closing method of the menu and the like;
the configuration for menu presentation may be implemented by invoking the aforementioned general protocol, such as: the ' view can respond to the sliding gesture ' can be used for setting a page view where an element is located and whether the element view can respond to the sliding gesture, ' the configuration method of the menu ' can be used for configuration of menu display, ' the ' view responds to the sliding gesture ' can be used for configuring which sliding gesture (such as gestures in different directions) the menu is triggered by, the ' menu can respond to a click event ' can be used for configuring whether the menu can trigger a closing instruction of the menu by being clicked, the ' menu state change callback processing method ' can be used for a developer to acquire a menu state in some scene requirements, and the ' closing method of the menu ' can be used for configuring a method for triggering closing of the menu.
In some practical applications, when a menu triggered by a sliding gesture is added to a view, different life cycles correspond to different times when the menus are added to different types of views; for example, for UIView, it needs to be created at the time of View initialization, and for other tabular UI components (such as UITableView and UICollectionView), it needs to be created at the time of list item creation.
In some embodiments, the determining, according to the gesture data, the operated target element in the target page includes:
calling page layout information of the target page;
determining the coordinate range of each element in the target page according to the page layout information;
and determining a coordinate range where the gesture starting coordinate in the gesture data is located, and taking an element corresponding to the coordinate range as the target element.
The page layout information of the current page can be called after the sliding gesture is received, the coordinate ranges of all elements in the current page are obtained, the gesture initial coordinates are obtained by analyzing the sliding gesture, and then the gesture initial coordinates can be matched with the coordinate ranges of all the elements to obtain the elements corresponding to the gesture initial coordinates to serve as target elements; namely: the element to which the start point of the swipe gesture input by the user is operated may be regarded as the target element. By which the element operated by the swipe gesture can be determined.
In some embodiments, determining whether the gesture data triggers a menu presentation instruction for the target element according to the following method includes:
calling a gesture instruction library of the target element;
acquiring a gesture track in the gesture data, and judging whether a display instruction corresponding to the gesture track exists in the gesture instruction library or not; if yes, determining that the gesture data triggers a menu display instruction of the target element, and taking a display instruction corresponding to the gesture track in the gesture instruction library as the menu display instruction of the target element;
after a target element operated by the sliding gesture is determined, judging whether an instruction corresponding to a gesture track of the sliding gesture exists in a gesture instruction library of the target element or not and judging whether the instruction is a menu display instruction or not; if so, the sliding gesture can be considered to trigger the menu display of the target element, and then information for the menu display can be called according to the menu display instruction so as to realize the display of the menu view in the subsequent steps.
In some embodiments, the library of gesture instructions to invoke the target element includes:
acquiring the type of the target element; calling an element gesture instruction library corresponding to the element type to serve as the gesture instruction library of the target element; or the like, or, alternatively,
acquiring the type of the target page; and calling a page gesture instruction library corresponding to the page type to serve as the gesture instruction library of the target element.
A gesture instruction library can be set for each element; or a gesture instruction library can be set for one type of element; or a gesture instruction library is set for the elements on the same page, or a gesture instruction library can be set for the elements in the same application; specifically, the method comprises the following steps: the gesture track of "sliding right" can be set as a menu display instruction of an A-type element, and the gesture track of "drawing a circle" can also be set as a menu display instruction of a B-type menu, and the gesture tracks of "sliding up" and "sliding left" are menu display instructions of a C-type element. The gesture instruction library can be flexibly configured for the elements in different application scenes, and various scene requirements are met.
In some embodiments, the laying out the item to be shown in the corresponding display area on the target page by using the layout mode based on the item to be shown, the display area information, and the layout mode in the menu display information to present the menu view of the target element on the target page includes:
determining coordinate data and shape attribute data according to the display area information;
determining a window creation area based on the coordinate data and the shape attribute data, creating a target view window in the window creation area in the target page;
and drawing the item to be shown on the target view window by utilizing the layout mode so as to realize the presentation of the menu view of the target element on a target page.
According to the method, firstly, a good view window (for example, a view window corresponding to the shape attribute is created according to the starting point by taking the coordinate data as the upper left starting point of the view window) based on the coordinate data and the shape attribute data (for example, information such as the shape, the length, the height and the like), then, the layout mode (for example, list type layout, tab layout, multi-panel layout and the like) is utilized, the menu element configuration in the menu configuration method protocol is combined, the item to be displayed (for example, a picture, a character, a text window, an operable element and the like) is drawn on the target view window, so that the menu view of the target element is presented on a target page, and the defects that in the prior art, the menu view can be presented only by using the designated view and only using all areas of the designated view, and further, the self-defining capability of the menu view presentation is poor, and the like are caused, The universality is not enough.
In some embodiments, said determining coordinate data and shape attribute data from said presentation area information comprises:
when the display area information contains designated coordinate data, taking the designated coordinate data as the coordinate data; when the display area information does not contain designated coordinate data, acquiring gesture ending coordinates in the gesture data according to a coordinate calling method in the display area information to serve as the coordinate data;
when the display area information contains appointed shape attribute data, taking the appointed shape attribute data as the shape attribute data; and when the display area information does not contain the appointed shape attribute data, acquiring a gesture track in the gesture data according to a shape attribute calling method in the display area information so as to determine the shape attribute data.
For the coordinate data, specific designated coordinate data can be directly configured in the display area information to be used as coordinate data for displaying the menu; it is also possible to set a method of acquiring coordinate data to determine coordinate data, instead of setting a specific numerical value in the presentation area information, such as: calling a gesture ending coordinate in the gesture data to serve as coordinate data; other methods for acquiring coordinate data may also be provided in some practical applications, such as: and setting a certain coordinate in the track as coordinate data for displaying the menu according to the gesture track in the gesture data.
Similarly, for the shape attribute data, specific specified shape attribute data can be directly configured in the display area information to serve as the shape attribute data for menu display; it is also possible to set a method of acquiring shape attribute data to determine shape attribute data, instead of setting a specific numerical value in the presentation area information, such as: the gesture track in the gesture data is called to determine the shape attribute data according to the gesture track, specifically, different shapes can be configured for different gesture tracks (for example, a wave-shaped track can correspond to a rectangular shape, a circular track can correspond to a circular shape, and the like), and the shape attribute data can also be determined according to a closed loop shape formed by the gesture track.
The method for determining the coordinate data and the shape attribute data for the menu display can be flexibly configured, so that the method for determining the display area of the menu is diversified, and the requirements of various scenes are met.
In some embodiments, before the layout is performed on the item to be presented in the corresponding presentation area on the target page by using the layout manner, the method further includes:
confirming that the menu view of the target element does not exist in the target page; and the number of the first and second groups,
if the menu view exists, when the menu display information contains a display area resetting method, calling the display area resetting method to obtain gesture ending coordinates in the gesture data, and determining shape attribute data according to the display area information; determining a display area after the gesture is reset according to the gesture ending coordinates and the shape attribute data; and utilizing the layout mode to display the reset display area on the target page and layout the items to be displayed.
Such as: when the corresponding instruction is 'b menu for opening element a' matched for the sliding gesture through the gesture instruction library, if the b menu for the element a already exists in the page at the moment, whether a display area resetting method is included in the menu display information corresponding to the instruction can be judged; if not, the instruction can be ignored, namely the b menu of the element a is not repeatedly opened; if the element a is contained in the menu, a new display area can be determined according to a display area resetting method so as to display the b menu of the element a.
In some practical applications, a caching method may be additionally provided for the list components such as UITableView and UICollectionView: caching the whole menu management object in a memory by using a method provided by a system framework < obj c/runtime.h >, so that the expanded menu in a preset time period can be cached; when the menu needs to be expanded again, the required menu object data can be called directly from the cache through the method obj _ getAssociatedObject, so that the overhead can be reduced when the menu is repeatedly opened, and the sliding gesture can be responded quickly.
In some embodiments, before determining from the gesture data that a menu presentation instruction for the target element is triggered, further comprising:
confirming that the displayed menu view of the target element does not exist in the target page; and the number of the first and second groups,
if the displayed menu view of the target element exists in the target page, judging whether a menu closing instruction is triggered to the displayed menu view or not according to the gesture data; and under the condition of triggering, closing the displayed menu view corresponding to the menu closing instruction.
Further, in some embodiments, the determining whether a menu closing instruction is triggered for the presented menu view according to the gesture data includes:
acquiring a gesture track in the gesture data, and calling a second gesture instruction library of the target element;
under the condition that a menu closing instruction corresponding to the gesture track exists in the second gesture instruction library, judging whether the menu closing instruction triggers the closing of the displayed menu view or not;
and if so, determining that the gesture data triggers a menu closing instruction for the displayed menu view.
In some practical applications, there may be other displayed menus in the page, in which case, it may be determined whether the sliding gesture can trigger the closing of the displayed menu, and if so, the closing instruction of the displayed menu will be triggered preferentially; the following are exemplified:
after the operation element of the gesture track is determined to be element a, judging that a menu d of the element a in the current page exists; if the gesture instruction library and the second instruction library of the target element are obtained through matching: the gesture trajectory may correspond to an open instruction of the unexpanded menu c or a close instruction of the expanded menu d, and then the close instruction of the menu d is preferentially responded, that is: this swipe gesture can only trigger a close command of menu d. By the method, ordered management of the menu can be realized, and confusion is avoided.
In some embodiments, after presenting the menu view of the target element on the target page, further comprising:
when other menu views exist in the target page, acquiring the coexistable attribute of each other menu view; closing the other menu views with the coexistence possible attribute being negative.
The closing method of the menu can be called, and the protocol sets the closing logic of the menu, such as: a coexistence attribute of "whether the menu can coexist with other menus" may be added to the menu, where if the coexistence attribute is yes, it indicates that the menu can coexist with other menus; if the coexistence attribute is negative, when other menus are triggered to be opened, the expanded menu with the coexistence attribute being negative is triggered to be closed. For a menu with a coexistence attribute of yes, the closing may not be triggered by the "opening action" of other menus, and other specified closing instructions may be set to implement the closing operation thereof, such as: a single tap gesture, a double tap gesture, a gesture specifying a trajectory, etc. By setting the coexistence attribute, a plurality of menus can be simultaneously expanded on the same page in some practical applications, and the corresponding scene requirements can be met.
Fig. 4 shows an exemplary system architecture 400 of a menu view presentation method or a menu view presentation apparatus to which an embodiment of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. Various applications may be installed on the terminal devices 401, 402, 403.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen including, but not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server that provides various services, such as a background management server that supports a menu presentation instruction issued by a user using the terminal device 401, 402, 403. The background management server may analyze and perform other processing on the received data such as the instruction, and feed back a processing result (for example, display information corresponding to the instruction) to the terminal device.
It should be noted that the method for presenting the menu view provided by the embodiment of the present invention is generally executed by the server 405, and accordingly, the means for presenting the menu view is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, 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 or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a receiving module, an obtaining module, and a layout module. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: s101, receiving a sliding gesture operated by a user on a target page, and analyzing the sliding gesture to obtain gesture data; s102, determining operated target elements in the target page according to the gesture data; calling menu display information of the target element based on the menu display instruction under the condition that the menu display instruction of the target element is determined to be triggered according to the gesture data; step S103, based on the item to be displayed, the display area information and the layout mode in the menu display information, the item to be displayed is laid out in the corresponding display area on the target page by using the layout mode, so that the menu view of the target element is presented on the target page.
According to the technical scheme of the embodiment of the invention, because the corresponding target element is determined according to the sliding gesture, the menu display information of the target element is called under the condition that the menu display instruction of the target element is triggered, and then the layout mode is utilized to layout the item to be displayed in the corresponding display area on the target page based on the item to be displayed, the display area information and the layout mode in the menu display information, the technical problems of poor self-definition capability and insufficient universality of menu view display in the prior art are solved, the menu view of the target element can be presented in the specified display area on the specified target page, and the effect of flexibly displaying the menu view is realized.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (13)

1. A method for presenting a menu view, comprising:
receiving a sliding gesture operated by a user on a target page, and analyzing the sliding gesture to obtain gesture data;
determining an operated target element in the target page according to the gesture data; calling menu display information of the target element based on the menu display instruction under the condition that the menu display instruction of the target element is determined to be triggered according to the gesture data;
and based on the item to be displayed, the display area information and the layout mode in the menu display information, the item to be displayed is laid out in the corresponding display area on the target page by using the layout mode so as to present the menu view of the target element on the target page.
2. The method of claim 1, wherein the determining the operated target element in the target page according to the gesture data comprises:
calling page layout information of the target page;
determining the coordinate range of each element in the target page according to the page layout information;
and determining a coordinate range where the gesture starting coordinate in the gesture data is located, and taking an element corresponding to the coordinate range as the target element.
3. The method of claim 1, wherein determining whether the gesture data triggers a menu presentation instruction for the target element comprises:
calling a gesture instruction library of the target element;
acquiring a gesture track in the gesture data, and judging whether a display instruction corresponding to the gesture track exists in the gesture instruction library or not; and if so, determining that the gesture data triggers a menu display instruction of the target element, and taking the display instruction corresponding to the gesture track in the gesture instruction library as the menu display instruction of the target element.
4. The method of claim 3, wherein the library of gesture instructions to invoke the target element comprises:
acquiring the type of the target element; calling an element gesture instruction library corresponding to the element type to serve as the gesture instruction library of the target element; or the like, or, alternatively,
acquiring the type of the target page; and calling a page gesture instruction library corresponding to the page type to serve as the gesture instruction library of the target element.
5. The method according to any one of claims 1 to 3, wherein the step of laying out the item to be shown in the corresponding display area on the target page by using the layout method based on the item to be shown, the display area information, and the layout method in the menu display information to present the menu view of the target element on the target page comprises:
determining coordinate data and shape attribute data according to the display area information;
determining a window creation area based on the coordinate data and the shape attribute data, creating a target view window in the window creation area in the target page;
and drawing the item to be shown on the target view window by utilizing the layout mode so as to realize the presentation of the menu view of the target element on a target page.
6. The method of claim 5, wherein determining coordinate data and shape attribute data from the presentation area information comprises:
when the display area information contains designated coordinate data, taking the designated coordinate data as the coordinate data; when the display area information does not contain designated coordinate data, acquiring gesture ending coordinates in the gesture data according to a coordinate calling method in the display area information to serve as the coordinate data;
when the display area information contains appointed shape attribute data, taking the appointed shape attribute data as the shape attribute data; and when the display area information does not contain the appointed shape attribute data, acquiring a gesture track in the gesture data according to a shape attribute calling method in the display area information so as to determine the shape attribute data.
7. The method according to any one of claims 1 to 3, wherein before the layout of the item to be presented in the corresponding presentation area on the target page by using the layout manner, the method further comprises:
confirming that the menu view of the target element does not exist in the target page; and the number of the first and second groups,
if the menu view exists, when the menu display information contains a display area resetting method, calling the display area resetting method to obtain gesture ending coordinates in the gesture data, and determining shape attribute data according to the display area information; determining a display area after the gesture is reset according to the gesture ending coordinates and the shape attribute data; and utilizing the layout mode to display the reset display area on the target page and layout the items to be displayed.
8. The method of claim 1, further comprising, prior to determining from the gesture data that a menu reveal instruction for the target element is triggered:
confirming that the displayed menu view of the target element does not exist in the target page; and the number of the first and second groups,
if the displayed menu view of the target element exists in the target page, judging whether a menu closing instruction is triggered to the displayed menu view or not according to the gesture data; and under the condition of triggering, closing the displayed menu view corresponding to the menu closing instruction.
9. The method of claim 8, wherein the determining whether a menu closing instruction is triggered for the presented menu view according to the gesture data comprises:
acquiring a gesture track in the gesture data, and calling a second gesture instruction library of the target element;
under the condition that a menu closing instruction corresponding to the gesture track exists in the second gesture instruction library, judging whether the menu closing instruction triggers the closing of the displayed menu view or not;
and if so, determining that the gesture data triggers a menu closing instruction for the displayed menu view.
10. The method of claim 1, after presenting the menu view of the target element on a target page, further comprising:
when other menu views exist in the target page, acquiring the coexistable attribute of each other menu view; closing the other menu views with the coexistence possible attribute being negative.
11. A device for presenting a menu view, comprising:
the receiving module is used for receiving a sliding gesture operated by a user on a target page and analyzing the sliding gesture to obtain gesture data;
the acquisition module is used for determining the operated target elements in the target page according to the gesture data; calling menu display information of the target element based on the menu display instruction under the condition that the menu display instruction of the target element is determined to be triggered according to the gesture data;
and the layout module is used for laying out the items to be displayed in the corresponding display areas on the target page by using the layout mode based on the items to be displayed, the display area information and the layout mode in the menu display information so as to present the menu view of the target elements on the target page.
12. An electronic device for presenting a menu view, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-10.
13. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-10.
CN202110007685.2A 2021-01-05 2021-01-05 Method and device for presenting menu view Pending CN113760146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110007685.2A CN113760146A (en) 2021-01-05 2021-01-05 Method and device for presenting menu view

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110007685.2A CN113760146A (en) 2021-01-05 2021-01-05 Method and device for presenting menu view

Publications (1)

Publication Number Publication Date
CN113760146A true CN113760146A (en) 2021-12-07

Family

ID=78786331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110007685.2A Pending CN113760146A (en) 2021-01-05 2021-01-05 Method and device for presenting menu view

Country Status (1)

Country Link
CN (1) CN113760146A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013041570A (en) * 2011-07-19 2013-02-28 Nippon Telegr & Teleph Corp <Ntt> Information selection device, method, and program
CN103455590A (en) * 2013-08-29 2013-12-18 百度在线网络技术(北京)有限公司 Method and device for retrieving in touch-screen device
US20140019850A1 (en) * 2012-07-12 2014-01-16 Adobe Systems Inc. Method and apparatus for selective synchronization of a display layout
CN104461279A (en) * 2014-10-30 2015-03-25 北京元心科技有限公司 Operation method for graph list displayed on touch screen
CN107656668A (en) * 2016-07-27 2018-02-02 平安科技(深圳)有限公司 Sideslip menu loading method and device
CN109597548A (en) * 2018-11-16 2019-04-09 北京字节跳动网络技术有限公司 Menu display method, device, equipment and storage medium
CN110764682A (en) * 2018-07-27 2020-02-07 北京京东尚科信息技术有限公司 Page control method, page control device and computer-readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013041570A (en) * 2011-07-19 2013-02-28 Nippon Telegr & Teleph Corp <Ntt> Information selection device, method, and program
US20140019850A1 (en) * 2012-07-12 2014-01-16 Adobe Systems Inc. Method and apparatus for selective synchronization of a display layout
CN103455590A (en) * 2013-08-29 2013-12-18 百度在线网络技术(北京)有限公司 Method and device for retrieving in touch-screen device
CN104461279A (en) * 2014-10-30 2015-03-25 北京元心科技有限公司 Operation method for graph list displayed on touch screen
CN107656668A (en) * 2016-07-27 2018-02-02 平安科技(深圳)有限公司 Sideslip menu loading method and device
CN110764682A (en) * 2018-07-27 2020-02-07 北京京东尚科信息技术有限公司 Page control method, page control device and computer-readable storage medium
CN109597548A (en) * 2018-11-16 2019-04-09 北京字节跳动网络技术有限公司 Menu display method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113938456B (en) Session message overhead processing method and device
WO2019047189A1 (en) Message display method and device and terminal
US9195367B2 (en) Managing active GUI elements remotely
CN106980431B (en) Management method and device for application icons in mobile terminal
WO2023040443A1 (en) Method and device for drawing canvas
CN109656445B (en) Content processing method, device, terminal and storage medium
CN109361948B (en) Interface management method, intelligent terminal and readable storage medium
CN114115681B (en) Page generation method and device, electronic equipment and medium
US20220050562A1 (en) Methods and apparatuses for generating a hosted application
CN113268212A (en) Screen projection method and device, storage medium and electronic equipment
US20160216929A1 (en) Processing application interface
US11314391B2 (en) Navigation bar controlling method and terminal
CN109582317B (en) Method and apparatus for debugging hosted applications
CN111667199A (en) Workflow construction method and device, computer equipment and storage medium
CN110989877B (en) Message management method, related equipment and computer readable storage medium
CN112947918A (en) Data display method and device
CN109857298B (en) Application starting method, device, equipment and storage medium
CN107562324B (en) Data display control method and terminal
CN111324398A (en) Recent content processing method, device, terminal and storage medium
CN111291090B (en) Method, device, electronic equipment and medium for acquiring time period based on time control
CN113419649A (en) Method for operating electronic device and device thereof
CN113778270A (en) Method and device for dragging icon
WO2022111698A1 (en) Method for generating transition animation for application switching, and related device
CN113760146A (en) Method and device for presenting menu view
CN110795194B (en) Desktop display control method, device, terminal 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