簡體   English   中英

Android中的水平和垂直滾動條與tablelayout?

[英]Horizontal and vertical scrollbar in Android with tablelayout?

如果您知道如何添加兩個滾動條,請幫助我。
首先,我清楚所有人。
我在tablelayout中添加了兩個滾動條,但主要問題是使用動態數據來填充tablerow。 因此,如果只有一個記錄,那么水平滾動視圖頂部在數據之后。 但我想在底部顯示水平,也顯示垂直。


謝謝
PRASHANT

使用此代碼..

<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>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM