2013-04-05 76 views
0

我正在做一個任務,從服務器檢索圖像,並顯示在應用程序中的GridView。這個網格視圖是向上和向下滾動的。但是,當菜單屏幕滾動時,我想從左向右滾動此視圖。網格視圖可能嗎?還是有更好的方法來做到這一點?請幫我這樣做我如何滾動gridview horrizonally insted垂直

+1

http://stackoverflow.com/questions/5725745/horizo​​ntal-scrolling-grid-view – Raghunandan 2013-04-05 12:36:11

+0

你可以嘗試 「圖庫視圖」 .. – Subburaj 2013-04-05 12:37:16

回答

0

在你的gridview中添加這行。

android:scrollbars="horizontal" 

爲前:

 <GridView 
      android:id="@+id/gridView1" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent"     
      android:animationCache="true"     
      android:numColumns="3" 
      android:scrollbars="horizontal" 
      android:scrollingCache="false" > 
     </GridView>