1 Star 0 Fork 1.6K

giftedhappy/applications_app_samples

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

Lightweight Storage

Introduction

Lightweight storage supports lightweight key-value (KV) operations and allows local apps to store a small amount of data. This sample shows how to add offerings to the shopping cart, remove offerings from the shopping cart, and saving the shopping cart. The shopping cart information is retained even when the app is closed. This reflects the lightweight storage feature.

Usage

  1. Select an offering and click Add to Cart. When the number of offerings in the shopping cart is greater than 5, a full icon is displayed in the upper right corner and no more offering can be added to the shopping cart.
  2. Touch the shopping cart icon to view the added offerings. You can delete offerings from the shopping cart or clear the shopping cart. The total price of offerings and the shopping cart icon change accordingly.
  3. Exit the app and then open the shopping cart again. The offering information before exit is displayed.

Constraints

This sample can only be run on standard-system devices.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/giftedhappy/applications_app_samples.git
git@gitee.com:giftedhappy/applications_app_samples.git
giftedhappy
applications_app_samples
applications_app_samples
master

Search