Browse Prior Art Database

An Efficient Method for Displaying a Very Large Number of Items in a Scrolling Area Where the Dimensions of the Items are Initially Unknown

IP.com Disclosure Number: IPCOM000247688D
Publication Date: 2016-Sep-27
Document File: 3 page(s) / 132K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a virtual list that allows for items of arbitrary, unknown dimensions. Further, the dimensions of the items can be changed during the life of the virtual list.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 47% of the total text.

Page 01 of 3

An Efficient Method for Displaying a Very Large Number of Items in a Scrolling Area Where the Dimensions of the Items are Initially Unknown

In the development of graphical applications, it is often necessary to display a large amount of data to the user (e.g., a very long list). If the number of items is very large, it can strain the rendering engine of the application as it attempts to render all the items.

A solution to this is to use a virtual list , in which only the items that are currently in the user's view are passed to the rendering engine. The list in view is then updated as the user moves around or scrolls through the view.

The novel contribution is a virtual list that allows for items of arbitrary, unknown dimensions. Further, the dimensions of the items can be changed during the life of the virtual list. This is currently used to display a large list of email messages, where some

messages may have different heights depending on whether the message has special properties (e.g., first of a kind, having an attachment, etc.). This is done by using an estimate of the total height of the list that progressively improves as the user moves more items into view.

For simplicity, this explanation is illustrated using a list that scrolls only in the vertical direction and the width of each item is the same but the height of each is unknown. However, this method also applies to a horizontally scrolling region, or a region that scrolls in both directions.

The method is broken into three major phases, which happen in a cycle: Estimate, Render, and Measure. At the start, nothing is rendered. As items are rendered, the tool measures the associated dimensions, and uses that to improve the estimate of the heights in the list.

Estimation

The Estimate phase must track a number of data structures:


• measuredHeights: this is a map of itemIDs to measured dimensions. In this illustration, this is heights, but these could easily be widths or multi-dimensional vectors.

• totalMeasuredHeight: a number representing the sum of all the measured items • nMeasured: the total number of measured items; this is distinct from both the number of items in the list and the number of items currently rendered
• trueHeights: an array in which each element represents the total height of the list from the start of the list up until the item at that index. These heights have to be actual measurements, not estimates.


• cachedEstimatedHeights: an array in which each element represents the total height of the list from the start of the list up to the item at that index, but here the heights may be estimates. This data structure is used to prevent repeated, unnecessary recalculation of the estimates.

The procedure for estimating the height of a list to an index is as follows:

1. If there is an entry in trueHeights available for this index, use that. This is the correct value (with no estimation error) if it is available.

2. If there is an entry in cachedEst...