Intent and Bundle Relation

前端 未结 4 714
被撕碎了的回忆
被撕碎了的回忆 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:11

    As you can see, the Intent internally stores it in a Bundle.

    public Intent putExtra(String name, String value) {
        if (mExtras == null) {
            mExtras = new Bundle();
        }
        mExtras.putString(name, value);
        return this;
    }
    

提交回复
热议问题