不在xml中设置布局,在代码中直接写个布局,显示下载的图片,如下图所示,图片有点丑
XML中添加个linearLayout
<RelativeLayout 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"
tools:context="${relativePackage}.${activityClass}" >
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="九宫格显示图片" />
<LinearLayout
android:id="@+id/report_photo_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:orientation="vertical"
android:layout_below="@+id/text"/>
</RelativeLayout>
另外加个布局,显示图片view_files_image.xml
<?xml version="1.0" encoding="