Reputation: 1894
What I need is to put a custom view inside listview's each row, those custom views won't be the same, they will dynamically will be created upon the data. I'm now creating my views but I'm not sure if I can put them inside the listrow. Can I do something like that, myListView.addViewAsRow()?
Thanks
Upvotes: 1
Views: 3332
Reputation: 7161
Well, if you can deduct from your data which rowview to use, you can create a custom adapter and inflate the right one for each row by overriding getView().
There are plenty of examples on overriding getView; this is a good starting point which can also be found on the android developers page (Google I/O 2010, The world of ListView): http://www.youtube.com/watch?v=wDBM6wVEO70
Upvotes: 1