Adapter Methods in Android?
i have go through the three methods in Adapters classes.
- getView()
- newView()
- bindView()
what are the difference between those methods? please share some tutorial, sample code or logics to understand this. Thanks. i have to create a listvie开发者_StackOverflow社区w with the progressive icons. which adapter you suggest me to do that?
getView()
returns the View
for a row. For a custom subclass of ArrayAdapter
, you typically override getView()
.
For a custom subclass of CursorAdapter
, you could override getView()
, but usually you override newView()
and bindView()
instead. newView()
creates the row View and bindView()
attaches the data for the specific position in the Cursor
's data set to that row.
These concepts are covered (with more emphasis on getView()
) in this excerpt from one of my books.
精彩评论