我有兩個gridviews線性佈局。這是我的XML代碼:如何在一個線性佈局中滾動2個GridViews?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal" >
<GridView
android:id="@+id/leftGrid2"
android:layout_width="416dp"
android:layout_height="1078dp"
android:columnWidth="70dp"
android:horizontalSpacing="5dp"
android:numColumns="2"
android:paddingRight="20dp"
android:stretchMode="columnWidth"
android:verticalSpacing="5dp" >
</GridView>
<GridView
android:id="@+id/rightGrid2"
android:layout_width="400dp"
android:layout_height="match_parent"
android:columnWidth="70dp"
android:horizontalSpacing="5dp"
android:numColumns="2"
android:stretchMode="columnWidth"
android:verticalSpacing="5dp" >
</GridView>
</LinearLayout>
如何使這兩個網格視圖一起滾動或同步它們?當我運行我的應用程序時,他們有兩個獨立的卷軸。
謝謝,
你能告訴我們屏幕截圖? – prolink007 2012-07-18 22:04:23
@ prolink007我的網格視圖單獨滾動.. – ss17 2012-07-18 23:50:57