用户可用于视频应用中实现评论回复功能,项目使用Navigation Dialog弹出评论回复模块,通过RichEditor组件支持文字、表情输入及@好友功能,提供完整开发实践。
| Files | Last commit | Last update |
|---|---|---|
| 2 years ago | ||
| 1 year ago | ||
| 1 year ago | ||
| 2 years ago | ||
| 1 year ago | ||
| 1 year ago | ||
| 2 years ago | ||
| 2 years ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 1 year ago | ||
| 2 years ago | ||
| 1 year ago |
Comment Reply Window
Overview
This sample demonstrates how to implement a comment reply window that allows text, emojis, and @ friends above the comment list in a video app.
Preview
| Homepage | Comment List | Comment Reply Window (Soft Keyboard) | Comment Reply Window (Emoticon Panel) |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Instructions:
- Open the app and tap the message icon on the home screen. The comment list window is displayed.
- Tap the text box below the comment list. The comment reply window is displayed.
- By default, the comment module uses the soft keyboard. You can tap the emoji button in the editing area to switch to the emoji panel and enter emojis.
- Tap the @ button or enter the @ symbol using the soft keyboard to display the friend list. Tap a friend's profile picture to add the @ friend content in the editing area.
- Tap the delete button. The @ friend content is selected and highlighted. Then tap the delete button. The @ friend content is deleted.
Project Directory
├──commons
│ ├──commons/src/main/ets
│ │ └──utils
│ │ ├──FileUtils.ets // File utility class
│ │ └──Logger.ets // Log utility class
│ └──commons/src/main/resources // Static resources
├──features
│ ├──home/src/main/ets
│ │ ├──constants
│ │ │ └──HomeConstants.ets // Constant class
│ │ └──view
│ │ ├──CommentKeyboard.ets // Comment reply module
│ │ ├──CommentList.ets // Comment list
│ │ ├──CommentSendDialog.ets // Comment sending pop-up window
│ │ ├──Home.ets // Homepage
│ │ ├──HomeContent.ets // Video page
│ │ └──NavigationDialog.ets // Navigation-based pop-up component
│ └──home/src/main/resources // Static resources
└──products
├──default/src/main/ets
│ ├──entryability
│ │ └──EntryAbility.ets // Entry ability
│ ├──entrybackupability
│ │ └──EntryBackupAbility.ets // Entry backup ability
│ └──pages
│ └──Index.ets // Index page
└──default/src/main/resources // Static resources
How to Implement
- Use Navigation Dialog to implement a window, reference Page Display Mode under Component Navigation section.
- Use RichEditor APIs to implement the functions of entering text, emojis, and @ friends in the editing area of the comment module.
Required Permissions
N/A
Dependency
N/A
Constraints
-
The sample is supported only on Bar phones with standard systems.
-
The HarmonyOS version must be HarmonyOS 5.0.5 Release or later.
-
The DevEco Studio version must be DevEco Studio 5.0.5 Release or later.
-
The HarmonyOS SDK version must be HarmonyOS 5.0.5 Release SDK or later.
Introduction
用户可用于视频应用中实现评论回复功能,项目使用Navigation Dialog弹出评论回复模块,通过RichEditor组件支持文字、表情输入及@好友功能,提供完整开发实践。
Customize your domain


