Android HashMap in Bundle?

后端 未结 7 2393
眼角桃花
眼角桃花 2020-12-02 11:57

The android.os.Message uses a Bundle to send with it\'s sendMessage-method. Therefore, is it possible to put a HashMap inside a

7条回答
  •  执念已碎
    2020-12-02 12:18

    In Kotlin:

    hashMap = savedInstanceState?.getSerializable(ARG_HASH_MAP) as? HashMap
    
    putSerializable(ARG_HASH_MAP, hashMap)
    

提交回复
热议问题