Passing Values from one activity to other activity in android
Use Bundle to accomplish this task
Use Bundle to accomplish this task
1st activity
final Bundle bundle = new Bundle();
bundle.putString("data", name);
i.putExtras(bundle);
//before starting 2nd activity
i.e startActivity(i);
2nd Activity
final Bundle bundle = new Bundle();
Bundle bundle = getIntent().getExtras();
String name
= bundle.getString("data");
No comments:
Post a Comment