Skip to content

Commit

Permalink
更新Readme (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
benli.shi authored Jul 6, 2016
1 parent 4f45a9a commit 2ffff75
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@

4、建议使用源码的Module的方式引入,方便修改样式;

### 使用方式

1、导入Module;

2、在对应的view初始化的时候加入以下代码:

- 普通的Activity或者Fragment中使用
```
keyboardHelper = new KeyboardHelper(this)
.addEditText((EditText) findViewById(R.id.edittext1))
.addEditText((EditText) findViewById(R.id.edittext2))
.setShouldRandom(true);
```


- Dialog中使用(当然这里是返回Dialog直接findView的方式,但是你只要通过addEditText设置都行)
```
Window window = alertDialog.getWindow();
final EditText edtWithdrawCashDynamicCode = (EditText) window.findViewById(R.id.edt_withdraw_cash_dynamic_code);
keyboardHelper.addEditText(edtWithdrawCashDynamicCode);
```

###普通EditText
<img src="png/device-2016-05-23-145650.png" width="360" height = "640"/>

Expand Down

0 comments on commit 2ffff75

Please sign in to comment.