仿美团和糯米商家验证版的一个数字校验键盘
来源:互联网 发布:软件开发心得体会 编辑:程序博客网 时间:2024/04/30 08:23
NumberKeyboard
项目地址:wangshaolei/NumberKeyboard
简介:仿美团和糯米商家验证版的一个数字校验键盘
Custom keyboardview with two ways:
- Override systems's sys.xml of keyboardview
- Custom the layout and slove the touchListener's question and so on...
For example: MeiTuan's Merchant or NuoMi's Merchant app, Number Keyboard
Show parts codes:
public class MainActivity extends AppCompatActivity implements View.OnClickListener, NumberKeyboardUtil.OnPopuWindowListener private void initView(){ etCode = ButterKnife.findById(inputLayout, R.id.et_code); keyboardPopupwindow = NumberKeyboardPopupWindow.getInstance(this).onCreate(this); NumberKeyboardUtil.getInstance().setOnTouchListener(etCode, keyboardPopupwindow, this); NumberKeyboardUtil.getInstance().disableCopyAndPaste(etCode); } @Override public void showPopuWindow() { etCode.requestFocus(); keyboardPopupwindow.showAsDropDown(llTop); } @Override public void dismiss() { etCode.getText().clear(); etCode.clearFocus(); keyboardPopupwindow.dismiss(); } @Override public void insertStr(String str) { int index = etCode.getSelectionStart(); if (index < 0 || index >= etCode.getText().toString().length()) { etCode.append(str); } else { etCode.getEditableText().insert(index, str); } } @Override public void check() { Toast.makeText(this, "check", Toast.LENGTH_SHORT).show(); }
Thanks:
Jakewharton-Butterknife
0 0
- 仿美团和糯米商家验证版的一个数字校验键盘
- 爬虫抓取糯米网上所有商家数据
- 一个简单的数字验证
- java和javascript的数字校验
- Struts 的数据校验和验证框架
- Struts 的数据校验和验证框架
- java验证码的编写和校验
- 一个简单的验证类(数字验证、为空验证)
- 一个简单的自定义数字验证
- 一个数字加运算的验证码
- 数字验证和数字字母的混合验证
- 数字和货币校验的dojo的js
- 生成一个包含数字和字母的自定义位数的验证码
- 一个从键盘读入数字并排序的程序
- 校验日期和数字的正则表达式示例
- 校验半角英数字和全角文字的正则表达式
- IFE糯米学院-checkbox和radio样式的美化实现
- js校验自己定义的特殊字符和中文、字母、数字除外的校验
- 【OpenCV】基于OpenCV的双目视觉测试
- centos7+redmine+gitolite+nginx 安装步骤
- Android 实现倒计时
- Spring中基于Java的配置@Configuration和@Bean用法
- 类与类之间的关系
- 仿美团和糯米商家验证版的一个数字校验键盘
- ecshop模板切换到smarty3.1.30
- jQuery中使用技巧
- pandas使用get_dummies进行one-hot编码
- JAVASE之IO流
- Android Studio中SVN安装与使用
- c++基础知识积累
- HDFS的运行原理
- awk 命令的使用