Preface
This chapter content is android. widget. SimpleAdapter. ViewBinder, version for Android 2.3 r1, translated from "de rod", welcome to visit his blog: http://sparkrico.javaeye.com, thanks again "de rod "! I look forward to your participation in Android Chinese API translation, contact me over140@gmail.com.
Statement
You are welcome to repost, but please keep the original source of the article :)
Blog Garden: http://www.cnblogs.com/
Android Chinese translation group: http://code.taobao.org/project/view/404/
Body
I. Structure
Public static interface SimpleAdapter. ViewBinder
Android. widget. SimpleAdapter. ViewBinder
Ii. Overview
The external data (external clients) of SimpleAdapter can be used to bind the value to the view. You should use this class to bind the value to those views that cannot be directly supported by SimpleAdapter, or change the view that supports the binding method through SimpleAdapter.
(Note: If SimpleAdapter sets ViewBinder, the binding rule of Viewbinder is used. Otherwise, the default binding rule of SimpleAdapter is used)
Iii. Public Methods
Public abstract booleanSetViewValue (View view, Object data, String textRepresentation)
Bind the specified data to the specified view. When ViewBinder is called to bind data, this method must return true. If this method returns false, SimpleAdapter tries to bind data through its internal default method.
Parameters
View of the data to be bound
Data to be bound to the view
TextRepresentation: A security string that indicates the supported data. The result is data. toString () or an empty string, but not null.
Return Value
If the data is bound to the view, true is returned. Otherwise, false is returned.
Iv. Supplement
Article Selection
SimpleAdapter. ViewBinder
Adapter application Summary
V. related chapters
Android Chinese API (46) -- SimpleAdapter