这次之前项目中的一个页面效果,之前我是用linearlayout 写死实现的,今天想用gridview实现下,做了一个demo!
效果图如下:
demo的架构:
1、主布局的实现:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#f00"
>
<Button
android:id="@+id/button1"
android:layout_height&#