中文api<>

SimpleAdapter

public SimpleAdapter (Context context, List<? extends Map<String, ?>> data, int resource, String[] from, int[] to)

参数:

  • context  SimpleAdapter关联的View的运行环境
  • data    一个Map组成的List。在列表中的每个条目对应列表中的一行,每一个map中应该包含所有在from参数中指定的键
  • resource    一个定义列表项的布局文件的资源ID。布局文件将至少应包含那些在to中定义了的ID
  • from          一个将被添加到Map映射上的键名
  • to     将绑定数据的视图的ID,跟from参数对应,这些应该全是TextView

 

public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException

  如:

    <people android: id="1">lily</people>

参数:

  • LocalName  不带前缀的标签名 people
  • qName 带前缀的标签名   
  •  Attribute 获得属性值 id

 

posted @ 2014-08-19 18:59  邬澜霹雳  阅读(150)  评论(0编辑  收藏  举报