开发者

Extending BaseAdapter, passing variables

I'm not understanding how you pass variables to these adapter classes.开发者_如何学JAVA Most of the examples I've seen, you pass a context (Activity, usually). How exactly do you pass the variables, the data that you want your view to display?


BaseAdapter is used to connect a data source to view. Each item in the row needs to be connected to the property of the object. Take a look @ this blog post - http://dup2.in/2011/08/08/android-custom-listview-baseadapter-tutorial/

The simple listview example is having only one textview in each row which corresponds to a single String element in arraylist.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜