开发者

Extending BaseAdapter, passing variables

开发者 https://www.devze.com 2023-01-28 11:08 出处:网络
I\'m not understanding how you pass variables to these adapter classes.开发者_如何学JAVAMost of the examples I\'ve seen, you pass a context (Activity, usually).How exactly do you pass the variables, t

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

精彩评论

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