Problem with ListView expanding and LinearLayout

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Problem with ListView expanding and LinearLayout

Postby StefanL » Mon Jan 05, 2009 8:25 pm

Hallo there,

I have a problem with ListView's, LinearLayout and a Download popping in.

Here is what I do currently:
I'm developing a Podcast Client. Atm it has 2 ContentViews. One for Podcast Listing and another for Show Listing. Once I start a download I add Views, Inflated from Xml, for each Download to the LinearLayout so I can watch its progress. If the ContentView is changed during a download I remove the DownloadViews from the old Layout and add them to the LinearLayout in the new Content View. That works fine. But I have 2 issues. First setting Gravity doesn't really matter. (Look at the attached picture.) Second: If the ListView fills everything up to the bottom the Download Views aren't visible at all. I guess they are added somewhere off screen. Once a Downloadthread is done it removes itself from the LinearLayout.

So my Question is: Is there a better way to realize displaying Views dynamicly at the Bottom?

I appretiate any help. Thanks in advance.

apodder.png (15.11 KiB) Viewed 351 times
Once Poster
Once Poster
Posts: 1
Joined: Fri Jan 02, 2009 10:07 am


Postby metter » Wed Jan 07, 2009 11:57 am

Hello Stefan

I was having trouble with a similar issue.

Have a look at the RelativeLayout, it let's you position children according to the position of their parents or siblings.

RelativeLayout.LayoutParams bottomLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT);

Hope that helps. Cheers.
Junior Developer
Junior Developer
Posts: 16
Joined: Tue Jan 06, 2009 2:00 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests