CHeck the layout orientation property and use it alongwith the weight
property in a LinearLayout

On Sep 6, 1:52 pm, Droid <[email protected]> wrote:
> With LinearLayout I believe I cannot two get buttons side by side?
>
> On Sep 6, 7:35 pm, OldSkoolMark <[email protected]> wrote:
>
>
>
> > Consider LinearLayout. You can use layout_weight to achieve
> > proportional sizing.
>
> > On Sep 6, 12:26 am, Droid <[email protected]> wrote:
>
> > > I have 2 buttons side by side in RelativeLayout (170dip each) but in
> > > landscape view, they are too narrow - I want to increase their widths
> > > automatically for landscape.
>
> > > I need a 'fill_parent' for two buttons at once kinda thing.
>
> > > Can anyone point me in the right direction.
>
> > > Here is my layout:
>
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
> > > android"
> > >     android:layout_width="fill_parent"
> > >     android:background="#000000"
> > >     android:layout_height="fill_parent">
>
> > > <Button android:text="@string/get_answer"
> > > android:id="@+id/Button02"
> > > android:layout_centerHorizontal="true"
> > > android:layout_width="170dip"
> > > android:layout_alignParentLeft="true"
> > > android:layout_height="wrap_content"></Button>
>
> > > <Button android:text="@string/speak_answer"
> > > android:id="@+id/Button03"
> > > android:layout_centerHorizontal="true"
> > > android:layout_width="170dip"
> > > android:layout_toRightOf="@id/Button02"
> > > android:layout_alignTop="@id/Button02"
> > > android:layout_height="wrap_content"></Button>
>
> > > <TextView android:text=" " android:id="@+id/TextView01"
> > > android:layout_below="@+id/Button03"    android:textColor="#ffffff"
> > > android:textStyle="bold" android:textSize="1dip"
> > > android:layout_width="wrap_content" android:layout_height="1dip"></
> > > TextView>
> > > <TextView android:text=" " android:id="@+id/TextView02"
> > > android:layout_below="@+id/TextView01" android:textColor="#000000"
> > > android:textStyle="bold" android:textSize="20dip"
> > > android:layout_width="wrap_content"
> > > android:layout_height="wrap_content"></TextView>
> > > <TextView android:text=" " android:id="@+id/TextView03"
> > > android:layout_below="@+id/TextView02"  android:textColor="#ff00ff"
> > > android:textStyle="bold" android:textSize="20dip"
> > > android:layout_width="wrap_content"
> > > android:layout_height="wrap_content"></TextView>
> > > <TextView android:text=" " android:id="@+id/TextView04"
> > > android:layout_below="@+id/TextView03"  android:textColor="#0000ff"
> > > android:textStyle="bold" android:textSize="20dip"
> > > android:layout_width="wrap_content"
> > > android:layout_height="wrap_content"></TextView>
> > > <TextView android:text=" " android:id="@+id/TextView05"
> > > android:layout_below="@+id/TextView04"
> > > android:layout_width="wrap_content"
> > > android:layout_height="wrap_content"></TextView>
> > > <TextView android:text=" " android:id="@+id/TextView06"
> > > android:layout_below="@+id/TextView05"
> > > android:layout_width="wrap_content"
> > > android:layout_height="wrap_content"></TextView>
> > > <TextView android:text=" " android:id="@+id/TextView07"
> > > android:layout_below="@+id/TextView06"
> > > android:layout_width="wrap_content"
> > > android:layout_height="wrap_content"></TextView>
> > > <TextView android:text=" "  android:id="@+id/TextView08"
> > > android:layout_below="@+id/TextView07"
> > > android:layout_width="wrap_content"
> > > android:layout_height="wrap_content"></TextView>
>
> > > </RelativeLayout>

-- 
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

Reply via email to