Answers for "add data from one file to another in android studio"

0

add data from one file to another in android studio

String message = "Hello";

Name.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(activity2.this, activity1.class);
				intent.putExtra("message", message);
				startActivity(intent);
            }
        });

// In activity1

Bundle bundle = getIntent().getExtras();
String message = bundle.getString("message");

TextView txtView = (TextView) findViewById(R.id.your_resource_textview);    
txtView.setText(message);
Posted by: Guest on January-12-2021

Code answers related to "add data from one file to another in android studio"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language