我在table layout中动态添加tablerows。当我使用垂直和水平滚动条时。由于水平滚动,我在布局中获得了一些空间。我的XML文件是─删除水平滚动条的空间
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scrollbars="none">
<HorizontalScrollView
android:id="@+id/horizontalScrollView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scrollbars="none">
<TableLayout
android:stretchColumns="*"
android:id="@+id/main_table"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_width="match_parent">
</TableLayout>
</HorizontalScrollView>
</ScrollView>
</LinearLayout>
截图是 -
我想删除从右边那个空间。
你试过'机器人:layout_weight = “WRAP_CONTENT”'你'TableLayout' – 2014-09-25 06:35:28
Anushka,我认为你必须设置layout_width =” match_parent“ – 2014-09-25 06:36:32
plz发布您的布局行xml文件 – 2014-09-25 06:39:07