CPC G06F 3/0482 (2013.01) [G06F 9/451 (2018.02); G06T 3/40 (2013.01)] | 6 Claims |
1. A method for controlling an operation list on a device, comprising:
obtaining a target operation item, wherein the target operation item refers to items entering a current list viewport of the operation list;
obtaining a remaining space between the target operation item and a bottom of a display region of a display of the device when the target operation item is located at a preset position of the display region;
extending a buffer of the current list viewport of the operation list based on the remaining space;
laying out the operation list based on the extended buffer and the current list viewport to obtain a size of a next operation item of the target operation item after the next operation item is moved into the buffer;
determining a display position of the target operation item within the display region based on the size of the next operation item and the remaining space, comprising:
setting the target operation item at the preset position in response to the size of the next operation item being greater than or equal to a size of the remaining space, and filling part or all of the next operation item in the remaining space; and
obtaining a difference between the size of the next operation item and a size of the remaining space in response to the size of the next operation item being smaller than the size of the remaining space, and deviating, based on the difference, the target operation item from the preset position by the difference, so that the next operation item fills the remaining space; and
restoring the buffer of the current list viewport to a default size.
|