Hi
I have the following layout
<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical">

<TextView
        android:id="@+android:id/category"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Category"
    android:background="@drawable/gradient"
        />

<TextView
        android:id="@+android:id/categoryLine"
        android:layout_width="fill_parent"
        android:layout_height="1px"
        android:background="@drawable/line2"
    android:layout_below="@+android:id/category"/>

<TextView
        android:id="@+android:id/error"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@+android:id/categoryLine"
    android:textSize="20px"

        />

<ScrollView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@+android:id/categoryLine"
    android:layout_marginBottom="50dip"
    >

<TableLayout
    android:id="@+android:id/listplaces"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@+android:id/welcome"
    android:textColor="#000000"
    android:orientation="vertical"
    >

</TableLayout>
</ScrollView>

        <RelativeLayout
                android:id="@+id/DiffViewCtrl"
                android:layout_marginTop="-50dip"
                android:gravity="bottom"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:visibility="gone"
                >
                <TableLayout
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_alignParentBottom ="true"
                    android:stretchColumns="*"
                        >
                        <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:background="#333333"
                                >
                                <Button
                                    android:text="List"
                                    android:enabled="false"
                                    android:layout_width="fill_parent"
                                    />

                                <Button
                                    android:text="Map"
                                    android:layout_width="fill_parent"
                                    />
                   </TableRow>
                </TableLayout>
        </RelativeLayout>
</RelativeLayout>

As you can see I have 2 table layout one is empty and the other one
has 2 button.
The empty table is filled up with rows when the app runs. I have set
onclicklistener and ontouchlistener for each of this row.

My problem is when I invoke any of the the above 2 listeners the
buttons(in the other table) they shrinks to the left side and stays
like that.

How can I rectify this problem. I want then to always occupy the
screen size equally.

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