Answers for "android studio pass value to another activity"

0

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 studio pass value to another activity

//Get the bundle
Bundle bundle = getIntent().getExtras();

//Extract the data…
String stuff = bundle.getString(“stuff”);
Posted by: Guest on August-17-2021

Code answers related to "android studio pass value to another activity"

Browse Popular Code Answers by Language