Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.amiel1.multiplieactivities;
- import android.app.Activity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.view.View;
- import android.widget.EditText;
- import android.widget.TextView;
- /**
- * Created by Amiel on 01/02/2015.
- */
- public class SecondScreen extends Activity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.second_layout);
- Intent activityThatCalled = getIntent();
- String previous = activityThatCalled.getExtras().getString("callingActivity");
- TextView callingActivitys = (TextView) findViewById(R.id.namewastv);
- callingActivitys.append(previous);
- }
- public void onSendUserName(View view) {
- EditText userNameET = (EditText) findViewById(R.id.edit_text_name);
- String nameS = String.valueOf(userNameET.getText());
- Intent goBack = new Intent();
- goBack.putExtra("getName", nameS);
- setResult(RESULT_OK, goBack);
- finish();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement