开发者

How to put bundle in arraylist with hashmap vallue in android

开发者 https://www.devze.com 2023-02-18 03:55 出处:网络
Hi friends I am getting arraylist with hashmap like this ArrayList&l开发者_如何学编程t;HashMap<String, String>> mylist = new ArrayList<HashMap<String, String>>() I want to put i

Hi friends I am getting arraylist with hashmap like this ArrayList&l开发者_如何学编程t;HashMap<String, String>> mylist = new ArrayList<HashMap<String, String>>() I want to put it in bundle can anybody give example

Thanks


ArrayList is Serializable so you can put it into the bundle using putSerializable


  1. Get your browser on the Java SDK reference page for List
  2. Iterate over the array list using a for each loop
  3. Get your browser on the Java SDK reference page for HashMap and Bundle
  4. For each HashMap entry, put the entry key and the entry value in the bundle using the Bundle.putString method

You have everything you need here to learn how to do this basic stuff yourself easily.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号