【发布时间】:2011-11-08 04:03:42
【问题描述】:
我们如何垂直和水平设置ScrollView?我尝试了下面的代码,但没有成功。
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/red"
android:scrollbarFadeDuration="1000"
android:scrollbarSize="12dip" >
<HorizontalScrollView
android:id="@+id/horizontalScrollView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:collapseColumns="2"
android:stretchColumns="1" >
</TableLayout>
</HorizontalScrollView>
<ScrollView >
</ScrollView>
这是我所有的代码:http://pastebin.com/ysRhLMyt
当前屏幕:
我想一直显示滚动条。
【问题讨论】:
-
这个链接可能对你有用。 stackoverflow.com/questions/1399605/…