2012-09-29 212 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>