如果您知道如何添加两个滚动条,请帮助我。
首先我清楚所有。
我在tablelayout中添加了两个滚动条,但主要问题是我使用动态数据填充表格。所以,如果只有一条记录,那么水平滚动视图在数据之后最高。但我想在底部显示水平,并显示垂直。Android中的水平和垂直滚动条与tablelayout?
谢谢
PRASHANT
如果您知道如何添加两个滚动条,请帮助我。
首先我清楚所有。
我在tablelayout中添加了两个滚动条,但主要问题是我使用动态数据填充表格。所以,如果只有一条记录,那么水平滚动视图在数据之后最高。但我想在底部显示水平,并显示垂直。Android中的水平和垂直滚动条与tablelayout?
谢谢
PRASHANT
使用属性scrollbarAlwaysDrawHorizontalTrack
分别scrollbarAlwaysDrawVerticalTrack
这里的文档:
我在哪里使用这个属性? – PrashantAdesara 2010-11-15 13:48:51
-1 ans from @Rolfcoptr。 – PrashantAdesara 2010-12-14 10:53:24
例如在你的xml文件中 – 2010-12-14 11:30:08
使用此代码..
<ScrollView
android:id="@+id/scrllvwNo1"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
//TextView
//Button
</ScrollView>
</LinearLayout>
我试过这种方式,它完全适合我。
<ScrollView android:id="@+id/layout" android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:scrollbars="horizontal|vertical" android:layout_width="fill_parent"
android:layout_marginTop="50dip"
android:scrollbarStyle="outsideInset">
<HorizontalScrollView android:id="@+id/horizontalView" android:layout_height="fill_parent"
android:scrollbars="horizontal|vertical" android:layout_width="wrap_content"
android:layout_marginTop="50dip">
<RelativeLayout android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/RelativeLayout">
<ImageView android:id="@+id/imgView" android:maxHeight="280dip"
android:layout_marginLeft="20dip"
android:layout_marginTop="10dip"
android:src="@drawable/ic_facebook" android:maxWidth="280dip"
android:scaleType="centerInside"
android:layout_height="280dip"
android:layout_width="280dip"></ImageView>
</RelativeLayout>
</HorizontalScrollView>
我认为你是问如何取得水平滚动条在TableLayout的底部显示了所有的方式,而不是数据的下方。是对的吗? – 2010-12-27 01:01:00