被包围的文本视图在其文本上方和下方有太多空间。它位于文本视图内部(不在其上方和下方)。我既没有使用边距也没有使用填充,但它仍然存在。xml代码在那里。
<TableRow
android:id="@+id/tbRow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/viewLineSeparator"
android:layout_gravity="top"
android:layout_marginBottom="2dp"
android:layout_marginTop="1dp"
android:gravity="top"
android:weightSum="1.0" >
<TextView
android:id="@+id/tvReportAsAdult"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="left|top"
android:layout_weight="0.60"
android:clickable="true"
android:gravity="left|top"
android:maxLines="5"
android:padding="11dp"
android:text="@string/txtReportAsAdultText"
android:textColor="#00BFFF"
android:textSize="18sp" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="right|center"
android:layout_weight="0.40"
android:gravity="center"
android:weightSum="1.0" >
<ImageButton />
<ImageButton />
<ImageButton />
<ImageButton />
</LinearLayout>
</TableRow>
此 tableRow 是 RelativeLayout 的子级,它又是 ScrollView 的子级。并且空间只是由于 textview 即它既不是由于 imageviews 也不是 tablerow。