EditText限制输入长度和限定输入数字 EditText限制输入 android:digits="0123456789" android:maxLength="6" 但是可以输入一个点 "." str = ".123099" str.replace(".","");