【发布时间】:2011-10-22 20:43:58
【问题描述】:
我有 2 个元素标签,我想将它们添加到列表视图的 2 个编辑文本中。 我该怎么做?
String[] from = new String[] {"col_1", "col_2"};
int[] to = new int[] { R.id.editText1, R.id.editText2 };
List<HashMap<String, String>> fillMaps = new ArrayList<HashMap<String, String>>();
HashMap<String, String> map;
Document doc = Jsoup.parse(test);
Elements tdsFromSecondColumn = doc.select("td:eq(0)");
Elements tdsFromSecondColumn1 = doc.select("td:eq(1)");
for (Element tdFromSecondColumn: tdsFromSecondColumn) {
map = new HashMap<String, String>();
map.put("col_1", tdFromSecondColumn.text());
map.put("col_2", ?????);
fillMaps.add(map);
SimpleAdapter adapter = new SimpleAdapter(AndroidLogin.this, fillMaps, R.layout.test, from, to);
kp.setAdapter(adapter);
【问题讨论】:
标签: android android-listview jsoup