一.
实验目的:实现手机端与服务器之间进行通信,理解HttpURLConnection
二:设计思路和代码
1.创建一个加载网络图片的应用程序,将包名修改为cn.edu.bzu.imageviewdemo,设计交互式界面,创建主界面,对应的布局文件如下:
<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"
android:orientation="vertical"
tools:context=".MainActivity" >
<ImageView
android:id="@+id/iv"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1" />
<EditText
android:id="@+id/et_path"
android:layout_width="fill_parent"
android:layout_height="wrap_conte