Java 片段内部的ScrollView和tableLayout

Java 片段内部的ScrollView和tableLayout,java,android,android-fragments,scrollview,android-tablelayout,Java,Android,Android Fragments,Scrollview,Android Tablelayout,我正在创建一个选项卡式Android应用程序。 在片段中,我需要一个带有TableLayout的ScrollView。但它不起作用。 我按了按钮,但什么也没显示。 我将发布所有内容: <EditText android:id="@+id/playerEditText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="10" an

我正在创建一个选项卡式Android应用程序。 在片段中,我需要一个带有TableLayout的ScrollView。但它不起作用。 我按了按钮,但什么也没显示。 我将发布所有内容:

<EditText
    android:id="@+id/playerEditText"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ems="10"
    android:stretchColumns="yes"
    android:inputType="text" >

</EditText>

<ImageButton
    android:id="@+id/deletePlayerImageButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:contentDescription="@string/deletePlayerImageButton"
    android:src="@android:drawable/ic_menu_delete" />

</TableRow>
片段XML

<EditText
    android:id="@+id/playerEditText"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ems="10"
    android:stretchColumns="yes"
    android:inputType="text" >

</EditText>

<ImageButton
    android:id="@+id/deletePlayerImageButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:contentDescription="@string/deletePlayerImageButton"
    android:src="@android:drawable/ic_menu_delete" />

</TableRow>

在包含scrollView的tableRow中,然后我按下按钮,我可以看到tableRow的宽度增加了,但我看不到其中的行…

如果应用程序崩溃,你应该指定“它不工作”的含义以及发布相关堆栈跟踪。试着使用
Log.I(“我的项目”,“何处目标我何处目标正在做”)并查看当你点击按钮时调试跟踪面板中发生了什么我仍然不知道是怎么回事:(我认为这是因为你的滚动视图此时的高度为0。尝试请求重新发布如果我设置android:layout\u height=“match\u parent”它仍然不起作用。。。
<EditText
    android:id="@+id/playerEditText"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ems="10"
    android:stretchColumns="yes"
    android:inputType="text" >

</EditText>

<ImageButton
    android:id="@+id/deletePlayerImageButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:contentDescription="@string/deletePlayerImageButton"
    android:src="@android:drawable/ic_menu_delete" />

</TableRow>
 android:layout_weight="1"