Passing a Bundle on startActivity()?

后端 未结 6 1350
攒了一身酷
攒了一身酷 2020-11-22 03:28

What\'s the correct way to pass a bundle to the activity that is being launched from the current one? Shared properties?

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-22 04:28

    You can use the Bundle from the Intent:

    Bundle extras = myIntent.getExtras();
    extras.put*(info);
    

    Or an entire bundle:

    myIntent.putExtras(myBundle);
    

    Is this what you're looking for?

提交回复
热议问题