I Have a dialoge box in my code, that when i click a button in Main activity it pops up, this dilog box is like this :

I want to put String data from “Enter NUmber” and “Enter Name” Test box to a viewText in Main Activity, I don’t know how to transfer this value.
my part of code which pops up dialog box is this :
btnstart.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// Auto-generated method stub
final Dialog dialog = new Dialog(Main0.this);
dialog.setContentView(R.layout.number);
dialog.setTitle("Save New Number");
dialog.setCancelable(true);
dialog.show();
}
});
This should work:
(Add it in your
onClickmethod)