current position:Home>Design two pages. The first page contains two text input boxes and a button. The text input box can input user name and password respectively. Click the button to transfer the values of the two text boxes to the second page. The second page contains two t

Design two pages. The first page contains two text input boxes and a button. The text input box can input user name and password respectively. Click the button to transfer the values of the two text boxes to the second page. The second page contains two t

2022-01-27 04:28:06 CSDN Q & A

use Android studio How to write it out , Another teacher , On the first day, I sent a question , Just can't learn , It's cracked




Refer to the answer 1:

Use intent Jump to pass value Suggest Baidu This kind of information is a pile of Just pull it out and use it




Refer to the answer 2:



Refer to the answer 3:

// Pass parameters
Intent intent = new Intent(this, AnnotationActivity.class);
intent.putExtra("name", "tony");
intent.putExtra("age", 30);
.this.startActivity(intent);

receive data
Intent intent = getIntent();
String name = intent.getStringExtra("name");
int age = intent.getIntExtra("age", 0);




Refer to the answer 4:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201270428023177.html

Random recommended