craiget wrote: > I'm running into difficulties overriding an ArrayAdapter to be > displayed in a ListActivity. > > The ArrayAdapter is filled asynchronously. > > What I'm trying to do is add a special "sentinel" object that sits at > the beginning of the list to show the progress of the computation.
Try addHeaderView(). > My two guesses so far are: 1) When data is added asynchronously, > something goes wrong with redrawing the list view. 2) I'm not > correctly interpreting the "position" parameter of "getView()". > > Any suggestions on why this doesn't work? You haven't indicated how you are adding stuff to the ArrayAdapter, and your problem may lie in there. However, I would use addHeaderView() for this circumstance, or have your "sentinel" live outside the ListView. Remember: even though you are using a ListActivity, you can still specify your own layout. You need the magic android:id for the ListView (@android:id/list) in that case. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

