[0040] Example two
[0041] figure 2 Shows a schematic flowchart of a content presentation method according to the second embodiment of the present invention, where the method can be implemented by using a list control, such as figure 2 As shown, the method includes the following steps:
[0042] Step S200: Receive a gesture sliding operation performed by the user on the device.
[0043] Wherein, when the user needs to switch the displayed content item, the user can switch by gesture sliding operation on the touch screen of the device. Specifically, the gesture sliding operation may be an upward sliding operation, a downward sliding operation, a left sliding operation, or a right sliding operation.
[0044] Step S201: Prevent the system from responding to the gesture sliding operation.
[0045] After receiving the gesture sliding operation, in the prior art, the system responds to the gesture sliding operation, and refreshes the content to be displayed according to the sliding distance corresponding to the gesture sliding operation. In the technical solution provided by the embodiment of the present invention, in order to reduce the number of refreshes, in step S201, the system is prevented from responding to the gesture sliding operation.
[0046] Step S202: When the gesture sliding operation is an upward sliding operation or a leftward sliding operation, the gesture sliding operation is mapped as a page-down operation instruction.
[0047] When the gesture sliding operation is an upward sliding operation or a left sliding operation, it means that the user wants to view the content item with a lower serial number, and then the gesture sliding operation is mapped to a page-down operation instruction.
[0048] Step S203: It is judged whether the serial number of the last content item in the visible area of the current device is the serial number of the last content item among all content items; if yes, step S206 is executed; if not, step S204 is executed.
[0049] Among them, the current visible area of the device refers to the current visible area of the device. After the gesture sliding operation is mapped to the page-down operation instruction, it is determined whether the sequence number of the last content item in the visible area of the current device is the sequence number of the last content item among all content items. If it is determined that the serial number of the last content item in the visible area of the current device is the serial number of the last content item in all content items, it means that the last content item displayed in the visible area of the current device is all content items If it is determined that the serial number of the last content item in the visible area of the current device is not the serial number of the last content item in all content items, then it indicates that the serial number of the last content item in the visible area of the current device The last content item displayed is not the last content item among all content items, and then there are other content items after the last content item displayed in the current visible area, and step S204 is executed.
[0050] Step S204: Record the serial number of the first content item in the visible area of the current device into the stack.
[0051] In the case where it is determined in step S203 that the serial number of the last content item in the visible area of the current device is not the serial number of the last content item in all content items, in step S204, the serial number in the visible area of the current device The sequence number of the first content item is recorded in the stack, so that the stack records the sequence number of the first content item of the historical display page.
[0052] Step S205, starting from the last content item in the visible area of the current device, select at least one content item of a preset number sorted thereafter.
[0053] Those skilled in the art can set the preset number according to actual needs, which is not limited here. Assuming that the preset number is 4, and the last content item in the visible area of the current device is content item 7, then select the next 4 content items from content item 7, namely select content item 7, content item 8. Content item 9 and content item 10, using content item 7 to content item 10 as content items to be displayed.
[0054] Step S206: Do not respond to the page-down operation instruction.
[0055] In the case that it is determined in step S203 that the serial number of the last content item in the visible area of the current device is the serial number of the last content item in all content items, the last content item displayed in the visible area of the current device is explained The item is the last content item among all content items, and there is no need to respond to the page-down operation instruction, so in step S206, no response is made to the page-down operation instruction.
[0056] In step S207, when the gesture sliding operation is a downward sliding operation or a right sliding operation, the gesture sliding operation is mapped to a page-up operation instruction.
[0057] When the gesture sliding operation is a downward sliding operation or a right sliding operation, it means that the user wants to view the content item with the first serial number, and then the gesture sliding operation is mapped to an upward turning operation instruction.
[0058] In step S208, it is judged whether there is a serial number recorded in the stack; if so, step S209 is executed; if not, step S211 is executed.
[0059] If it is judged that a serial number is recorded in the stack, it means that there are other content items before the first content item in the visible area of the current device, and then step S209 is executed; if it is judged that no serial number is recorded in the stack, it means that the current device The first content item in the visible area of is the first content item among all content items, and step S211 is executed.
[0060] Step S209: Obtain the serial number from the stack.
[0061] In the case where it is determined in step S208 that a serial number is recorded in the stack, the serial number is obtained from the stack. The content item corresponding to the acquired serial number is the serial number of the first content item of the previous historical display page.
[0062] Step S210, starting from the acquired content item corresponding to the serial number, select at least one content item of a preset number sorted thereafter.
[0063] Those skilled in the art can set the preset number according to actual needs, which is not limited here. Suppose that the preset number is 4, the acquired serial number is 4, and the content item corresponding to serial number 4 is content item 4. Then, starting from content item 4, select the next 4 content items, that is, select content item 4, content For item 5, content item 6, and content item 7, use content item 4 to content item 7 as content items to be displayed.
[0064] Step S211: Do not respond to the page-up operation instruction.
[0065] If it is determined in step S208 that no serial number is recorded in the stack, it means that the first content item in the visible area of the current device is the first content item among all content items, and there is no need to respond to the page-up operation instruction , Then in step S211, no response is made to the page-up operation instruction.
[0066] In step S212, at least one content item is displayed in the visible area of the device in a paging manner.
[0067] If the content items to be displayed are content item 7 to content item 10, then in step S212, content item 7 to content item 10 are displayed in the visible area of the device in a paging manner.
[0068] According to the content display method provided in this embodiment, when the gesture sliding operation is an upward sliding operation or a left sliding operation, the gesture sliding operation is mapped to a page-down operation instruction, and the first item in the visible area of the current device The serial number of the content item is recorded in the stack, and then at least one preset number of content items sorted after the last content item in the visible area of the current device are selected, and then the content items are sorted in the visible area of the device by paging Show at least one content item; when the gesture slide operation is a downward slide operation or a right slide operation, the gesture slide operation is mapped to an upward page turning operation instruction, the sequence number is obtained from the stack, and then the content item corresponding to the obtained sequence number is obtained At least one content item of a preset number sorted thereafter is initially selected, and then the at least one content item is displayed in the visible area of the device in a paging manner. Using the technical solution provided by the present invention, the gesture sliding operation is mapped to the corresponding page turning operation instruction, thereby reducing the number of refreshes and effectively avoiding screen flashing afterimages when the device is displaying content; in addition, the stack is used to realize the The effective fixation of the content to be displayed on a display page enables the content to be displayed to be easily displayed through paging, optimizes the content display method, and makes the displayed content more abundant.