xml文件
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#e0000000"
android:paddingBottom="10dp" >
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="none" >
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<LinearLayout
android:layout_width="3840dp"
android:layout_height="fill_parent"
android:layout_gravity="center_vertical"
android:orientation="horizontal" >
<GridView
android:id="@+id/showpopu_gv"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:columnWidth="220px"
android:horizontalSpacing="10dip"
android:numColumns="auto_fit"
android:stretchMode="none"
>
</GridView>
</LinearLayout>
</FrameLayout>
</HorizontalScrollView>
</RelativeLayout>
然后对setAdapter 即可