Layout for streaching mult. views equally to parents width

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

Layout for streaching mult. views equally to parents width

Postby VIDEN » Thu Jul 02, 2009 11:09 am

Hey,

I am building a custom TabWidget like view because the TabWidgent cant be adjusted the way I want it.
I have 4 tabs at the bottom of the screen.
If I use a hotizontal oriented LinearLayout and do wrap_contet on the width, the tabs don't fill out the whole screen. If I do fill_parent on all the buttons they get drawn over each other. What I want is, that the Buttons all get equally stretched over the width of their parent. Is there some way to achieve this with an existing Layout?

Thx for your help

Greets

David
VIDEN
Developer
Developer
 
Posts: 32
Joined: Tue May 12, 2009 9:39 am
Location: Germany

Top

Postby nmc » Thu Jul 02, 2009 6:36 pm

Maybe using TableLayout with stretchColumns 0,1,2,3 gives you the desired result.
nmc
Senior Developer
Senior Developer
 
Posts: 154
Joined: Thu Nov 27, 2008 8:30 pm
Location: Germany

Postby VIDEN » Fri Jul 03, 2009 7:34 am

Hmm good idea.. I had thought of a TableLayout bur I didn't come to this idea...
I'll give it a try.

Greets

EDIT:

Hey, it actually worked perfectly!
Thx alot!

Greets
VIDEN
Developer
Developer
 
Posts: 32
Joined: Tue May 12, 2009 9:39 am
Location: Germany

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests