
回复
1.在项目根目录下的build.gradle文件中,
allprojects {
repositories {
maven {
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
}
}
}
2.在entry模块的build.gradle文件中,
dependencies {
implementation('com.gitee.chinasoft_ohos:expression:0.0.1-SNAPSHOT')
......
}
在sdk6,DevEco Studio2.2 beta1下项目可直接运行 如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件, 并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下
将自定义view添加到XML中,使用方法如下:
<com.example.expressionlibrary.ExpressionShowFragment
ohos:id="$+id:main"
ohos:height="match_parent"
ohos:width="match_parent"/>
完整调用:
TextField mText = (TextField) findComponentById(ResourceTable.Id_test_edit);
ExpressionShowFragment expressionShowFragment = (ExpressionShowFragment) findComponentById(ResourceTable.Id_main);
expressionShowFragment.input(mText);
Method | Description |
---|---|
input | 设置显示组件textField |
CodeCheck代码测试无异常
CloudTest代码测试无异常
病毒安全检测通过
当前版本demo功能与原组件基本无差异