jiaoyaning / verificationcodeview Goto Github PK
View Code? Open in Web Editor NEWAndroid 自定义方形输入框,仿滴滴验证码输入框
Android 自定义方形输入框,仿滴滴验证码输入框
目前有个需求,场景是用自定义的键盘来输入。能提供一个输入的方法么?
mEtTextSize = typedArray.getDimensionPixelSize(R.styleable.vericationCodeView_vcv_et_text_size, 16);
这个取出来是px
editText.setTextSize(mEtTextSize);
这里面需要是dp
setTextSize(TypedValue.COMPLEX_UNIT_PX,mEtTextSize) 才行
横屏适配问题
能不能留个qq联系你或者邮箱
/**
* 清空验证码输入框
*/
public void setEmpty() {
EditText editText;
for (int i = mEtNumber - 1; i >= 0; i--) {
editText = (EditText) getChildAt(i);
editText.setText("");
if (i == 0) {
editText.setCursorVisible(true);
editText.requestFocus();
}
}
}
现在很多手机收到验证码可以直接复制,但是在这里如果粘贴的话只填充了第一个edittext,怎么处理呢?
gradle 7.0.x 一直提示Failed to resolve
快速点击4个数字键,第二个输入框开始获取焦点有明显延迟,导致第二个数字没有及时输入。
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_DEL
&& event.getAction() == KeyEvent.ACTION_DOWN) {
backFocus();
}
return false;
}
怎么改变输入框的大小
楼主为什么输入框第一个默认显示 光标了 其他框点击也能显示?
onTextChange和onComplete两个回调监听不执行是什么原因?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.