Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 0.73 KB | None | 0 0
  1. @Override
  2.     protected void onCreate(Bundle savedInstanceState) {
  3.         super.onCreate(savedInstanceState);
  4.         setContentView(R.layout.activity_second);
  5.         mReply = (EditText) findViewById(R.id.editText_second);
  6.  
  7.         Intent intent = getIntent();
  8.         String message =
  9.                 intent.getStringExtra(MainActivity.EXTRA_MESSEGE);
  10.  
  11.         TextView textView = (TextView) findViewById(R.id.text_message);
  12.         textView.setText(message);
  13.     }
  14.     public void returnReply(View view) {
  15.         String reply = mReply.getText().toString();
  16.         Intent replyIntent = new Intent();
  17.         replyIntent.putExtra(EXTRA_REPLY, reply);
  18.         setResult(RESULT_OK, replyIntent);
  19.         finish();
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement