I 开发者_开发知识库have a view in which there is a text box where user enters data, when clicks on submit, I want to store the input and display in another box.
final EditText edittext = (EditText) findViewById(R.id.edittext);
mText = (TextView) findViewById(R.id.timepicker_input);
How can I do it, please help
final EditText edittext = (EditText) findViewById(R.id.edittext);
TextView mText = (TextView) findViewById(R.id.timepicker_input);
mText.setText(edittext.getText().toString());
String info = edittext.getText().toString();
mText.setText(info);
final EditText edittext = (EditText) findViewById(R.id.edittext);
TextView mText = (TextView) findViewById(R.id.timepicker_input);
String storedData = edittext.getText().toString();
mText.setText(storedData);
Here, you can use the string storedData in another activity or to setText for another editText (textbox)
精彩评论