HOW WILL YOU PASS DATA TO SUB-ACTIVITIES?

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
 1159  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    How will you pass data to sub-activities?

    We can use Bundles to pass data to sub-activities. There are like HashMaps that and take trivial data types. These Bundles transport information from one Activity to another

    Bundle b = new Bundle();
            b.putString("EMAIL", "abc@xyz.com");
            i.putExtras(b); // where i is the intent

            ...

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!