我的目标是创建一个比用户可以导航的设备屏幕更大的视图,以及我可以根据坐标定位imageview的位置:
我尝试在HorizontalScrollView
和VerticalScrollView
内创建布局,如图here所示:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:scrollbars="vertical">
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="320px" android:layout_height="fill_parent">
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linlay" android:layout_width="320px"
android:layout_height="fill_parent" android:stretchColumns="1"
android:background="#000000"/>
</HorizontalScrollView>
</ScrollView>
问题在于它当时只允许在1个方向上滚动。
是否有办法在所有轴上获得自由移动并将视图放在坐标系中,以便可以在屏幕上或屏幕上放置其他视图?