Intent and Bundle Relation

前端 未结 4 725
被撕碎了的回忆
被撕碎了的回忆 2020-12-10 04:32

While using Intent object we can put different types of data directly using its putExtra(). We can also put these extra data into a Bundle object a

4条回答
  •  难免孤独
    2020-12-10 05:08

    Let's assume you need to pass a Bundle from one Activity to another. That's why Intent allows you to add Bundles as extra fields.

    EDIT: For example if you want to pass a row from a database along with some other data it's very convenient to put this row into a Bundle and add this Bundle to the Intent as a extra field.

提交回复
热议问题