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出現(xiàn)
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
聯(lián)系、聯(lián)想、結合
with this SimpleAdapter is running. - data a List of Maps. Each entry in the List corresponds to one row in the list.
未完待續(xù)...