Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我曾经android:inputType = "phone"将电话号码作为输入,但如果我给出六位数字,它会强制关闭并触发错误
android:inputType = "phone"
“NumberFormat 异常无效的 int 值”
实际上我正在尝试通过以下方式将该值转换为整数:
phone = Integer.parseInt(phoneNumber.getText().toString());
电话号码由大约 10 位数字组成,如何将其转换为 int。只需将其转换为长。
你应该知道java中整数的范围
尝试使用长...