image-comment:基于 HarmonyOS 的图片评论功能示例项目

本示例通过拉起系统相机实现发布图片评论。

Branch4Tags0
FilesLast commitLast update
1 year ago
2 years ago
4 months ago
11 months ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago

Posting an Image Comment

Overview

This sample shows how to post a comment on an image by starting the system camera.

Preview

360vp 600vp 840vp

How to Use

  1. Open the app. Touch the text box, and then touch the camera button to start the system camera.

  2. Take a photo, return the app page, and touch the button to post it.

Library Directory

├──entry/src/main/ets
│  ├──commmon/constants
│  │  └──CommonConstants.ets       // Common constants 
│  ├──pages                                  
│  │  └──ImageCommentComponent.ets // Home page                            
│  ├──model
│  │  ├──CommentModel.ets          // Comment class
│  │  └──MockCommentData.ets       // Comment data
│  ├──utils
│  │  ├──BreakpointUtils.ets       // Break point utils        
│  │  ├──CameraUtils.ets           // Start the camera  
│  │  ├──Logger.ets                // Log utils                       
│  │  └──WindowUtil.ets            // Window utils
│  ├──view
│  │  ├──CommentInputDialog.ets    // Post comment dialog box
│  │  ├──CommentItemView.ets       // Dialog box components
│  │  ├──CommentItemView.ets       // Comment components
│  │  └──ImageListView.ets         // Comment image list
│  └──ImageCommentController.ets   // Export utils
└──entry/src/main/resources        // Static resources

Required Permissions

N/A

Constraints

  1. The sample app is supported only on Huawei phones, tablets, and PC/2in1 devices running the standard system.

  2. The HarmonyOS version must be HarmonyOS 5.0.0 Release or later.

  3. The DevEco Studio version must be DevEco Studio 5.0.0 Release or later.

  4. The HarmonyOS SDK version must be HarmonyOS 5.0.0 Release or later.

Introduction

本示例通过拉起系统相机实现发布图片评论。

Customize your domain