add data from one file to another in android studio

Solutions on MaxInterview for add data from one file to another in android studio by the best coders in the world

showing results for - "add data from one file to another in android studio"
Till
03 Jan 2018
1String message = "Hello";
2
3Name.setOnClickListener(new View.OnClickListener() {
4            @Override
5            public void onClick(View view) {
6                Intent intent = new Intent(activity2.this, activity1.class);
7				intent.putExtra("message", message);
8				startActivity(intent);
9            }
10        });
11
12// In activity1
13
14Bundle bundle = getIntent().getExtras();
15String message = bundle.getString("message");
16
17TextView txtView = (TextView) findViewById(R.id.your_resource_textview);    
18txtView.setText(message);