I have activity_main and second_activity. I have a button on activity_main that opens second_activity in a dialog. How can I create three textEdit's with a button in second_activity and display the result when user submits on main_activity? This Sending data back to the Main Activity in android kind of solved my question. It shows the first field's data on SecondActivity in all 3 textViews on MainActivity.
My current sample app code on SecondActivity
@Override
public void onClick(View view) {
EditText editText = (EditText)findViewById
(R.id.etUsername);
String stringToPassBack = editText.getText().toString();
// put the string to pass back into an Intent and close
this activity
Intent intent = new Intent();
intent.putExtra("@string/send", stringToPassBack);
setResult(RESULT_OK, intent);
finish();
}
How do I add the other 2 fields; etPassword and etEmail