我已经尝试过了:
EditText edText1 = (EditText) findViewById(R.id.editText1);
String str = edText1.getText().toString();我只能得到数字而不能得到字符。如何获取EditText文本,以便将其放在字符串中并对其进行操作?
发布于 2013-07-18 11:52:39
// first set the Input type of the EditText in the Java class like this;
EditText edText1 = (EditText) findViewById(R.id.editText1);
edText1.setInputType(InputType.TYPE_CLASS_TEXT);
String str = edText1.getText().toString();https://stackoverflow.com/questions/17713473
复制相似问题