You may want to consider the AddHeaderView and AddFooterView methods
of the list view.  The link below describes how to implement these.

http://groups.google.com/group/android-developers/browse_thread/thread/9f11fe55e35d0e9e/997e3a06ec25d745?lnk=gst&q=addHeaderView

On Jul 11, 5:58 pm, Breezy <mbre...@gmail.com> wrote:
> So I have the basics down...  I can create a UI with the XML, I can
> show it and change the screen to another UI (another XML file) but how
> do I add to the UI?
>
> Hmmm, hard to explain...
>
> Say I have a header (just 2 textviews) that will remain at the top and
> below that is a search box and button (main.xml).  The user searches
> and I have it display the search UI (search.xml).  This UI will have
> the same header (2 textviews) and below it will have several textviews
> each one containing a search result...  Kinda like if you search for
> an app in the market.  There's no way of telling how many results
> would be returned so I figured I would have to create each textview on
> the fly within the .java file.  I'm not sure how to do this.  Most
> likely would require a loop of some sort, but whats the syntax to
> create a new textview and display it right below the one above it?
> I'm working with linear here so I would assume just creating a new
> textview it will by default go to the next one down which is what I
> want.
>
> Any help?  I searched a lot but I'm not sure what it's called that I'm
> looking for exactly.
>
> Also, say I have 30 results...  How do I get those to scroll but leave
> the 2 textview header in place?  Would I create a ScrollView and put
> the new TextViews in that?
>
> I'm probably way off here, but any correcting is fine.
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to