0

[How to pass data from one activity to another activity, what is the java code for this?][1]

<[1]: https://i.stack.imgur.com/4dl3r.png>

1 Answers1

0

save result in string and then create a method with one parameter to make dialog, like this and in button's onclick call that method.

public void (String res) {

AlertDialog.Builder dialog = new AlertDialog.Builder(MainActivity.this);
dialog.setTitle("test");
dialog.setMessage(res);

dialog.show();

}

Hesam Rasoulian
  • 1,356
  • 3
  • 12
  • 18