代码拉取完成,页面将自动刷新
Pin code input control component, support any length and input any data.
Solution 1:
include ':entry', ':library'
compile project(path: ':library')
or
implementation project(':library')
Solution 2: local use of har package integration
implementation fileTree(dir:'libs', include: ['*.jar','*.har'])
Solution 3:
build.gradle
file (not your module build.gradle
file):allprojects {
repositories {
...
mavenCentral()
}
}
dependencies {
implementation ‘com.gitee.baijuncheng-open-source:pin-view:1.0.0'
}
mPinView.setCanInput(true);// 设置是否可输入 默认true
mPinView.setHint(""); // 设置EditText的Hint
mPinView.setInputType(PinView.InputType.NUMBER); // 设置输入的格式
mPinView.setPassword(true); // 设置是否以明文显示
mPinView.setPinHeight(60); // 设置每一个EditText的高度
mPinView.setPinWidth(60); // 设置每一个EditText的宽度
mPinView.setPinLength(4); // 设置可输入的 PIN 码长度,默认4
mPinView.clearValue(); // 清除输入的数据
mPinView.setValue("1234"); // 设置输入值
mPinView.setPinViewEventListener(this); // 设置输入完毕的监听事件
<com.nanchen.pinview.PinView
ohos:id="$+id:pinView"
ohos:width="match_content"
ohos:height="match_content"
ohos:layout_alignment="vertical_center"
ohos:left_margin="20vp"
app:cursorVisible="false"
app:hint=""
app:inputType="number"
app:password="true"
app:pinHeight="30vp"
app:pinLength="4"
app:pinWidth="30vp"
app:splitWidth="20vp"/>
Copyright 2018 nanchen(刘世麟)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。