目录

Lifestyle

Overview

This topic uses lifestyle apps as a typical example to detail how the feature of one-time development for multi-device deployment is applied in actual development. Lifestyle apps provide core features such as home page display, product display, image-text details, and video browsing. Pages that display the food list, store, product details, image-text details, and videos are used as typical pages to describe how to develop these core features by complying with Differentiation, Consistency, Flexibility, and Compatibility principles. This helps you quickly and efficiently master the capabilities of one-time development for multi-device deployment.

There are unique designs for the core features of lifestyle apps to show more product choices:

Currently, the following device types are supported: smartphone, foldable phone, and tablet. The following practices will focus on these product forms and provide reference examples from the perspectives of UX design, architecture design, and page development, helping you develop life apps.

Before reading this topic, you need to be familiar with the ArkUI framework and the capabilities of one-time development for multi-device deployment for page development. The following sections describe how to use them in app development.

UX Design

For multi-device responsive design guide, see Lifestyle Applications.

Architecture Design

The HarmonyOS project architecture uses a tiered architecture encompassing three layers: product customization layer, basic feature layer, and common capability layer. It provides a clear, efficient, and scalable design architecture. For details, see the logical design in Layered Architecture Design.

Page Development

This section describes how to use layout capabilities to adapt a set of pages in the lifestyle app across different devices, helping you develop life apps from scratch.

[h2]Layout Capabilities

The following describes the layout capabilities used for developing each page area.

Home Page

The home page usually provides various page redirection entries (including entry icons and product cards) and recommendation information, allowing users to browse and select products. Based on the UX design diagrams for the home page on different devices, you can design the page as follows:

Food List

The food list page displays recommended foods. On large-screen devices, a layout with more columns is used to present more information. Based on the UX design diagrams for the food list page on different devices, you can design the page as follows:

Store Page

The store page displays information about a store and all the products it sells. Users can quickly switch between products in the sidebar, and they can also select product specifications, which will be displayed in dialog boxes that adapt to different forms of devices, catering to user interaction habits. Based on the UX design diagrams for the store page on different devices, you can design the page as follows:

Product Details

The product details page displays specific information about a product and features an interactive design that allows users to view the complete product thumbnail by swiping up and down. This design provides a more intuitive display of the product. Users can also use the sidebar to view the product information, making the interaction more convenient. Based on the UX design diagrams for the product details page on different devices, you can design the page as follows:

Micro Details Page

The micro details page displays recommended product information. The number of displayed columns varies depending on the device, so more information can be displayed on the device with a larger screen. Based on the UX design diagrams for the micro details page on foldable phones, you can design the page as follows:

Item

sm

md

lg

Micro details page

Area

Implementation

Micro details page

The WaterFlow container is used to switch from one column to multiple columns. Specifically, set columnsTemplate of WaterFlow to 1, 2, and 3 at the sm, md, and lg breakpoints, respectively.

Movie List Page

The movie list page displays recommended movie information. There are three design paradigms for screens at the lg breakpoint. You can refer to related descriptions as needed. Based on the UX design diagrams for the movie list page on different devices, you can design the page as follows:

Movie Details Page

The movie details page displays specific information about a movie. The page uses a left-right layout on lg screens to maximize space utilization. Based on the UX design diagrams for the movie details page on different devices, you can design the page as follows:

Movie Theater Selection Page

The movie theater selection page displays a list of movie theaters for users to choose from, and provides movie poster previews for easy switching. Based on the UX design diagrams for the movie theater selection page on different devices, you can design the page as follows:

Home Page - Recommendation Page

The recommendation page on the home page displays brief information about recommended images and texts. The number of displayed columns varies depending on the device, so more information can be displayed on the device with a larger screen. Based on the UX design diagrams for the recommendation page on different devices, you can design the page as follows:

Short Video Details Page

The short video details page is used for video playback. This page provides functional buttons and an area for users to input comments while watching videos. Based on the UX design diagrams for the short video details page on different devices, you can design the page as follows:

Live Streaming Page

The live streaming page displays live streaming and user comments. The background is blurred to provide users with a more immersive viewing experience. Based on the UX design diagrams for the live streaming page on different devices, you can design the page as follows:

Image-Text Details Page

The image-text details page displays product details. Based on the UX design diagrams for the image-text details page on different devices, you can design the page as follows:

Sample Code