先看效果图:
[img]http://dl2.iteye.com/upload/attachment/0100/0556/8b803bef-222d-3449-931d-739a22410a4d.jpg[/img]
大家肯定想到在gridview中修改,是的........只需要设置gridview的布局文件设置成这样即可......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/darker_gray"
android:orientation="vertical" >
<GridView
android:id="@+id/gridView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dp"
android:layout_marginLeft="-1px"
android:layout_marginRight="-1px"
android:layout_marginTop="10dp"
android:background="#ffffff"
android:gravity="center"
android:horizontalSpacing="-1px"
android:listSelector="@android:color/transparent"
android:numColumns="3"
android:scrollbars="none"
android:stretchMode="columnWidth"
android:verticalSpacing="-1px" >
</GridView>
</LinearLayout>
是不是很简单啊...................