Problem with Dinamic ListView

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Problem with Dinamic ListView

Postby shirkkan » Sun Nov 07, 2010 6:34 pm

hi!!

I have in my xml a TableLayout with no rows, where I create rows dinamically as the user press a button.
It works fine, but the problem is that when rows reach the bottom of the screen, the next ones can't be seen, and I would like to put a Scroll so it would be possible to go up or go down the table to see all rows.

I've seen that a Scroll must contain a static number of elements, so I suppose I will need a ListView, but every type of implementation I try, it gives me an error.

So maybe you know how to have a scroll bar which dinamically contains more and more elements (in my case: rows).

Thanks!!
shirkkan
Developer
Developer
 
Posts: 25
Joined: Fri Nov 05, 2010 10:14 pm

Top

Re: Problem with Dinamic ListView

Postby ozmank » Tue Nov 30, 2010 8:27 am

All you need is a list view to do this.
ozmank
Freshman
Freshman
 
Posts: 3
Joined: Tue Nov 30, 2010 8:21 am

Re: Problem with Dinamic ListView

Postby shirkkan » Tue Nov 30, 2010 4:28 pm

But when I enter in the OnClick method, how do I load the xml into that row? which function should I use? I haven't found any.
shirkkan
Developer
Developer
 
Posts: 25
Joined: Fri Nov 05, 2010 10:14 pm

Re: Problem with Dinamic ListView

Postby blundell » Mon Dec 06, 2010 12:51 pm

Can you not just wrap your tableview in a scrollview?

What does your XML look like?
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 6 guests