I am trying to make a horizontally scrollable table in android. When I
enter data that exceeds the screen size the scroll bar doesn't appear.
I tried all sorts of stuff (with / without the LinearLayout as a child
of the HorizontalScrollView, all sorts of options for the controls
width). Nothing works. Help, please.

This is my config:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:id="@+id/RelativeLayout1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >



    <HorizontalScrollView
        android:id="@+id/horizontalScrollView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true" >

        <LinearLayout
            android:id="@+id/linearLayout2"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:orientation="horizontal" >

            <TableLayout
                android:id="@+id/tableLayout1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" >

                <TableRow
                    android:id="@+id/tableRow1"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" >

                    <TextView
                        android:id="@+id/TextView01"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:padding="3dp"
                        android:text="@string/passphrase" />

                    <Spinner
                        android:id="@+id/passphraseSpinner"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content" />
                </TableRow>

                <TableRow
                    android:id="@+id/tableRow2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" >

                    <TextView
                        android:id="@+id/textView1"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:padding="3dp"
                        android:text="@string/configuration" />

                    <Spinner
                        android:id="@+id/configurationSpinner"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content" />
                </TableRow>

                <TableRow
                    android:id="@+id/tableRow3"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" >

                    <TextView
                        android:id="@+id/textView3"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:padding="3dp"
                        android:text="@string/speaker" />


                    <EditText
                        android:id="@+id/editSpeaker"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:imeOptions="actionGo"
                        android:singleLine="true"
                        android:text="@string/defaultSpeaker" />

                </TableRow>
            </TableLayout>
        </LinearLayout>
    </HorizontalScrollView>

    <Button
        android:id="@+id/buttonCancel"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:onClick="onButtonCancelClick"
        android:text="@string/cancel" />

    <Button
        android:id="@+id/buttonOK"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/buttonCancel"
        android:layout_alignParentLeft="true"
        android:onClick="onButtonOKClick"
        android:text="@string/ok" />

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