深圳达内 Android 网页源码查看器
?
1 <?xml version="1.0" encoding="utf-8"?>
2 < LinearLayout
3 xmlns:android=" /apk/res/android "
4 android:orientation="vertical"
5 android:layout_width="fill_parent"
6 android:layout_height="fill_parent">
7 < TextView
8 android:layout_width="fill_parent"
9 android:layout_height="wrap_content"
1 android:text="@string/path"
0 />
1 < EditText
1 android:id="@+id/path"
1 android:layout_width="fill_parent"
2 android:layout_height="wrap_content"
1 android:text=" 31:8080/videonews/index.jsp "
3 />
1 < Button
4 android:id="@+id/button"
1 android:layout_width="wrap_content"
5 android:layout_height="wrap_content"
1 android:text="@string/button"
6 />
1
7 < ScrollView
1 android:layout_width="wrap_content"
8 android:layout_height="wrap_content">
1 < TextView
9 android:id="@+id/htmlsource"
2 android:layout_width="fill_parent"
0 android:layout_height="wrap_content"
2 />
1 ScrollView >
2 LinearLayout >
2
2
3
2
4
2
5
2
6
2
7
2
8
2
9
3
0
3
1
3
2
3
3
?
1 package .htmlviewer;
2
3 public class MainActivity extends Activity {
4 private EditText pathText;
5 private TextView htmlSource;
6
7 public void onCreate(Bundle savedInstanceState) {
8 super .onCreate(savedInstanceState);
9 setContentView(R.layout.main);
1 pathText = (EditText) this .findViewById(R.id.path);
0 htmlSource = (TextView) this