开发者

Adapter Methods in Android?

开发者 https://www.devze.com 2022-12-28 14:23 出处:网络
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 underst

i have go through the three methods in Adapters classes.

  1. getView()
  2. newView()
  3. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号