Agreed, don't use the tablelayout, the linearlayout would work much better. On Feb 27, 2011 5:00 PM, "Jonathan Foley" <[email protected]> wrote: > > I agree with TreKing. I have never found a situation where I actually > need a TableLayout. They are too restrictive IMO and don't afford > much control over layout. One gets better control using RelativeLayout > or LinearLayout. For the type of weighted proportional layout you're > after, you'll want to use a LinearLayout. It's the only ViewGroup that > observes the layout_weight property. I'd use something like this > skeleton below. This will give you proportional heights of the two > rows and the ImageSwitchers will be laid out proportionally to take up > half the width of each row. This is off the cuff so do check for > sanity! > > <LinearLayout android:orientation="vertical" > android:layout_height="fill_parent" > android:layout_width="fill_parent"> > <LinearLayout android:layout_weight="1" > android:orientation="horizontal" android:layout_height="fill_parent" > android:layout_width="fill_parent"> > > <ImageSwitcher android:layout_height="fill_parent" > android:layout_weight="1" android:layout_width="fill_parent" /> > <ImageSwitcher android:layout_height="fill_parent" > android:layout_weight="1" android:layout_width="fill_parent" /> > </LinearLayout> > > <LinearLayout android:layout_weight="1" > android:orientation="horizontal" android:layout_height="fill_parent" > android:layout_width="fill_parent"> > <ImageSwitcher android:layout_height="fill_parent" > android:layout_weight="1" android:layout_width="fill_parent" /> > <ImageSwitcher android:layout_height="fill_parent" > android:layout_weight="1" android:layout_width="fill_parent" /> > </LinearLayout> > > </LinearLayout> > > > Jonathan > > > > > > > On Feb 27, 2:01 pm, TreKing <[email protected]> wrote: >> On Sun, Feb 27, 2011 at 3:48 PM, rael_yoni <[email protected]> wrote: >> > That was just another test... that didn't work. >> >> Well, do you really a TableLayout in this case? If you just have two rows, >> consider a LinearLayout which might work better. >> >> --------------------------------------------------------------------------- ---------------------- >> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago >> transit tracking app for Android-powered devices > > -- > 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
-- 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

