openharmony 鸿蒙 arkts-list-grid-development-overview

2026-08-25 浏览 (1)

List and Grid Overview

Many applications require scrollable views to display collections of similar items, such as images, videos, music, news, or products. Depending on the layout requirements, these scenarios can be implemented using List, Grid, or WaterFlow. For circular screens, ArcList is recommended.

List

The List component is ideal for single-column or multi-column layouts where columns have uniform widths. Common use cases include contact lists, music playlists, and shopping lists.

In scenarios like live comment feeds or instant messaging, where new data is appended to the bottom, the list should automatically scroll upward to reveal newly added items. This behavior can be enabled by configuring the List component to stack from the end.

Grid

A grid layout organizes items into rows and columns, allowing flexible positioning by specifying the target cell for each item. Typical use cases include image galleries, calendars, and calculators.

To support items that span multiple rows or columns, configure the grid using GridLayoutOptions.

Waterfall Flow

Waterfall flow is a multi-column layout where columns have equal width but items can vary in height. It is well-suited for staggered layouts such as image feeds, video previews, and product recommendations.

To support mixed layouts with varying column counts on the same page, use WaterFlowSections.

Arc List

An arc list is a specialized list designed for circular screens. It supports automatic scaling of items as they approach the top or bottom edges of the display.

Feature Comparison

FeatureListGridWaterFlowArcList
General scrolling capabilitySupportedSupportedSupportedSupported
Item groupingListItemGroupGridLayoutOptionsWaterFlowSectionsNot supported
Sticky headersSupported via the sticky attributeNot supportedNot supportedNot supported
Drag-and-drop sortingSupported with drag-and-drop sorting, including animations and automatic scrolling when dragged to the edgeSupported with built-in animations (only when all items occupy 1 row and 1 column), and no automatic scrolling when dragged to the edgeNot supportedNot supported
Swipe actionsSupported via the swipeAction attributeNot supportedNot supportedNot supported
Item spacingSupportedSupportedSupportedSupported
Item dividersSupportedNot supportedNot supportedNot supported

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 arkts-common-components-text-input

openharmony 鸿蒙 arkts-select-component-faq

openharmony 鸿蒙 arkui-overview

openharmony 鸿蒙 js-framework-syntax-css

openharmony 鸿蒙 arkts-popup-and-menu-components-popup

openharmony 鸿蒙 arkts-navigation-animation-faq

openharmony 鸿蒙 arkts-rotation-transition-animation

openharmony 鸿蒙 ndk-inspector-component-observer

openharmony 鸿蒙 arkts-popup-and-menu-components-uicontext-popup

openharmony 鸿蒙 arkts-styled-string

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/xKWyfMWU