Answers for "how to pass object from one activity to another in android example"

1

android studio pass value to another activity

Intent i = new Intent(this, ActivityTwo.class);
AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.autocomplete);
String getrec=textView.getText().toString();

//Create the bundle
Bundle bundle = new Bundle();

//Add your data to bundle
bundle.putString(“stuff”, getrec);

//Add the bundle to the intent
i.putExtras(bundle);

//Fire that second activity
startActivity(i);
Posted by: Guest on August-17-2021
0

android pass object to activity

Customer customerObjInToClass = getIntent().getExtras().getParcelable("myCustomerObj");
Posted by: Guest on March-19-2020
0

android pass object to activity

Intent intent = new Intent(fromClass.this,toClass.class).putExtra("myCustomerObj",customerObj);
Posted by: Guest on March-19-2020

Code answers related to "how to pass object from one activity to another in android example"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language