The GridView is to display the control horizontally, and then display it vertically
effect as shown above, look at the GridView layout file
<?xml version= "1.0" encoding= "Utf-8"?> <gridview xmlns:android=
"http://schemas.android.com/apk/" Res/android "
android:id=" @+id/brainheroall "
android:background=" #FFeff1ef "
android:layout_width=" Fill_parent "
android:layout_height=" wrap_content "
android:numcolumns=" Auto_fit "
android: verticalspacing= "10DP"
android:horizontalspacing= "10DP"
android:columnwidth= "90DP"
android: Stretchmode= "ColumnWidth"
android:gravity= "center"
/>
This is how to display the GridView, the following XML file is the GridView inside how to display
<?xml version= "1.0" encoding= "Utf-8"?> <relativelayout xmlns:android= "http ://schemas.android.com/apk/res/android "android:layout_height=" Wrap_content "Android:paddingbottom = "4dip" android:layout_width= "fill_parent" > <imageview android:layout_height= "Wrap_cont
Ent "android:id=" @+id/itemimage "android:layout_width=" Wrap_content " Android:layout_centerhorizontal= "true" > </ImageView> <textview Andro Id:layout_width= "Wrap_content" android:layout_below= "@+id/itemimage" android:layout_he ight= "Wrap_content" android:text= "" android:textcolor= "#FF000000" Andro Id:layout_centerhorizontal= "true" android:id= "@+id/itemtext" > </TextView> </rel Ativelayout>