Hello,

I'd like to show my users a list of items and when any one is selected, sort
of expand the view. Very similar to the the List example no 6 (List Adapter
Collapsed) in the SDK where if you click on the person you see the speech.
Now in my app, I allow only one expanded view, easy enough to do. Also, my
elements are not static and for ease of use, I extend ArrayAdapter. My
questions are as follows,

   1. In the getView there is a convertView parameter. I didn't see much
   documentation around it but given it's name and the source, I assume this is
   where the View object gets reused. In other words, if I don't do a setText
   here if the incoming parameter is non-null, I should see names/labels (of
   list items) getting recycled? I assume the framework has atmost X views
   alive where X could be less than the total count of items and more than a
   screenful. Am I correct or reading too much into this?
   2. Now, I have a TextView which I supply ArrayAdapter and then a
   TableLayout which is made visible on demand. The table can have upto N, say
   50, rows. Each row has 2 columns, an immutable name column and then the
   variable value column. Not every item will have N rows, and which of the N
   rows are present will vary as well. So, is the most efficient means of doing
   this,
      1. Have the view supplied to ArrayAdapter have the TableLayout with N
      rows, all with Visibility of Gone and then fill in the vaalues in getView
      and set Visibility appropriately
      2. View given to ArrayAdapter has the TextView and nothing else.
      Create one TableLayout object, N TableRow objects. Add/remove TableRow
      objects to the TableLayout singleton and add/remove the TableLayout
      singleton from the appropriate View in getView
      3. Something else altogether

Thanks a ton!

-- 
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

Reply via email to