</pre><p></p><p></p><p>1、在Activity对应的xml内</p><p></p><pre name="code" class="html"> <HorizontalScrollView
android:id="@+id/horizontalScrollView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<GridView
android:id="@+id/diary_gridview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:numColumn