US 11,656,739 B2
Method for controlling display position of list items within a viewport, electronic device, and storage medium
Baoqiu Cui, Beijing (CN); Hua Wu, Beijing (CN); and Ruiduan Wang, Beijing (CN)
Assigned to BEIJING XIAOMI MOBILE SOFTWARE CO., LTD., Beijing (CN)
Filed by BEIJING XIAOMI MOBILE SOFTWARE CO., LTD., Beijing (CN)
Filed on Jul. 21, 2021, as Appl. No. 17/382,113.
Claims priority of application No. 202110021005.2 (CN), filed on Jan. 8, 2021.
Prior Publication US 2022/0221960 A1, Jul. 14, 2022
Int. Cl. G06F 3/0482 (2013.01); G06F 9/451 (2018.01); G06T 3/40 (2006.01)
CPC G06F 3/0482 (2013.01) [G06F 9/451 (2018.02); G06T 3/40 (2013.01)] 6 Claims
OG exemplary drawing
 
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.