0

簡単な問題: 以下に示す XML レイアウトでは、いくつかのビューが GestureOverlayView にラップされています。以下に示すように、最初の行が 2 番目の行の上に転置されているかのように、最初の行が 2 番目の行とブレンドされています。

コードから GestureOverlayView を取り出して、他のすべてをそのままにしておくと、テーブルがきれいに見えます。

ジェスチャオーバーレイビューが存在すると、なぜ行がそのように重なるのだろうか?

問題を示すスクリーンショット: http://img413.imageshack.us/img413/4994/overlayblending.png

ありがとうございました

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout 
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/ll1"
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            >

    <android.gesture.GestureOverlayView 
      android:id="@+id/gesturePage01"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_weight="1.0">


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

            <TextView 
                android:text="Connection info" 
                android:id="@+id/tvCon1" 
                android:layout_width="fill_parent" 
                android:layout_height="wrap_content"
                android:background="#F0F0F0"
                android:textColor="#FF0000"
                />

        </TableRow>


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

        <ScrollView 
            android:id="@+id/ScrollView01" 
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">

                <TextView  
                    android:id="@+id/tvMessages"
                    android:layout_width="fill_parent" 
                    android:layout_height="fill_parent" 
                    android:text=""
                    />

        </ScrollView>

    </TableRow>

</android.gesture.GestureOverlayView>

    </LinearLayout>
4

1 に答える 1

1

私は先に進み、tableRow を TableLayout に入れ、問題を解決しました。

于 2010-07-21T20:39:34.170 に答える