Skip to content

安卓自定义软键盘,支持安卓4.4及以上

Notifications You must be signed in to change notification settings

luhaikong/SafeKeyBoard

Repository files navigation

SafeKeyBoard

安卓自定义软键盘,支持安卓4.0及以上

使用方法:

1、在需要使用安全软键盘的activity中声明:

private SafeKeyboard safeKeyboard;

2、在xml布局文件底部新增“控件容器”[keyboardViewPlace]:

cmd-markdown-logo

3、绑定需要使用安全软键盘的控件:

mPasswordView = (EditText) findViewById(R.id.password);

// 自定义软键盘使用开始

LinearLayout keyboardContainer = (LinearLayout) findViewById(R.id.keyboardViewPlace);
View view = LayoutInflater.from(this).inflate(R.layout.layout_keyboard_containor, null);
safeKeyboard = new SafeKeyboard(getApplicationContext(), keyboardContainer, mPasswordView,
R.layout.layout_keyboard_containor, view.findViewById(R.id.safeKeyboardLetter).getId());
safeKeyboard.setDelDrawable(this.getResources().getDrawable(R.drawable.icon_del));
safeKeyboard.setLowDrawable(this.getResources().getDrawable(R.drawable.icon_capital_default));
safeKeyboard.setUpDrawable(this.getResources().getDrawable(R.drawable.icon_capital_selected));

// 自定义软键盘使用结束

4、备注: 如果要使用点击后无预览界面的版本请使用1.0.3版本【compile 'com.lhk:safekeyboard:1.0.3'】

About

安卓自定义软键盘,支持安卓4.4及以上

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages