CN109814961B - List control method and device, electronic equipment and storage medium - Google Patents

List control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109814961B
CN109814961B CN201811603493.2A CN201811603493A CN109814961B CN 109814961 B CN109814961 B CN 109814961B CN 201811603493 A CN201811603493 A CN 201811603493A CN 109814961 B CN109814961 B CN 109814961B
Authority
CN
China
Prior art keywords
list
sliding
touch point
point position
sliding direction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811603493.2A
Other languages
Chinese (zh)
Other versions
CN109814961A (en
Inventor
王盟盟
吕庆春
彭飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Urban Network Neighbor Information Technology Co Ltd
Original Assignee
Beijing Urban Network Neighbor 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 Urban Network Neighbor Information Technology Co Ltd filed Critical Beijing Urban Network Neighbor Information Technology Co Ltd
Priority to CN201811603493.2A priority Critical patent/CN109814961B/en
Publication of CN109814961A publication Critical patent/CN109814961A/en
Application granted granted Critical
Publication of CN109814961B publication Critical patent/CN109814961B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a list control method and device, electronic equipment and a storage medium, and aims to solve the problems that a list display mode is large in limitation and cannot meet user requirements. The method comprises the following steps: monitoring a screen sliding event triggered on a page of a display list, and acquiring the sliding direction of the screen sliding event; the list comprises a parent list and a child list, and the child list is nested in the parent list; when the sliding direction is longitudinal sliding, determining whether all lists displayed on the page are subclass lists; when the list displayed on the page is not a full child list, controlling the parent list to execute longitudinal scrolling according to the longitudinal sliding direction; and when all the lists displayed on the page are subclass lists, controlling the parent list or the subclass list to execute vertical scrolling according to the direction of vertical sliding. The method and the device avoid conflicts caused by simultaneous scrolling, the processing mode of the list is more flexible, the user requirements can be met to a greater extent, and the user experience is improved.

Description

List control method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a list control method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of mobile internet and intelligent terminals, mobile terminals are becoming an indispensable part of people's lives. With this, various APPs (applications) applied to mobile terminals are also emerging.
At present, the layout of APP pages is usually to display various information through an overall list, distinguish different information through each cell in the list, and view all the information in the list by scrolling the list vertically.
However, with the continuous enrichment of information, the requirements of users become more and more complex, and the information is no longer limited to be viewed through the whole list, so that the current list display mode is more limited, and the requirements of users cannot be met.
Disclosure of Invention
The embodiment of the application provides a list control method and device, electronic equipment and a storage medium, and aims to solve the problems that a list display mode is large in limitation and cannot meet user requirements.
According to an aspect of an embodiment of the present application, there is provided a list control method, including:
monitoring a screen sliding event triggered on a page of a display list, and acquiring the sliding direction of the screen sliding event; the list comprises a parent list and a child list, and the child list is nested in the parent list;
when the sliding direction is longitudinal sliding, determining whether all lists displayed on the page are the subclass lists;
when the list displayed on the page is not the child list, controlling the parent list to execute longitudinal scrolling according to the longitudinal sliding direction; and when all the lists displayed on the page are the subclass lists, controlling the parent list or the subclass list to execute longitudinal scrolling according to the longitudinal sliding direction.
Optionally, the direction of the longitudinal sliding comprises an upward sliding and a downward sliding; the step of controlling the parent list or the child list to execute longitudinal scrolling according to the longitudinal sliding direction includes: when the longitudinal sliding direction is upward sliding, controlling the subclass list to scroll upward; when the longitudinal sliding direction is downward sliding, detecting whether the subclass list is in an initial state; when the child list is in an initial state, controlling the parent list to scroll downwards; and when the subclass list is not in the initial state, controlling the subclass list to scroll downwards.
Optionally, the top of the sub-category list includes a tab view, and the step of determining whether all the lists displayed on the page are the sub-category list includes: detecting a location of the tag view; when the position of the tag view is located at the top of the page, determining that all the lists displayed on the page are the subclass lists.
Optionally, the step of acquiring the sliding direction of the screen sliding event includes: acquiring the initial touch point position and the final touch point position of the screen sliding event, and calculating the transverse displacement and the longitudinal displacement according to the initial touch point position and the final touch point position; and determining the sliding direction according to the initial touch point position, the termination touch point position, the transverse displacement and the longitudinal displacement.
Optionally, the step of determining the sliding direction according to the starting touch point position, the ending touch point position, the lateral displacement and the longitudinal displacement includes: when the transverse displacement is smaller than the longitudinal displacement and the starting touch point position is located above the ending touch point position, determining that the sliding direction is upward sliding; when the transverse displacement is smaller than the longitudinal displacement and the starting touch point position is located below the ending touch point position, determining that the sliding direction is downward sliding; when the transverse displacement is larger than the longitudinal displacement and the starting touch point position is positioned at the right side of the ending touch point position, determining that the sliding direction is rightward sliding; and when the transverse displacement is larger than the longitudinal displacement and the starting touch point position is positioned at the left side of the ending touch point position, determining that the sliding direction is leftward sliding.
Optionally, after the step of monitoring a screen sliding event triggered on a page of a display list and acquiring a sliding direction of the screen sliding event, the method further includes: when the sliding direction is transverse sliding, acquiring the initial touch point position of the screen sliding event; and when the initial touch point position is positioned in the subclass list, controlling the subclass list to execute transverse scrolling according to the transverse sliding direction.
According to another aspect of the present application, there is provided a list control apparatus, the apparatus including:
the device comprises a first acquisition unit, a second acquisition unit and a display unit, wherein the first acquisition unit is used for monitoring a screen sliding event triggered on a page of a display list and acquiring the sliding direction of the screen sliding event; the list comprises a parent list and a child list, and the child list is nested in the parent list;
a determining unit, configured to determine whether all lists displayed on the page are the sub-category lists when the sliding direction is vertical sliding;
a first control unit, configured to control the parent list to perform vertical scrolling in the vertical sliding direction when all the lists displayed on the page are not the child list;
and the second control unit is used for controlling the parent list or the child list to execute longitudinal scrolling according to the longitudinal sliding direction when all the lists displayed on the page are the child list.
Optionally, the direction of the longitudinal sliding comprises an upward sliding and a downward sliding; the second control unit includes: the third control module is used for controlling the subclass list to roll upwards when the longitudinal sliding direction is upwards sliding; a state detection module, configured to detect whether the subclass list is in an initial state when the longitudinal sliding direction is downward sliding; the fourth control module is used for controlling the parent list to roll downwards when the child list is in the initial state; and when the subclass list is not in the initial state, controlling the subclass list to scroll downwards.
Optionally, the top of the subclass list includes a label view, and the determining unit includes: a position detection module for detecting the position of the label view; and the list determining module is used for determining that all the lists displayed on the page are the subclass list when the position of the tag view is positioned at the top of the page.
Optionally, the first obtaining unit includes: the displacement calculation module is used for acquiring the initial touch point position and the final touch point position of the screen sliding event, and calculating transverse displacement and longitudinal displacement according to the initial touch point position and the final touch point position; and the direction determining module is used for determining the sliding direction according to the initial touch point position, the final touch point position, the transverse displacement and the longitudinal displacement.
Optionally, the direction determining module comprises: a first determining submodule, configured to determine that the sliding direction is an upward sliding direction when the lateral displacement is smaller than the longitudinal displacement and the starting touch point position is located above the ending touch point position; the second determining submodule is used for determining that the sliding direction is downward sliding when the transverse displacement is smaller than the longitudinal displacement and the starting touch point position is positioned below the ending touch point position; a third determining submodule, configured to determine that the sliding direction is rightward sliding when the lateral displacement is greater than the longitudinal displacement and the starting touch point is located on the right side of the ending touch point; and the fourth determining submodule is used for determining that the sliding direction is leftward sliding when the transverse displacement is larger than the longitudinal displacement and the starting touch point position is positioned on the left side of the ending touch point position.
Optionally, the apparatus further comprises: the second acquisition unit is used for acquiring the initial touch point position of the screen sliding event when the sliding direction is transverse sliding; and the second control unit is used for controlling the subclass list to execute transverse scrolling according to the transverse sliding direction when the initial touch point position is positioned in the subclass list.
According to still another aspect of the present application, there is provided an electronic apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform any of the above list control methods.
According to yet another aspect of the present application, there is provided a non-transitory computer readable storage medium having instructions therein, which when executed by a processor of an electronic device, enable the electronic device to perform any of the above list control methods.
In the embodiment of the application, a parent list and a child list are set for the list, and the child list is nested in the parent list. Monitoring a screen sliding event triggered on a page of a display list, and acquiring the sliding direction of the screen sliding event; when the sliding direction is longitudinal sliding, determining whether all lists displayed on the page are subclass lists; when the list displayed on the page is not a full child list, controlling the parent list to execute longitudinal scrolling according to the longitudinal sliding direction; and when all the lists displayed on the page are subclass lists, controlling the parent list or the subclass list to execute vertical scrolling according to the direction of vertical sliding. Therefore, in the embodiment of the application, the parent list and the child list can be scrolled independently, one of the parent list and the child list is controlled to scroll at a time, so that conflicts caused by simultaneous scrolling are avoided, the list processing mode is more flexible, the user requirements can be met to a greater extent, and the user experience is improved.
Drawings
Fig. 1 is a flowchart illustrating steps of a list control method according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating steps of another list control method according to an embodiment of the present application.
Fig. 3 is a block diagram of a list control apparatus according to an embodiment of the present application.
Fig. 4 is a block diagram of another list control apparatus according to the embodiment of the present application.
Fig. 5 is a block diagram of an apparatus for list control according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application can be applied to the mobile terminal. The mobile terminal may be a mobile phone, a tablet, a wearable device, etc. The operating system of the mobile terminal may be an IOS system, an Android system, or the like.
Referring to fig. 1, a flowchart illustrating steps of a list control method according to an embodiment of the present application is shown.
The list control method of the embodiment of the application comprises the following steps:
step 101, monitoring a screen sliding event triggered on a page of a display list, and acquiring a sliding direction of the screen sliding event.
The page content in the APP can be displayed on the page in a list form, the list can include a plurality of cells, and each cell displays the corresponding content. For example, a unique identifier may be set for each cell, and the content to be displayed by the cell may be searched through the unique identifier. The list in the embodiment of the present application may include a parent list and a child list, where the child list is embedded in the parent list, for example, the child list may be embedded in the parent list as a cell of the parent list; the subclass list may also be nested in the parent list in the form of a list, occupying multiple cells of the parent list, and so on. Both the parent list and the child list can be scrolled separately.
A slide screen event may be triggered when a user's finger slides across the screen of the mobile terminal. After monitoring the screen sliding event triggered on the page of the display list, the mobile terminal can acquire the sliding direction of the screen sliding event according to the event information of the screen sliding event. The sliding direction may include a longitudinal sliding and a lateral sliding, the longitudinal sliding may include an upward sliding and a downward sliding, and the lateral sliding may include a leftward sliding and a rightward sliding.
And 102, when the sliding direction is longitudinal sliding, determining whether all the lists displayed on the page are the subclass lists.
Since the parent list and the child list can be scrolled separately, if the parent list and the child list are controlled to perform scrolling operation, a scrolling conflict is caused. Therefore, in the embodiment of the application, when responding to the screen sliding event, one list is controlled to perform the scrolling operation, and the other list is controlled to be relatively static.
When the sliding direction is vertical sliding, the current display state of the page may be detected so as to determine whether all the lists displayed on the page are sub-category lists, and further determine which list is controlled to perform the scrolling operation. The current display state of the page may include that all of the lists displayed on the page are subclass lists, and that the lists displayed on the page are not all subclass lists. The list displayed on the page may not be all the child list, and may include all the lists displayed on the page being parent lists, and the list displayed on the page includes both the parent list and the child list. The list displayed on the page is a list of all sub-classes, which means that the list of the parent class is not currently displayed on the page, but other relatively fixed content, such as an input box, may be displayed on the page.
When the sliding direction is a lateral sliding, it may be determined which list is controlled to perform a scrolling operation according to the position of the touch point of the user, which will be discussed in detail in the following embodiments.
And 103, when the list displayed on the page is not all the sub-list, controlling the parent list to execute longitudinal scrolling according to the longitudinal sliding direction.
When the list displayed on the page is not all the sub-class list, that is, all or part of the sub-class list is displayed on the page, the parent class list can be controlled to perform vertical scrolling according to the vertical sliding direction, and the sub-class list is relatively static.
And 104, when all the lists displayed on the page are the sub-list, controlling the parent list or the sub-list to execute longitudinal scrolling according to the longitudinal sliding direction.
The vertical sliding can comprise upward sliding and downward sliding, and when all the lists displayed on the page are child lists, the parent list or the child list is controlled to perform vertical scrolling according to the vertical sliding direction according to different specific sliding directions of the vertical sliding.
In the embodiment of the application, the parent list and the child list can be scrolled independently, one of the parent list and the child list is controlled to scroll at a time, so that conflicts caused by simultaneous scrolling are avoided, the list processing mode is more flexible, the user requirements can be met to a greater extent, and the user experience is improved.
Referring to fig. 2, a flowchart illustrating steps of a list control method according to an embodiment of the present application is shown.
The list control method of the embodiment of the application comprises the following steps:
step 201, a screen sliding event triggered on a page of a display list is monitored, and a sliding direction of the screen sliding event is acquired.
In an implementation, control of the list may be implemented through a view control. One view control is the uisrolview control (scrolling view control). The uisrolview is a scrollable view control that can be used to present a large amount of content and to view the entire content by scrolling. One view control is the UITableView control (ListView control). UITableView is a subclass of UIScrollView, which allows users to scroll through tables. The cell of each item contained in the table is a UITableViewCell object. The UITableView uses these objects to draw the visible rows of the table. The cell has a content title and an image, and may have an attachment view near the right edge. The attachment view may include a disclosure indicator that results in a next level in the data hierarchy or a detailed disclosure button that results in a detailed view of the selected item. The attachment view may also be a frame control, such as a switch and slider, or may be a custom view. The list view control may enter an edit mode in which the user may insert, delete, and reorder rows of the table. The UITableViewCell is a sub-class of UITableView that can be used to set and manage cell content and background (including text, images, and custom views, etc.), manage cell selection and highlight status, manage attachment views, and initiate properties and methods of editing of cell content.
In this embodiment of the application, the parent class list may correspond to a UITableView control, the child class list may be used as a customized UITableView cell in the parent class list, and the child class list may also correspond to a UITableView control since the child class list is also a list. Since UITableView is a subclass of UIScrollView, UITableView can inherit the method of UIScrollView.
The mobile terminal can monitor the screen sliding event through a proxy method of the UIScrollView control. After the screen sliding event triggered on the page of the display list is monitored, the sliding direction of the screen sliding event can be acquired according to the event information of the screen sliding event. The event information may include information of a start touch point position, an end touch point position, a sliding speed, and the like. The starting touch point position represents the touch point position before the user finger just touches the screen and does not slide, and the ending touch point position represents the touch point position when the user finger leaves the screen after sliding. The start touch point location and the end touch point location may be in the form of coordinate values.
The step of acquiring the sliding direction of the screen sliding event may include: acquiring the initial touch point position and the final touch point position of the screen sliding event, and calculating the transverse displacement and the longitudinal displacement according to the initial touch point position and the final touch point position; and determining the sliding direction according to the initial touch point position, the termination touch point position, the transverse displacement and the longitudinal displacement.
The step of calculating the lateral displacement and the longitudinal displacement according to the starting touch point position and the ending touch point position may include: calculating the absolute value of the difference value of the abscissa of the ending touch point minus the abscissa of the starting touch point as the transverse displacement; and calculating the absolute value of the difference value of the ordinate of the termination touch point minus the ordinate of the start touch point as the longitudinal displacement. For example, if the initial touch point position is (0,0), and the end touch point position is (6,2), the lateral displacement is 6, and the longitudinal displacement is 2.
Determining the sliding direction according to the starting touch point position, the ending touch point position, the lateral displacement and the longitudinal displacement may include: when the transverse displacement is smaller than the longitudinal displacement, determining that the sliding direction is longitudinal sliding; when the lateral displacement is greater than the longitudinal displacement, determining the sliding direction as lateral sliding. Wherein, the direction of the longitudinal sliding comprises upward sliding and downward sliding, and the direction of the transverse sliding comprises leftward sliding and rightward sliding. When the transverse displacement is smaller than the longitudinal displacement and the starting touch point position is located above the ending touch point position, determining that the sliding direction is upward sliding; when the transverse displacement is smaller than the longitudinal displacement and the starting touch point position is located below the ending touch point position, determining that the sliding direction is downward sliding; when the transverse displacement is larger than the longitudinal displacement and the starting touch point position is positioned at the right side of the ending touch point position, determining that the sliding direction is rightward sliding; and when the transverse displacement is larger than the longitudinal displacement and the starting touch point position is positioned at the left side of the ending touch point position, determining that the sliding direction is leftward sliding. For example, the initial touch point position is (0,0), the end touch point position is (6,2), the lateral displacement is 6, the longitudinal displacement is 2, the lateral displacement is greater than the longitudinal displacement, and the initial touch point position is located on the right side of the end touch point position, so that the sliding direction is rightward sliding.
Step 202, when the sliding direction is longitudinal sliding, determining whether all the lists displayed on the page are the sub-list.
After the screen sliding event is monitored through the UIScrollView control agent method, both the UITableView control corresponding to the parent class list and the UITableView control corresponding to the subclass list can inherit the method of the UIScrollView control, so that both the UITableView control corresponding to the parent class list and the UITableView control corresponding to the subclass list can monitor the screen sliding event. Therefore, in order to avoid the conflict caused by the simultaneous sliding of the parent list and the child list, one of the lists can be controlled to execute the scrolling operation.
When it is acquired that the sliding direction is the vertical sliding in step 201, it may be determined whether all the lists displayed on the page are the sub-category lists.
In an alternative embodiment, the height of the sub-category list may be set to the height of the page on which the list is displayed (minus a fixed portion such as the status bar). A tab view (section view) may be disposed at the top of the sub-category list, and a plurality of content cells of the sub-category list are disposed below the tab view, and the content cells are used for displaying content corresponding to the sub-category list. And setting up that when the tab view scrolls to the top of the page, the tab view hovers over the top of the page. The step of determining whether all of the lists displayed on the page are the sub-category lists may include: detecting a location of the tag view; when the position of the tag view is located at the top of the page, determining that all the lists displayed on the page are the subclass lists.
In implementation, the location of the section view may be obtained by calling an API (Application Program Interface) of the section view. Presetting a top position range of the page, and determining that the section view is positioned at the top of the page when the position of the section view is positioned in the top position range.
And 203, when the list displayed on the page is not all the sub-list, controlling the parent list to execute longitudinal scrolling according to the longitudinal sliding direction.
The mobile terminal can determine whether all the lists displayed on the page are subclass lists through the UITableView control corresponding to the subclass lists. When the determination result is that the list displayed on the page is not all the subclass list, the UITableView control corresponding to the subclass list may send a first notification to the UITableView control corresponding to the parent list, where the first notification is used to indicate that the parent list is allowed to scroll. And the UITableView control corresponding to the parent list receives the first notification and can control the longitudinal scrolling of the parent list. If the longitudinal sliding is upward sliding, controlling the parent list to scroll upward; and if the vertical sliding is downward sliding, controlling the parent class list to scroll downward.
And 204, when all the lists displayed on the page are the sub-list, controlling the parent list or the sub-list to execute longitudinal scrolling according to the longitudinal sliding direction.
The step of controlling the parent class list or the child class list to perform vertical scrolling according to the direction of the vertical sliding may include a21 to a 23:
a21, when the direction of the longitudinal sliding is upward sliding, controlling the subclass list to scroll upward.
When the determination result is that all the lists displayed on the page are subclass lists and the sliding direction is upward sliding, the UITableView control corresponding to the subclass list can control the subclass list to scroll upward. And the UITableView control corresponding to the subclass list may send a second notification to the UITableView control corresponding to the parent list, where the second notification is used to indicate that the parent list is prohibited from scrolling. And the UITableView control corresponding to the parent list receives the second notification, and the parent list can be prohibited from executing the rolling operation.
A22, when the direction of the vertical sliding is downward sliding, detecting whether the subclass list is in an initial state.
When the determination result is that all the lists displayed on the page are subclass lists and the sliding direction is downward sliding, the UITableView control corresponding to the subclass list can further detect whether the subclass list is in the initial state. The initial state refers to a state in which the child list has not performed a scroll operation, that is, a state in which the content cell in the first row in the child list is displayed on the page.
A23, when the child class list is in an initial state, controlling the parent class list to scroll downwards; and when the subclass list is not in the initial state, controlling the subclass list to scroll downwards.
When the subclass list is in an initial state, the UITableView control corresponding to the subclass list may send a first notification to the UITableView control corresponding to the parent class list. And the UITableView control corresponding to the parent list receives the first notification and can control the parent list to scroll downwards.
When the sub-class list is not in the initial state, the UITableView control corresponding to the sub-class list can control the sub-class to scroll downward. And the UITableView control corresponding to the subclass list may send a second notification to the UITableView control corresponding to the parent list. And the UITableView control corresponding to the parent list receives the second notification, and the parent list can be prohibited from executing the rolling operation.
Step 205, when the sliding direction is a horizontal sliding direction, acquiring a starting touch point position of the screen sliding event.
In the embodiment of the application, the parent-class list allows vertical scrolling, and the child-class list allows horizontal scrolling and vertical scrolling.
And step 206, when the initial touch point position is located in the subclass list, controlling the subclass list to execute horizontal scrolling according to the horizontal sliding direction.
In step 201, when it is obtained that the sliding direction is the horizontal sliding direction, the initial touch point position of the screen sliding event is obtained, the position range of the subclass list in the page is obtained, and whether the initial touch point position is located in the position range of the subclass list is determined.
When the initial touch point position is within the position range of the subclass list, that is, the initial touch point position is within the subclass list, the UITableView control corresponding to the subclass list can control the subclass list to scroll horizontally. If the transverse sliding is leftward sliding, controlling the parent list to scroll leftward; and if the transverse sliding is specifically rightward sliding, controlling the parent class list to scroll rightward. Since the parent class list does not allow horizontal scrolling, the UITableView control corresponding to the parent class list may prohibit the parent class list from performing a scrolling operation.
In the embodiment of the application, the conflict caused by the simultaneous rolling of the parent list and the subclass list can be effectively avoided, and the rolling of the parent list and the subclass list can be in seamless connection. And the section view determines whether all the sub-class lists are displayed, so that the calculation of the offset is reduced, and the problem of integral interaction abnormity caused by calculation errors is prevented. The height of one page is set by the subclass list, so that the memory loss is effectively reduced, and the view rendering operation is reduced.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
Referring to fig. 3, a block diagram of a list control apparatus according to an embodiment of the present application is shown. The list control apparatus of the embodiment of the present application includes: a first acquisition unit 301, a determination unit 302, a first control unit 303, and a second control unit 304.
The first obtaining unit 301 is configured to monitor a screen sliding event triggered on a page of a display list, and obtain a sliding direction of the screen sliding event. The list comprises a parent list and a child list, and the child list is embedded into the parent list.
A determining unit 302, configured to determine whether all the lists displayed on the page are the sub-category lists when the sliding direction is vertical sliding.
A first control unit 303, configured to control the parent list to perform vertical scrolling in the vertical sliding direction when all the lists displayed on the page are not the child list.
A second control unit 304, configured to control the parent list or the child list to perform vertical scrolling according to the vertical sliding direction when all the lists displayed on the page are the child list.
In the embodiment of the application, the parent list and the child list can be scrolled independently, one of the parent list and the child list is controlled to scroll at a time, so that conflicts caused by simultaneous scrolling are avoided, the list processing mode is more flexible, the user requirements can be met to a greater extent, and the user experience is improved.
Referring to fig. 4, a block diagram of a list control apparatus according to an embodiment of the present application is shown. The list control apparatus of the embodiment of the present application includes: a first acquisition unit 401, a determination unit 402, a first control unit 403, a second control unit 404, a second acquisition unit 405, and a fifth control unit 406.
A first obtaining unit 401, configured to monitor a screen sliding event triggered on a page of a display list, and obtain a sliding direction of the screen sliding event. The list comprises a parent list and a child list, and the child list is embedded into the parent list.
A determining unit 402, configured to determine whether all the lists displayed on the page are the sub-category lists when the sliding direction is vertical sliding.
A first control unit 403, configured to control the parent list to perform vertical scrolling in the vertical sliding direction when all the lists displayed on the page are not the child list.
A second control unit 404, configured to control the parent list or the child list to perform vertical scrolling according to the vertical sliding direction when all the lists displayed on the page are the child list.
A second obtaining unit 405, configured to obtain a start touch point position of the screen sliding event when the sliding direction is a lateral sliding direction.
A second control unit 406, configured to control the sub-category list to perform lateral scrolling in the lateral sliding direction when the starting touch point position is located in the sub-category list.
The direction of the longitudinal sliding includes upward sliding and downward sliding. The second control unit 404 includes:
the third control module is used for controlling the subclass list to roll upwards when the longitudinal sliding direction is upwards sliding; a state detection module, configured to detect whether the subclass list is in an initial state when the longitudinal sliding direction is downward sliding; the fourth control module is used for controlling the parent list to roll downwards when the child list is in the initial state; and when the subclass list is not in the initial state, controlling the subclass list to scroll downwards.
The top of the subclass list includes the tab view. The determination unit 402 includes: a position detection module for detecting the position of the label view; and the list determining module is used for determining that all the lists displayed on the page are the subclass list when the position of the tag view is positioned at the top of the page.
The first acquisition unit 401 includes: the displacement calculation module is used for acquiring the initial touch point position and the final touch point position of the screen sliding event, and calculating transverse displacement and longitudinal displacement according to the initial touch point position and the final touch point position; and the direction determining module is used for determining the sliding direction according to the initial touch point position, the final touch point position, the transverse displacement and the longitudinal displacement.
The direction determination module includes: a first determining submodule, configured to determine that the sliding direction is an upward sliding direction when the lateral displacement is smaller than the longitudinal displacement and the starting touch point position is located above the ending touch point position; the second determining submodule is used for determining that the sliding direction is downward sliding when the transverse displacement is smaller than the longitudinal displacement and the starting touch point position is positioned below the ending touch point position; a third determining submodule, configured to determine that the sliding direction is rightward sliding when the lateral displacement is greater than the longitudinal displacement and the starting touch point is located on the right side of the ending touch point; and the fourth determining submodule is used for determining that the sliding direction is leftward sliding when the transverse displacement is larger than the longitudinal displacement and the starting touch point position is positioned on the left side of the ending touch point position.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 5 is a block diagram of an apparatus for list control according to an embodiment of the present application. For example, the apparatus 500 may be provided as an electronic device. For example, the electronic device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 5, the apparatus 500 may include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, an input/output (I/O) interface 512, a sensor component 514, and a communication component 516.
The processing component 502 generally controls overall operation of the device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 420 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operation at the device 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 506 provides power to the various components of the device 500. The power components 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 500.
The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, audio component 510 includes a Microphone (MIC) configured to receive external audio signals when apparatus 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 may detect an open/closed state of the device 500, the relative positioning of the components, such as a display and keypad of the apparatus 500, the sensor assembly 514 may also detect a change in the position of the apparatus 500 or a component of the apparatus 500, the presence or absence of user contact with the apparatus 500, orientation or acceleration/deceleration of the apparatus 500, and a change in the temperature of the apparatus 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communication between the apparatus 500 and other devices in a wired or wireless manner. The apparatus 500 may access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described list control methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 520 of the apparatus 500 to perform the above-described list control method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed description is given to a list control method, a list control apparatus, an electronic device, and a storage medium, and a specific example is applied in the detailed description to explain the principles and embodiments of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (12)

1. A method of list control, the method comprising:
monitoring a screen sliding event triggered on a page of a display list, and acquiring the sliding direction of the screen sliding event; the list comprises a parent list and a child list, and the child list is nested in the parent list;
when the sliding direction is longitudinal sliding, determining whether all lists displayed on the page are the subclass lists;
when the list displayed on the page is not the child list, controlling the parent list to execute longitudinal scrolling according to the longitudinal sliding direction;
when all the lists displayed on the page are the subclass lists, controlling the parent list or the subclass list to execute longitudinal scrolling according to the longitudinal sliding direction;
wherein the direction of longitudinal sliding comprises upward sliding and downward sliding; the step of controlling the parent list or the child list to execute longitudinal scrolling according to the longitudinal sliding direction includes:
when the longitudinal sliding direction is upward sliding, controlling the subclass list to scroll upward;
when the longitudinal sliding direction is downward sliding, detecting whether the subclass list is in an initial state;
when the child list is in an initial state, controlling the parent list to scroll downwards;
and when the subclass list is not in the initial state, controlling the subclass list to scroll downwards.
2. The list control method according to claim 1, wherein the top of the sub-category list includes a tab view, and the step of determining whether all of the lists displayed on the page are the sub-category list includes:
detecting a location of the tag view;
when the position of the tag view is located at the top of the page, determining that all the lists displayed on the page are the subclass lists.
3. The list control method of claim 1, wherein the step of obtaining the sliding direction of the slide event comprises:
acquiring the initial touch point position and the final touch point position of the screen sliding event, and calculating the transverse displacement and the longitudinal displacement according to the initial touch point position and the final touch point position;
and determining the sliding direction according to the initial touch point position, the termination touch point position, the transverse displacement and the longitudinal displacement.
4. The list control method of claim 3, wherein said step of determining the sliding direction based on the starting touch point position, the ending touch point position, the lateral displacement, and the longitudinal displacement comprises:
when the transverse displacement is smaller than the longitudinal displacement and the starting touch point position is located above the ending touch point position, determining that the sliding direction is upward sliding;
when the transverse displacement is smaller than the longitudinal displacement and the starting touch point position is located below the ending touch point position, determining that the sliding direction is downward sliding;
when the transverse displacement is larger than the longitudinal displacement and the starting touch point position is positioned at the right side of the ending touch point position, determining that the sliding direction is rightward sliding;
and when the transverse displacement is larger than the longitudinal displacement and the starting touch point position is positioned at the left side of the ending touch point position, determining that the sliding direction is leftward sliding.
5. The list control method according to claim 1, further comprising, after the step of monitoring a screen sliding event triggered on a page on which a list is displayed, acquiring a sliding direction of the screen sliding event:
when the sliding direction is transverse sliding, acquiring the initial touch point position of the screen sliding event;
and when the initial touch point position is positioned in the subclass list, controlling the subclass list to execute transverse scrolling according to the transverse sliding direction.
6. A list control apparatus, characterized in that the apparatus comprises:
the device comprises a first acquisition unit, a second acquisition unit and a display unit, wherein the first acquisition unit is used for monitoring a screen sliding event triggered on a page of a display list and acquiring the sliding direction of the screen sliding event; the list comprises a parent list and a child list, and the child list is nested in the parent list;
a determining unit, configured to determine whether all lists displayed on the page are the sub-category lists when the sliding direction is vertical sliding;
a first control unit, configured to control the parent list to perform vertical scrolling in the vertical sliding direction when all the lists displayed on the page are not the child list;
a second control unit, configured to control the parent list or the child list to perform vertical scrolling in the vertical sliding direction when all lists displayed on the page are the child list;
wherein the direction of longitudinal sliding comprises upward sliding and downward sliding; the second control unit includes:
the third control module is used for controlling the subclass list to roll upwards when the longitudinal sliding direction is upwards sliding;
a state detection module, configured to detect whether the subclass list is in an initial state when the longitudinal sliding direction is downward sliding;
the fourth control module is used for controlling the parent list to roll downwards when the child list is in the initial state; and when the subclass list is not in the initial state, controlling the subclass list to scroll downwards.
7. The list control apparatus of claim 6, wherein the top of the subclass list includes a tab view, and the determining unit includes:
a position detection module for detecting the position of the label view;
and the list determining module is used for determining that all the lists displayed on the page are the subclass list when the position of the tag view is positioned at the top of the page.
8. The list control apparatus according to claim 6, wherein the first acquisition unit includes:
the displacement calculation module is used for acquiring the initial touch point position and the final touch point position of the screen sliding event, and calculating transverse displacement and longitudinal displacement according to the initial touch point position and the final touch point position;
and the direction determining module is used for determining the sliding direction according to the initial touch point position, the final touch point position, the transverse displacement and the longitudinal displacement.
9. The list control apparatus of claim 8, wherein the direction determination module comprises:
a first determining submodule, configured to determine that the sliding direction is an upward sliding direction when the lateral displacement is smaller than the longitudinal displacement and the starting touch point position is located above the ending touch point position;
the second determining submodule is used for determining that the sliding direction is downward sliding when the transverse displacement is smaller than the longitudinal displacement and the starting touch point position is positioned below the ending touch point position;
a third determining submodule, configured to determine that the sliding direction is rightward sliding when the lateral displacement is greater than the longitudinal displacement and the starting touch point is located on the right side of the ending touch point;
and the fourth determining submodule is used for determining that the sliding direction is leftward sliding when the transverse displacement is larger than the longitudinal displacement and the starting touch point position is positioned on the left side of the ending touch point position.
10. The list control apparatus of claim 6, wherein the apparatus further comprises:
the second acquisition unit is used for acquiring the initial touch point position of the screen sliding event when the sliding direction is transverse sliding;
and the fifth control unit is used for controlling the subclass list to execute transverse scrolling according to the transverse sliding direction when the initial touch point position is positioned in the subclass list.
11. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the list control method of any one of claims 1-5.
12. A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the list control method of any one of claims 1-5.
CN201811603493.2A 2018-12-26 2018-12-26 List control method and device, electronic equipment and storage medium Active CN109814961B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811603493.2A CN109814961B (en) 2018-12-26 2018-12-26 List control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811603493.2A CN109814961B (en) 2018-12-26 2018-12-26 List control method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109814961A CN109814961A (en) 2019-05-28
CN109814961B true CN109814961B (en) 2020-11-06

Family

ID=66602454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811603493.2A Active CN109814961B (en) 2018-12-26 2018-12-26 List control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109814961B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110286899B (en) * 2019-06-28 2023-12-15 北京字节跳动网络技术有限公司 Editing method and device for application display interface and storage medium
CN112652383B (en) * 2020-12-23 2022-07-26 武汉联影医疗科技有限公司 Image visualization layout method and device, image analysis system and storage medium
CN113485606A (en) * 2021-06-28 2021-10-08 北京金堤征信服务有限公司 Method and device for realizing multi-list joint rolling
CN113655926B (en) * 2021-08-19 2024-03-15 北京百度网讯科技有限公司 Display control method, device, equipment and storage medium
CN114442880B (en) * 2022-01-19 2024-02-23 网易(杭州)网络有限公司 List scrolling method, device, electronic equipment and readable medium
CN114637447A (en) * 2022-03-21 2022-06-17 北京有竹居网络技术有限公司 List display method, apparatus, device, storage medium and program product
CN115375342A (en) * 2022-06-01 2022-11-22 阿里巴巴(中国)有限公司 Page information and advertisement picture display method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019678A (en) * 2012-11-16 2013-04-03 Tcl集团股份有限公司 Method and device for focus alternating of list focal plane frame
CN103559223A (en) * 2013-10-21 2014-02-05 东莞市东信网络技术有限公司 Table data refreshing system and method
CN106648337A (en) * 2016-12-30 2017-05-10 智车优行科技(北京)有限公司 Method and apparatus for displaying contents in display list, and electronic device
CN107329991A (en) * 2017-06-07 2017-11-07 武汉斗鱼网络科技有限公司 A kind of list access to web page and methods of exhibiting and its system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7240292B2 (en) * 2003-04-17 2007-07-03 Microsoft Corporation Virtual address bar user interface control
US7610258B2 (en) * 2004-01-30 2009-10-27 Microsoft Corporation System and method for exposing a child list
US7543278B2 (en) * 2004-10-15 2009-06-02 Microsoft Corporation System and method for making a user interface element visible
CN102270081B (en) * 2010-06-03 2015-09-23 腾讯科技(深圳)有限公司 A kind of method and device adjusting size of list element
CN105353962B (en) * 2015-10-29 2018-04-20 网易(杭州)网络有限公司 A kind of control method by sliding list and system
CN106406712B (en) * 2016-10-21 2020-02-18 广州酷狗计算机科技有限公司 Information display method and device
CN108664314B (en) * 2017-03-29 2023-10-13 香港城市大学 Modularized management method and device for big data processing flow

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019678A (en) * 2012-11-16 2013-04-03 Tcl集团股份有限公司 Method and device for focus alternating of list focal plane frame
CN103559223A (en) * 2013-10-21 2014-02-05 东莞市东信网络技术有限公司 Table data refreshing system and method
CN106648337A (en) * 2016-12-30 2017-05-10 智车优行科技(北京)有限公司 Method and apparatus for displaying contents in display list, and electronic device
CN107329991A (en) * 2017-06-07 2017-11-07 武汉斗鱼网络科技有限公司 A kind of list access to web page and methods of exhibiting and its system

Also Published As

Publication number Publication date
CN109814961A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
CN109814961B (en) List control method and device, electronic equipment and storage medium
US20180088764A1 (en) Method, apparatus, and storage medium for sharing content
EP3098701B1 (en) Method and apparatus for managing terminal application
US10509540B2 (en) Method and device for displaying a message
CN107908351B (en) Application interface display method and device and storage medium
EP3070659A1 (en) Method, device and terminal for displaying application messages
EP3163411A1 (en) Method, device and apparatus for application switching
EP3121701A1 (en) Method and apparatus for single-hand operation on full screen
CN105912258B (en) Operation processing method and device
CN105487805B (en) Object operation method and device
CN107102772B (en) Touch control method and device
EP3128411B1 (en) Interface display method, terminal, computer program and recording medium
EP2983081B1 (en) Method and device for list updating
US20180167478A1 (en) Method and apparatus for displaying notification message
CN107992257B (en) Screen splitting method and device
CN104317402B (en) Description information display method and device and electronic equipment
CN106547461B (en) Operation processing method, device and equipment
EP2921969A1 (en) Method and apparatus for centering and zooming webpage and electronic device
EP3015965A1 (en) Method and apparatus for prompting device connection
US20170052693A1 (en) Method and device for displaying a target object
CN110968364A (en) Method and device for adding shortcut plug-in and intelligent equipment
CN107656694B (en) Display control method and device of user interface
CN109358788B (en) Interface display method and device and terminal
CN106325712B (en) Terminal display control method and device and terminal
EP3104282A1 (en) Search method and search apparatus

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