Disclosure of Invention
To solve the problems of the prior art, the present invention provides a method and apparatus for scrolling list items. The technical scheme is as follows:
in one aspect, the present invention provides a method of scrolling list items, the method comprising:
detecting touch operation of a user on a terminal screen, wherein the terminal screen displays an information packet and a list item, and the information packet comprises at least one list item;
judging the type of the touch operation according to the touch operation;
and judging whether the information group or the list item is scrolled according to the type of the touch operation.
Preferably, the determining the type of the touch operation according to the touch operation includes:
if the touch operation is a single-finger touch operation, determining that the type of the touch operation is a single-finger operation type;
and if the touch operation is a multi-finger touch operation, determining that the type of the touch operation is a multi-finger operation type.
Correspondingly, the determining whether to scroll the information group or scroll the list item according to the type of the touch operation includes:
if the type of the touch operation is a single-finger operation type, scrolling a list item;
and if the type of the touch operation is a multi-finger operation type, scrolling the information packet.
Preferably, the scrolling list item includes:
acquiring a first position where a finger of a user firstly touches the terminal screen;
acquiring a sliding operation of a finger of the user on the terminal screen and a starting list item, wherein the starting list item is a list item at a first position of the finger in the list;
and scrolling the list item according to the sliding operation of the finger and the initial list item.
Preferably, the scrolling the list item according to the sliding operation of the finger and the starting list item includes:
calculating the number of list items of the target list item and the starting list item different from each other according to the sliding distance included by the sliding operation of the finger and a first preset threshold;
acquiring the target list item from the list according to the sliding direction and the number of the list items included in the sliding operation of the finger;
and scrolling the list item until the target list item is scrolled.
Preferably, the scrolling information packet includes:
acquiring a first position where a plurality of fingers of a user touch the terminal screen for the first time;
acquiring sliding operation of each finger of a plurality of fingers of the user on the terminal screen and a starting information group, wherein the starting information group is a group in which a first position of one finger of the fingers is located in a list;
and scrolling the information groups according to the sliding operation of each finger and the initial information group.
Preferably, the obtaining the start information packet includes:
randomly selecting a first position from the first positions of each finger, acquiring an information group where the selected first position is located from the list, and taking the acquired information group as the initial information group; or,
and selecting a first position from the first positions of each finger according to the sliding operation of each finger, acquiring the information group where the selected first position is located from the list, and taking the acquired information group as the initial information group.
Preferably, the selecting a first position from the first positions of each finger according to the sliding operation of each finger includes:
selecting a lowermost first position from the first positions of each finger if the sliding direction included in the sliding operation of each finger is an upward sliding direction;
and if the sliding direction included in the sliding operation of each finger is downward sliding, selecting the uppermost first position from the first positions of each finger.
Preferably, the acquiring a sliding operation of each finger of the plurality of fingers of the user on the terminal screen includes:
respectively acquiring the current position of each finger of a plurality of fingers of the user touching the terminal screen;
and respectively acquiring the sliding operation of each finger on the terminal screen according to the first position and the current position of each finger.
Preferably, the scrolling the information packet according to the sliding operation of each finger and the start information packet includes:
selecting a sliding distance of a finger from sliding distances included in the sliding operation of each finger on the terminal screen, or calculating an average distance of the sliding distances included in the sliding operation of each finger on the terminal screen, and taking the selected sliding distance or the average distance as a first distance;
acquiring the target information group from the list according to the first distance and the sliding direction included by the sliding operation of each finger;
and scrolling the list items until the list items included in the target information packet are scrolled.
Preferably, the obtaining the target information packet from the list according to the first distance and the sliding direction included in the sliding operation of each finger includes:
calculating the number of groups of the difference between the target information group and the starting information group according to the first distance and a second preset threshold value;
and acquiring the target information group from the list according to the sliding direction and the group number included by the sliding operation of each finger.
Preferably, the obtaining the target information packet from the list according to the first distance and the sliding direction included in the sliding operation of each finger includes:
calculating the number of groups of the difference between the target information group and the starting information group according to the first distance and a second preset threshold value;
according to the sliding direction and the grouping number included in the sliding operation of each finger, acquiring an index corresponding to the target information grouping in an index table, wherein the index table is used for storing the index of each information grouping in the list;
and acquiring the target information packet from the list according to the index of the target information packet.
In another aspect, the present invention provides an apparatus for scrolling a list of items, the apparatus comprising:
the system comprises a detection module, a display module and a display module, wherein the detection module is used for detecting touch operation of a user on a terminal screen, and the terminal screen displays information groups and list items, wherein one information group comprises at least one list item;
the first judging module is used for judging the type of the touch operation according to the touch operation;
and the second judging module is used for judging whether the information group or the list item is scrolled according to the type of the touch operation.
Preferably, the first determining module is configured to determine that the type of the touch operation is a single-finger touch operation type if the touch operation is the single-finger touch operation; if the touch operation is a multi-finger touch operation, determining that the type of the touch operation is a multi-finger operation type;
correspondingly, the second determining module includes:
the first scrolling unit is used for scrolling list items if the type of the touch operation is a single-finger operation type;
and the second scrolling unit is used for scrolling the information packet if the type of the touch operation is a multi-finger operation type.
Preferably, the first scroll unit includes:
the first acquiring subunit is used for acquiring a first position where a finger of a user firstly touches the terminal screen;
the second obtaining subunit is configured to obtain a sliding operation of a finger of the user on the terminal screen and a starting list item, where the starting list item is a list item where a first position of the finger is located in the list;
and the first scrolling subunit is used for scrolling the list items according to the sliding operation of the finger and the starting list item.
Preferably, the first scrolling subunit is configured to calculate, according to a sliding distance included in the sliding operation of the finger and a first preset threshold, a number of list items that are different between the target list item and the starting list item; acquiring the target list item from the list according to the sliding direction and the number of the list items included in the sliding operation of the finger; and scrolling the list item until the target list item is scrolled.
Preferably, the second scrolling unit includes:
the third acquisition subunit is used for acquiring a first position where a plurality of fingers of a user touch the terminal screen for the first time;
a fourth obtaining subunit, configured to obtain a sliding operation of each finger of the multiple fingers of the user on the terminal screen and a start information group, where the start information group is a group in which a first position of a finger of the fingers is located in the list;
and the second rolling subunit is used for rolling the information packet according to the sliding operation of each finger and the initial information packet.
Preferably, the fourth obtaining subunit is configured to arbitrarily select one first position from the first positions of each finger, obtain, from the list, an information packet where the selected first position is located, and use the obtained information packet as the start information packet; or,
the fourth obtaining subunit is configured to select a first position from the first positions of each finger according to the sliding operation of each finger, obtain an information packet where the selected first position is located from the list, and use the obtained information packet as the start information packet.
Preferably, the fourth acquiring subunit is further configured to select a lowermost first position from the first positions of each finger if the sliding direction included in the sliding operation of each finger is an upward sliding direction; and if the sliding direction included in the sliding operation of each finger is downward sliding, selecting the uppermost first position from the first positions of each finger.
Preferably, the fourth obtaining subunit is further configured to obtain a current position where each of the plurality of fingers of the user touches the terminal screen; and respectively acquiring the sliding operation of each finger on the terminal screen according to the first position and the current position of each finger.
Preferably, the second scrolling subunit is configured to select a sliding distance of a finger from sliding distances included in the sliding operation of each finger on the terminal screen, or calculate an average distance of the sliding distances included in the sliding operation of each finger on the terminal screen, and use the selected sliding distance or the average distance as the first distance; acquiring the target information group from the list according to the first distance and the sliding direction included by the sliding operation of each finger; and scrolling the list items until the list items included in the target information packet are scrolled.
Preferably, the second scrolling subunit is further configured to calculate, according to the first distance and a second preset threshold, a packet number of a difference between the target information packet and the start information packet; and acquiring the target information group from the list according to the sliding direction and the group number included by the sliding operation of each finger.
Preferably, the second scrolling subunit is further configured to calculate, according to the first distance and a second preset threshold, a packet number of a difference between the target information packet and the start information packet; according to the sliding direction and the grouping number included in the sliding operation of each finger, acquiring an index corresponding to the target information grouping in an index table, wherein the index table is used for storing the index of each information grouping in the list; and acquiring the target information packet from the list according to the index of the target information packet.
In the embodiment of the invention, when the user wants to scroll the information group, a plurality of fingers of the user slide on the terminal screen, when the user wants to scroll the list item, one finger of the user slides on the terminal screen, and the finger of the user does not need to frequently move back and forth from the left side and the right side of the screen, so that the operation process is simple, and the efficiency of scrolling the list item is improved. And when the finger of the user touches the terminal screen, the terminal scrolls the list items or the information groups in real time, and when the user slides to the list items or the target information groups to be acquired, the acquisition accuracy is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Example 1
The embodiment of the invention provides a method for scrolling list items. Referring to fig. 1, wherein the method comprises:
step 101: detecting touch operation of a user on a terminal screen, wherein the terminal screen displays information groups and list items, and one information group comprises at least one list item;
step 102: judging the type of touch operation according to the touch operation;
step 103: and judging whether the information group or the list item is scrolled according to the type of the touch operation.
In the embodiment of the invention, when the user wants to scroll the information group, the user performs the touch operation of scrolling the information group on the terminal screen, when the user wants to scroll the list item, the user performs the touch operation of scrolling the list item on the terminal screen, the finger of the user does not need to frequently move back and forth from the left side and the right side of the screen, the operation process is simple, and the efficiency of acquiring the list item is improved.
Example 2
The embodiment of the invention provides a method for scrolling list items. Referring to fig. 2, wherein the method comprises:
step 201: the method comprises the steps that a terminal detects touch operation of a user on a terminal screen, and a first position where a finger of the user firstly touches the terminal screen is obtained;
and displaying the information groups and the list items on a terminal screen, wherein one information group comprises at least one list item.
The terminal detects the state of a terminal screen in real time, and when the terminal detects that a finger of a user firstly touches the terminal screen, the terminal acquires a first position where a touch point of the finger of the user firstly touches the terminal screen.
Wherein, the user can touch the terminal screen with a finger, and the user can also touch the terminal screen with a plurality of fingers. If the user touches the terminal screen by one finger, the terminal acquires a first position where the finger of the user firstly touches the terminal screen; if the user touches the terminal screen with a plurality of fingers, the terminal acquires a first position where each finger of the plurality of fingers of the user touches the terminal screen for the first time.
The plurality of fingers are at least two fingers, and may be two fingers, three fingers, four fingers, or the like. In the embodiment of the present invention, the number of the plurality of fingers is not particularly limited; moreover, the terminal is any terminal with a touch screen function, such as a mobile phone or a tablet computer with a touch screen function.
Step 202: the terminal judges the type of touch operation according to the touch operation, if the type of touch operation is a single-finger operation type, step 203 is executed, and if the type of touch operation is a multi-finger operation type, step 205 is executed;
if a finger of the user slides on the terminal screen, the touch operation is a single-finger touch operation, and the touch operation type corresponding to the single-finger touch operation is a single-finger operation type, then step 203 is executed. If a plurality of fingers of the user slide on the terminal screen, the touch operation is a multi-finger touch operation, and the operation type corresponding to the multi-finger touch operation is a multi-finger operation type, and step 205 is executed.
Step 203: the terminal acquires the sliding operation of one finger of a user on a terminal screen and an initial list item;
wherein the sliding operation includes a sliding distance and a sliding direction.
The terminal obtains a sliding distance of a finger of the user on the terminal screen, and the sliding distance may be:
when the terminal detects that one finger of a user slides on the terminal screen, the terminal periodically acquires the current position of the touch point of the one finger of the user touching the terminal screen, the terminal calculates the distance between the first position and the current position of the one finger of the user, and the obtained distance is used as the sliding distance of the one finger of the user on the terminal screen.
The terminal obtains a sliding direction of a finger of the user on the terminal screen, and the sliding direction may be:
if the current position of one finger of the user is located above the first position of the finger, the sliding direction of the one finger of the user on the terminal screen is upwards sliding; if the current position of one finger of the user is located below the first position of the finger, the sliding direction of one finger of the user on the terminal screen is downward sliding.
The terminal obtains the initial list item, which may be:
the terminal acquires a list item of a first position of a finger of a user in the list, and the acquired list item is used as a starting list item.
Step 204: the terminal scrolls the list items according to the sliding operation of a finger and the initial list items;
wherein step 204 may include the following steps (1) to (3):
(1) the terminal calculates the number of list items of a target list item and a starting list item which are different according to the sliding distance and a first preset threshold included by the sliding operation of one finger;
specifically, the terminal calculates the ratio of the sliding distance included in the sliding operation of one finger to a first preset threshold, and if the ratio is an integer, directly uses the obtained ratio as the number of list items different from the target list item and the starting list item; if the ratio is a non-integer, carrying out a rounding algorithm on the ratio or directly rounding off a decimal part to obtain an integer, and taking the obtained integer as the number of list items different from the starting list item.
The first preset threshold may be set and changed as needed, and in the embodiment of the present invention, the first preset threshold is not specifically limited.
(2) Acquiring a target list item from the list according to the sliding direction and the number of the list items included in the sliding operation of one finger;
specifically, if the sliding direction included in the sliding operation of a finger is upward sliding, the terminal acquires a target list item which is located below the starting list item and has a difference of the number of the list items from the starting list item from the list; and if the sliding direction included by the sliding operation of one finger is downward sliding, the terminal acquires a target list item which is positioned above the starting list item and has a difference with the starting list item by the number of the list items from the list.
(3) And scrolling the list item until the target list item is scrolled.
Specifically, if the sliding direction included in the sliding operation of one finger is upward sliding, the terminal scrolls the list items displayed in the terminal screen upward until the target list item is scrolled. And if the sliding direction included by the sliding operation of one finger is downward sliding, the terminal scrolls the list items displayed in the terminal screen downwards until the target list items are scrolled.
Step 205: the terminal acquires the sliding operation of each finger in a plurality of fingers on a terminal screen;
wherein the sliding operation includes a sliding distance and a sliding direction.
The terminal acquires the sliding distance of each finger on the terminal screen, and the method can comprise the following steps (1) and (2):
(1) the terminal respectively acquires the current position of each finger touching the terminal screen;
when the terminal detects that a plurality of fingers of a user slide on the terminal screen, the terminal periodically acquires the current position of a touch point of each finger touching the terminal screen.
(2) And the terminal respectively acquires the sliding distance of each finger on the terminal screen according to the first position and the current position of each finger.
Specifically, for each finger, the terminal calculates a distance between a first position and a current position of the finger, and takes the resulting distance as a sliding distance of the finger on the terminal screen.
Wherein, the terminal acquires the sliding direction of each finger on the terminal screen, which can be:
for each finger, if the current position of the finger is located above the first position of the finger, the sliding direction of the finger on the terminal screen is upward sliding; and if the current position of the finger is positioned below the first position of the finger, the sliding direction of the finger on the terminal screen is downward sliding.
Step 206: the terminal acquires a starting information group, wherein the starting information group is a group in which a first position of one finger in each finger in the list is located;
step 206 may be implemented in a first manner or a second manner, and for the first manner, may be:
the terminal randomly selects one first position from the first positions of each finger, acquires the information group where the selected first position is located from the list, and takes the acquired information group as the initial information group.
The list is a list currently displayed on a terminal screen, data in the list are displayed line by line, and each line of data is a list item; the terminal will often group list items included in the list according to a certain manner, and list items of the same information group in the list are arranged together line by line; the terminal can acquire the information packet of the selected first position from the list according to the selected first position, and the acquired information packet is used as a starting information packet.
It should be noted that, with respect to the first mode, after acquiring, in step 201, the first position where each finger of the plurality of fingers first touches the terminal screen, the terminal may directly select one first position from the first positions of each finger without performing step 202, acquire, from the list, the information packet where the selected first position is located, and use the acquired information packet as the start information packet.
For example, a mobile phone address book is a list, each list item in the address book is contact information of a contact, the contact information in the address book is grouped according to an initial letter of a name of the contact, the contact information of the contacts with the same initial letter is divided into one information group, and when a user finger touches a terminal screen, the terminal can acquire the information group where a first position is located according to the first position of the finger on the terminal screen.
For the second way, it can be:
the terminal selects one first position from the first positions of each finger according to the sliding operation of each finger, acquires the group where the selected first position is located from the list, and takes the acquired group as the initial information group.
The terminal may select one first position from the first positions of each finger according to the sliding operation of each finger, where the selecting may be:
the terminal judges the sliding direction included in the sliding operation of each finger, and if the sliding direction included in the sliding operation of each finger is upward sliding, the terminal selects the first position at the lowest position from the first positions of each finger; if the sliding operation of each finger includes a downward sliding direction, the uppermost first position is selected from the first positions of each finger.
It should be noted that, if the sliding direction included in the sliding operation of each finger is an upward sliding direction, the user may need to acquire the target information packet located below the start information packet, and therefore, the terminal selects the first position located at the lowest position from the first positions of each finger; if the sliding operation of each finger includes a downward sliding direction, the user may need to acquire a target information packet located above the start information packet, and therefore, the terminal selects the lowermost first position from the first positions of each finger.
Step 207: the terminal rolls the information groups according to the sliding operation of each finger and the initial information groups;
wherein step 207 may comprise the following steps (1) to (3):
(1) the terminal selects the sliding distance of a finger from the sliding distances included in the sliding operation of each finger on the terminal screen, or calculates the average distance of the sliding distances included in the sliding operation of each finger on the terminal screen, and takes the selected sliding distance or the average distance as a first distance;
the sliding distance of each finger on the terminal screen may be different, the terminal randomly selects the sliding distance of one finger from the sliding distances of each finger on the terminal screen, and the selected sliding distance is used as a first distance; or, the terminal calculates an average distance of the sliding distance of each finger on the terminal screen, and takes the obtained average distance as the first distance.
(2) The terminal acquires a target information group from the list according to the first distance and the sliding direction included by the sliding operation of each finger;
wherein, the step (2) can be realized by the first mode or the second mode, and the first mode of the step (2) can comprise the steps (2-1) and (2-2):
(2-1) the terminal calculates the number of groups with a difference between the target information group and the initial information group according to the first distance and a second preset threshold value;
specifically, the terminal calculates the ratio of the first distance to a second preset threshold, and if the ratio is an integer, the obtained ratio is directly used as the number of groups of the difference between the target information group and the initial information group; if the ratio is a non-integer, the ratio is subjected to a rounding algorithm or a decimal part is directly rounded to obtain an integer, and the obtained integer is used as the number of the packets with the difference between the target information packet and the initial information packet.
The second preset threshold may be set and changed as needed, and in the embodiment of the present invention, the second preset threshold is not specifically limited.
And (2-2) the terminal acquires the target information group from the list according to the sliding direction and the group number included in the sliding operation of each finger.
Specifically, if the sliding direction included in the sliding operation of each finger is upward sliding, the terminal acquires a target information packet which is positioned below the start information packet and has a difference in packet number from the start information packet from the list; if the sliding direction included in the sliding operation of each finger is downward sliding, the terminal acquires the target information packet which is positioned above the initial information packet and has a difference of the number of packets from the initial information packet in the list.
As a second mode for the step (2), steps (2-A) to (2-C) may be included:
(2-A), the terminal calculates the number of groups with a difference between the target information group and the initial information group according to the first distance and a second preset threshold value;
specifically, the terminal calculates the ratio of the first distance to a second preset threshold, and if the ratio is an integer, the obtained ratio is directly used as the number of groups of the difference between the target information group and the initial information group; if the ratio is a non-integer, the ratio is subjected to a rounding algorithm or a decimal part is directly rounded to obtain an integer, and the obtained integer is used as the number of the packets with the difference between the target information packet and the initial information packet.
(2-B), the terminal acquires indexes corresponding to the target information groups in an index table according to the sliding direction and the grouping number included by the sliding operation of each finger, and the index table is used for storing the indexes of each information group in the list;
the terminal first obtains the index corresponding to the start information packet from the list according to the start information packet, and then obtains the index corresponding to the target information packet in the index table according to the sliding direction and the packet number included in the sliding operation of each finger, which may be:
if the sliding direction included by the sliding operation of each finger is upward sliding, the terminal acquires an index corresponding to a target information packet which is positioned below the index corresponding to the initial information packet and has a difference with the index corresponding to the initial information packet by the number of packets in the index table; and if the sliding direction included by the sliding operation of each finger is downward sliding, the terminal acquires the index corresponding to the target information packet which is positioned above the index corresponding to the initial information packet and has the difference of the number of packets from the index corresponding to the initial information packet in the index table.
And (2-C) the terminal acquires the target information packet from the list according to the index of the target information packet.
The list stores the corresponding relation between the index and the information packet, and the target information packet can be obtained from the list according to the index of the target information packet.
(3) And scrolling the list items until the list items included in the target information packet are scrolled.
Specifically, if the sliding direction included in the sliding operation of each finger is an upward sliding direction, the terminal scrolls the list items displayed in the terminal screen upward until the list items included in the target information packet are scrolled. And if the sliding direction included by the sliding operation of each finger is downward sliding, the terminal scrolls the list items displayed in the terminal screen downwards until the list items included in the target information group are scrolled.
Further, the list stores the corresponding relation between the information group and the list item, and the terminal can acquire the list item included by the target information group from the list according to the target information group and display the acquired list item on a terminal screen.
In the embodiment of the invention, when the user wants to scroll the information group, a plurality of fingers of the user slide on the terminal screen, when the user wants to scroll the list item, one finger of the user slides on the terminal screen, and the finger of the user does not need to frequently move back and forth from the left side and the right side of the screen, so that the operation process is simple, and the efficiency of scrolling the list item is improved. And when the finger of the user touches the terminal screen, the terminal scrolls the list items or the information groups in real time, and when the user slides to the list items or the target information groups to be acquired, the acquisition accuracy is improved.
Example 3
The embodiment of the invention provides a device for scrolling list items. Referring to fig. 3, wherein the apparatus comprises:
the detection module 301 is configured to detect a touch operation of a user on a terminal screen, where the terminal screen displays information packets and list items, where one information packet includes at least one list item;
a first determining module 302, configured to determine a type of the touch operation according to the touch operation;
a second judging module 303, configured to judge whether to scroll the information group or scroll the list item according to the type of the touch operation.
Preferably, the first determining module 302 is configured to determine that the type of the touch operation is a single-finger touch operation if the touch operation is a single-finger touch operation; and if the touch operation is a multi-finger touch operation, determining the type of the touch operation as a multi-finger operation type.
Preferably, the second determining module 303 includes:
the first scrolling unit is used for scrolling list items if the type of the touch operation is a single-finger operation type;
the second scrolling unit is used for scrolling the information group if the type of the touch operation is a multi-finger operation type;
accordingly, a first scrolling unit includes:
the first acquisition subunit is used for acquiring a first position where a finger of a user firstly touches the screen of the terminal;
the second acquisition subunit is used for acquiring a sliding operation of a finger of a user on the terminal screen and an initial list item, wherein the initial list item is a list item in which a first position of the finger in the list is located;
and the first scrolling subunit is used for scrolling the list item according to the sliding operation of a finger and the starting list item.
Preferably, the first scrolling subunit is configured to calculate, according to a sliding distance included in the sliding operation of the finger and a first preset threshold, a number of list items that are different between the target list item and the start list item; acquiring a target list item from the list according to the sliding direction and the number of the list items included in the sliding operation of one finger; and scrolling the list item until the target list item is scrolled.
Preferably, the second scroll unit includes:
the third acquisition subunit is used for acquiring a first position where a plurality of fingers of a user touch the terminal screen for the first time;
the fourth acquisition subunit is used for acquiring the sliding operation of each finger of a plurality of fingers of the user on the terminal screen and the initial information group, wherein the initial information group is the group where the first position of one finger of each finger in the list is located;
and the second rolling subunit is used for rolling the information groups according to the sliding operation of each finger and the initial information group.
Preferably, the fourth obtaining subunit is configured to arbitrarily select one first position from the first positions of each finger, obtain an information packet where the selected first position is located from the list, and use the obtained information packet as a start information packet; or,
and the fourth acquisition subunit is used for selecting one first position from the first positions of each finger according to the sliding operation of each finger, acquiring the information packet where the selected first position is located from the list, and taking the acquired information packet as the initial information packet.
Preferably, the fourth acquiring subunit is further configured to select a lowermost first position from the first positions of each finger if the sliding direction included in the sliding operation of each finger is an upward sliding direction; if the sliding operation of each finger includes a downward sliding direction, the uppermost first position is selected from the first positions of each finger.
Preferably, the fourth obtaining subunit is further configured to obtain a current position where each of the plurality of fingers of the user touches the terminal screen; and respectively acquiring the sliding operation of each finger on the terminal screen according to the first position and the current position of each finger.
Preferably, the second scrolling subunit is configured to select a sliding distance of one finger from sliding distances included in the sliding operation of each finger on the terminal screen, or calculate an average distance of the sliding distances included in the sliding operation of each finger on the terminal screen, and use the selected sliding distance or the average distance as the first distance; acquiring a target information group from the list according to the first distance and the sliding direction included by the sliding operation of each finger; the list items are scrolled until the list items included in the target information packet are scrolled.
Preferably, the second scrolling subunit is further configured to calculate, according to the first distance and a second preset threshold, a packet number of a difference between the target information packet and the start information packet; and acquiring the target information group from the list according to the sliding direction and the group number included in the sliding operation of each finger.
Preferably, the second scrolling subunit is further configured to calculate, according to the first distance and a second preset threshold, a packet number of a difference between the target information packet and the start information packet; according to the sliding direction and the grouping number included in the sliding operation of each finger, acquiring an index corresponding to a target information grouping in an index table, wherein the index table is used for storing the index of each information grouping in a list; and acquiring the target information packet from the list according to the index of the target information packet.
In the embodiment of the invention, when the user wants to scroll the information group, a plurality of fingers of the user slide on the terminal screen, when the user wants to scroll the list item, one finger of the user slides on the terminal screen, and the finger of the user does not need to frequently move back and forth from the left side and the right side of the screen, so that the operation process is simple, and the efficiency of scrolling the list item is improved. And when the finger of the user touches the terminal screen, the terminal scrolls the list items or the information groups in real time, and when the user slides to the list items or the target information groups to be acquired, the acquisition accuracy is improved.
It should be noted that: in the above embodiment, when scrolling list items, the device for scrolling list items is illustrated by only dividing the functional modules, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus for scrolling list items and the method for scrolling list items provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.