本示例通过拉起系统相机实现发布图片评论。
| Files | Last commit | Last update |
|---|---|---|
| 1 year ago | ||
| 2 years ago | ||
| 10 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
-
Open the app. Touch the text box, and then touch the camera button to start the system camera.
-
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
-
The sample app is supported only on Huawei phones, tablets, and PC/2in1 devices running the standard system.
-
The HarmonyOS version must be HarmonyOS 5.0.0 Release or later.
-
The DevEco Studio version must be DevEco Studio 5.0.0 Release or later.
-
The HarmonyOS SDK version must be HarmonyOS 5.0.0 Release or later.


