1.activity_main.xml文件如下:
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="cn.edu.bzu.anew.MainActivity">
<FrameLayout android:layout_width="match_parent" android:layout_height="match_parent">
<LinearLayout android:id="@+id/loading" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:orientation="vertical" android:visibility="invisible">
<ProgressBar android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="正在加载信息..." />
</LinearLayout>
<ListView android:id="@+id/lv_news" android:layout_width="match_parent" android:layout_height="match_parent" />
</FrameLayout>
</RelativeLayout>
news_item.xml文件如下:
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="65dp">
<com.loopj.android.image.SmartImageView android