0
我需要在xml中创建like this,但不能将scrollView中的内部对象与child horizontalScrollView居中。android中心水平垂直滚动布局
这里是代码示例:
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="5"
android:fillViewport="true" >
<HorizontalScrollView
android:id="@+id/horizontalScrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TableLayout
android:id="@+id/matrix_table"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" >
<!-- auto generated rows -->
</TableLayout>
</RelativeLayout>
</HorizontalScrollView>
</ScrollView>
谢谢!
非常感谢,它的工作原理! – Yanny