GestureOverlayView导致奇怪的TableRow混合

时间:2010-07-02 02:04:40

标签: android layout gestures

简单问题: 使用下面显示的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>

1 个答案:

答案 0 :(得分:1)

我继续将tableRow放入TableLayout并修复了问题。