0

简单的问题:使用下面显示的 XML 布局,我将一些视图包装在 GestureOverlayView 中。如下所示,我的第一行与第二行混合在一起,就好像第一行在第二行的正上方转置一样。

现在,当我从代码中取出 GestureOverlayView 并保留其他所有内容时,我的表格看起来很好 - 行是分开的,而不是彼此重叠。

我想知道为什么这些行与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 回答