| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 8 个月前 | ||
| 18 天前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 |
TextAreaEventNDK
介绍
本示例为使用NDK接口构建UI->使用文本->监听输入框事件的配套示例工程。
本示例展示了输入框输入、选中以及选中菜单。
效果预览
| 预览 |
|---|
![]() |
使用说明
- 安装编译生成的hap包,并打开应用;
- 在输入框内输入一段文字;
- 长按文字进行选中;
工程目录
TextAreaEventNDK
entry/src/main/ets/
└── pages
└── Index.ets (获取输入框界面)
entry/src/main/
├── cpp
│ ├── types
│ │ └── libentry
│ │ └── Index.d.ts (NDK函数对应的js映射)
│ ├── CMakeLists.txt (CMake脚本)
| ├── manager.cpp (创建输入框实现CPP文件)
| ├── manager.h
│ └── napi_init.cpp (NDK函数)
└── resources
├── base
│ ├── element
│ │ ├── color.json
│ │ ├── float.json
│ │ └── string.json
│ └── media
相关权限
不涉及
依赖
不涉及
约束和限制
-
本示例仅支持标准系统上运行, 支持设备:华为手机。
-
HarmonyOS系统:HarmonyOS 5.0.5 Release及以上。
-
DevEco Studio版本:6.0.0 Release及以上。
-
HarmonyOS SDK版本:HarmonyOS 6.0.0 Release SDK及以上。
下载
如需单独下载本工程,执行如下命令:
git init
git config core.sparsecheckout true
echo ArkUISample/TextAreaEventNDK > .git/info/sparse-checkout
git remote add origin https://gitcode.com/harmonyos_samples/guide-snippets.git
git pull origin master
