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.
精彩评论