0
我想檢查填充的文本字段是否大於其他填充的文本字段。 所以像:如何檢查「textfield1」<「textfield2」
if (textfield1.getText().toString().equals(""))
Toast.makeText(getActivity(), "textfield one is empty, please fill in a number", Toast.LENGTH_SHORT).show();
我想是這樣的:
if (textfield1.getText().toString().less than textfield2.getText().toString())
Toast.makeText(getActivity(), "textfield one is less than textfield two, this is not allowed", Toast.LENGTH_SHORT).show();
我找不到我怎麼
textfield1.getText ().toString()。compareTo(textfield2.getText()。toString())<0 – Massimo