forked from hussien89aa/AndroidTutorialForBeginners
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintent.java
More file actions
13 lines (10 loc) · 426 Bytes
/
intent.java
File metadata and controls
13 lines (10 loc) · 426 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
//intent send
Intent intent=new Intent(this,Main2Activity.class);
intent.putExtra("name","hussein alruabye");
intent.putExtra("age","26");
startActivity(intent);
// intent reciver
Bundle b= getIntent().getExtras();
TextView textView2=(TextView)findViewById(R.id.textView2);
textView2.setText("Name:"+ b.getString("name")+
"age:"+ b.getString("age"));