0

我创建了一个如下所示的布局:

       <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
       <TableLayout 
         android:layout_width="match_parent"
         android:layout_height="match_parent">
       <TableRow>
        <TextView 
             android:layout_width="match_parent"
             android:layout_height="wrap_content">
        </TableRow>
        <TableRow>
              <TextView 
                    android:text="Name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
              />
              <AutoCompleteTextView android:id="@+id/name"
                                    android:layout_width="150dp"
                                    android:layout_height="wrap_content"/>
       </TableRow>
       </TableLayout>
       </ScrollView>

这会在没有周围环境的情况下抛出一段ClassCastException时间。为什么? TextViewTableRow

4

0 回答 0