Method for Looking Up by Flicking On Touchscreen and Touchscreen Device
A method for looking up by flicking on a touchscreen and a touchscreen device are provided. The method including: obtaining an initial entry corresponding to a leaving position where a touch body leaves a touchscreen after flicking on the touchscreen, and an initial flicking velocity; determining a predicted flicking distance according to the initial flicking velocity and a preset acceleration; obtaining widths of entries; determining, according to the predicted flicking distance and the widths of entries, a predicted target entry starting from the initial entry when the flicking stops. By using the embodiments of the present invention, efficiency of a user in looking up a target entry by flicking on a touchscreen can be improved.
1 . A method for looking up a target entry in an entry list by flicking on a touchscreen, comprising:
obtaining an initial entry corresponding to a leaving position where a touch body leaves a touchscreen after flicking on the touchscreen and an initial flicking velocity of the initial entry;
determining a predicted flicking distance of the initial entry according to the initial flicking velocity and a preset acceleration;
obtaining widths of entries opposite to a flicking direction from the initial entry in the entry list;
determining a predicted target entry starting from the initial entry according to the predicted flicking distance and the widths of the entries;
determining that a common entry in a position nearest to the predicted target entry in a preset range is an actual target entry when the predicted target entry is not a preset common entry; and
displaying the actual target entry in a display area of the touchscreen.
2 . The method according to claim 1 , wherein the method further comprises determining that the predicted target entry is the actual target entry when the predicted target entry is the preset common entry.
3 . The method according to claim 1 , wherein the method further comprises determining that the predicted target entry is the actual target entry when the predicted target entry is not the preset common entry, and there is no preset common entry in the preset range.
4 . The method according to claim 1 , wherein determining the predicted target entry starting from the initial entry according to the predicted flicking distance and the widths of the entries specifically comprises:
adding the widths of entries starting from the initial entry until a sum of the widths reaches the predicted flicking distance; and
determining that an entry where a final sum of the widths is equal to the predicted flicking distance is the predicted target entry.
5 . The method according to claim 1 , wherein the method further comprises:
presetting a common entry; and
updating the common entry according to a preset rule.
6 . A touchscreen device, comprising:
a first obtaining unit configured to obtain an initial entry corresponding to a leaving position where a touch body leaves the touchscreen after flicking on the touchscreen and an initial flicking velocity of the initial entry;
a first calculating unit configured to determine a predicted flicking distance of the initial entry according to the initial flicking velocity obtained by the obtaining unit and a preset acceleration;
a second obtaining unit configured to obtain widths of entries opposite to a flicking direction from the initial entry in an entry list;
a second calculating unit configured to determine a predicted target entry starting from the initial entry according to the predicted flicking distance determined by the first calculating unit and the widths of the entries obtained by the second obtaining unit;
a processing unit configured to determine that a common entry in a position nearest to the predicted target entry in a preset range is an actual target entry when the predicted target entry determined by the second calculating unit is not a preset common entry; and
a display unit configured to display the actual target entry determined by the processing unit in a display area of the touchscreen.
7 . The device according to claim 6 , wherein the processing unit is further configured to determine that the predicted target entry is the actual target entry when the predicted target entry determined by the second calculating unit is the preset common entry.
8 . The device according to claim 6 , wherein the processing unit is further configured to determine that the predicted target entry is the actual target entry when the predicted target entry determined by the second calculating unit is not the preset common entry, and there is no preset common entry in the preset range.
9 . The device according to claim 6 , wherein the second calculating unit is specifically configured to:
add the widths of entries starting from the initial entry until a sum of the widths reaches the predicted flicking distance; and
determine that an entry where a final sum of the widths is equal to the predicted flicking distance is the predicted target entry.
10 . The device according to claim 6 , further comprising a common entry processing unit configured to:
store a common entry that is preset; and
update the common entry according to a preset rule.
11 . A non-transitory computer-readable medium having computer usable instructions stored thereon for execution by a processor, wherein the instructions cause the processor to:
obtain an initial entry corresponding to a leaving position where a touch body leaves a touchscreen after flicking on the touchscreen and an initial flicking velocity of the initial entry;
determine a predicted flicking distance of the initial entry according to the initial flicking velocity and a preset acceleration;
obtain widths of entries opposite to a flicking direction from the initial entry in the entry list;
determine a predicted target entry starting from the initial entry according to the predicted flicking distance and the widths of the entries;
determine that a common entry in a position nearest to the predicted target entry in a preset range is an actual target entry when the predicted target entry is not a preset common entry; and
display the actual target entry in a display area of the touchscreen.
12 . The non-transitory computer-readable medium according to claim 11 , wherein the instructions further cause the processor to determine that the predicted target entry is the actual target entry when the predicted target entry is the preset common entry.
13 . The non-transitory computer-readable medium according to claim 11 , wherein the instructions further cause the processor to determine that the predicted target entry is the actual target entry when the predicted target entry is not the preset common entry, and there is no preset common entry in the preset range.
14 . The non-transitory computer-readable medium according to claim 11 , wherein the instructions cause the processor to determine the predicted target entry starting from the initial entry according to the predicted flicking distance and the widths of the entries specifically comprises the instructions causing the processor to:
add the widths of entries starting from the initial entry until a sum of the widths reaches the predicted flicking distance; and
determine that an entry where a final sum of the widths is equal to the predicted flicking distance is the predicted target entry.
15 . The non-transitory computer-readable medium according to claim 11 , wherein the instructions further cause the processor to:
preset a common entry; and
update the common entry according to a preset rule.