Java Android中的水平和垂直滚动条与tablelayout?
如果您知道如何添加两个滚动条,请帮助我。Java Android中的水平和垂直滚动条与tablelayout?,java,android,tablelayout,Java,Android,Tablelayout,如果您知道如何添加两个滚动条,请帮助我。 首先,我想大家都明白了。 我在tablelayout中添加了两个滚动条,但主要问题是我使用动态数据填充tablerow。所以,如果只有一条记录,那么水平滚动查看数据后的顶部。但我想在底部显示水平,也显示垂直 谢谢 Prashant分别使用属性scrollbarAlwaysDrawHorizontalTrackscrollbarAlwaysDrawVerticalTrack 文件如下: 使用此代码 <ScrollView android:id="
首先,我想大家都明白了。
我在tablelayout中添加了两个滚动条,但主要问题是我使用动态数据填充tablerow。所以,如果只有一条记录,那么水平滚动查看数据后的顶部。但我想在底部显示水平,也显示垂直
谢谢
Prashant分别使用属性
scrollbarAlwaysDrawHorizontalTrack
scrollbarAlwaysDrawVerticalTrack
文件如下:
使用此代码
<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>
但我无法获得正确的ans。请详细解释。我想你是在问如何让水平滚动条显示在表格布局的底部,而不是数据下面。是这样吗?