在我的Android应用我有不同的EditText用户可以在其中输入信息。但是我需要强制用户在大写字母写... 你知道一个函数来做到这一点?
in my Android application I have different EditText where the user can enter information. But I need to force user to write in uppercase letters... Do you know a function to do that ?
谢谢!
安卓实际上已经建立了一个 -IN输入过滤器只为这!
Android actually has a built-in InputFilter just for this!
edittext.setFilters(new InputFilter[] {new InputFilter.AllCaps()});