阶段一:进行界面布局
Main.xml具体代码如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg">
<GridView
android:id="@+id/imagelist"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:horizontalSpacing="20dp"
android:numColumns="2"
android:verticalSpacing="10dp" >
</GridView>
<ImageView
android:id="@+id/imageshow"
android:layout_marginTop="20dp"
android:scaleType="ce