美文网首页
SimpleAdapter

SimpleAdapter

作者: JOJO大魔王 | 来源:发表于2017-08-04 10:38 被阅读0次

    public classSimpleAdapter
    extends BaseAdapter implements Filterable
    java.lang.Object
    android.widget.BaseAdapter
    ↳android.widget.SimpleAdapter


    Class Overview概观,总的看法

    An easy adapter to map static data to views defined in an XML file.You can specify the data backing the list as an ArrayList of Maps.Each entry入口 in the ArrayList corresponds to相对应 one row in the list. The Maps contain the data for each row.You also specify an XML file that defines the views used to display the row , and a mapping from keys in the Map to specific特定的、明确的 views . Binding data to views occurs出现 in two phases阶段. First , if a SimpleAdapter.ViewBinder is available [əˈveləbəl], setViewValue(android.view.View, Object, String) is invokedinvoke引用. If the returned value is true, binding har occurred. If the returned is false, the following views are then tried in order有次序.

    • A View that implements Checkable (e.g.CheckBox). The expected bind value is boolean.
    • TextView. The expected bind value is a string and setViewText(TextView, String) is invoked.
    • ImageView.The expected bind value is a resource id or a string and setViewImage(ImageView, int) or setViewImage(ImageView, String) is invoked.

    Summary 摘要,概要; 总结,一览

    Nested嵌套的 classes
    interface SimpleAdapter.ViewBinder This class can be used by external clients of SimpleAdapter to bind values to views.
    public constructors
    SimpleAdapter(Context context, List<? extends Map<String, ?>> data, int resource, String[] from, int[] to)

    • context The context where the view associated联系、联想、结合 with this SimpleAdapter is running.
    • data a List of Maps. Each entry in the List corresponds to one row in the list.

    未完待续...

    相关文章

      网友评论

          本文标题:SimpleAdapter

          本文链接:https://www.haomeiwen.com/subject/dewulxtx.html