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 <treking...@gmail.com> wrote:
> On Sun, Feb 27, 2011 at 3:48 PM, rael_yoni <yoni.stoff...@gmail.com> 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 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