mgu*_*lan 0 android input filter
我想知道如何在输入框上设置多个过滤器?
这就是我正在尝试的:
input.setFilters( new InputFilter[] {new InputFilter.LengthFilter(20)});
input.setFilters( new InputFilter[] {new InputFilter.AllCaps()});
Run Code Online (Sandbox Code Playgroud)
但是,只应用了最后一个过滤器...我在谷歌上找不到任何东西.
尝试以下方法: -
input.setFilters( new InputFilter[] {new InputFilter.LengthFilter(20), new InputFilter.AllCaps()});
要么
InputFilter[] filters = {new InputFilter.LengthFilter(20), new InputFilter.AllCaps()};
input.setFilters(filters);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1681 次 |
| 最近记录: |