2012-09-29 136 views
1

我有一個水平滾動視圖中的五個圖像,我想在頁面加載完成時自動從左到右和從右到左滾動這些圖像。如何自動滾動水平滾動視圖android

+0

可能重複[滾動瀏覽垂直和水平在Android](http://stackoverflow.com/questions/2044775/scrollview-vertical-and-horizo​​ntal-in-android) –

+0

@martinclayton你鏈接到t他正確的問題?我不認爲作者想要垂直和水平滾動......我認爲他們想要一個可以在一段時間內改變圖像的佈局,就像http://developer.android.com一樣。 – Sam

回答

0

插入Horizo​​ntalScrollView標籤indise您的滾動型標記在XML文件中

對於防爆:

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