Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您好,我正在解析一些 json 上的 android 并且我已经能够将 json 解析的数据放入一个列表视图中。但是在我的列表视图中,我也有一些图标,我想根据解析的数据设置状态(我有一些定义它们的状态的键,1 表示启用,0 表示禁用)。我似乎无法将其放在 HashMap 上,有人有任何提示/信息吗?
谢谢
HashMap<String,Boolean> map = new HashMap<String,Boolean>(); Collection c = map.values(); Iterator itr = c.iterator(); while(itr.hasNext()) System.out.println(itr.next()); }