Skip to content

Commit 3182964

Browse files
authored
第10章 网络通信
1 parent 03c213d commit 3182964

31 files changed

+1361
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent"
4+
android:orientation="vertical"
5+
android:padding="5dp" >
6+
7+
<RelativeLayout
8+
android:layout_width="match_parent"
9+
android:layout_height="40dp" >
10+
11+
<TextView
12+
android:id="@+id/tv_style"
13+
android:layout_width="wrap_content"
14+
android:layout_height="match_parent"
15+
android:layout_alignParentLeft="true"
16+
android:gravity="center"
17+
android:text="请选择要加载的小说 "
18+
android:textColor="@color/black"
19+
android:textSize="17sp" />
20+
21+
<Spinner
22+
android:id="@+id/sp_style"
23+
android:layout_width="match_parent"
24+
android:layout_height="match_parent"
25+
android:layout_toRightOf="@+id/tv_style"
26+
android:gravity="left|center"
27+
android:spinnerMode="dialog" />
28+
</RelativeLayout>
29+
30+
<ProgressBar
31+
android:id="@+id/pb_async"
32+
style="?android:attr/progressBarStyleHorizontal"
33+
android:layout_width="match_parent"
34+
android:layout_height="30dp" />
35+
36+
<TextView
37+
android:id="@+id/tv_async"
38+
android:layout_width="match_parent"
39+
android:layout_height="wrap_content"
40+
android:text="这里查看加载进度"
41+
android:textColor="@color/black"
42+
android:textSize="17sp" />
43+
44+
</LinearLayout>
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent"
4+
android:orientation="vertical"
5+
android:padding="5dp" >
6+
7+
<TextView
8+
android:id="@+id/tv_other"
9+
android:layout_width="match_parent"
10+
android:layout_height="wrap_content"
11+
android:gravity="center"
12+
android:textColor="@color/black"
13+
android:textSize="17sp" />
14+
15+
<TextView
16+
android:id="@+id/tv_show"
17+
android:layout_width="match_parent"
18+
android:layout_height="wrap_content"
19+
android:textColor="@color/black"
20+
android:textSize="15sp" />
21+
22+
<LinearLayout
23+
android:layout_width="match_parent"
24+
android:layout_height="0dp"
25+
android:layout_weight="1"
26+
android:gravity="bottom"
27+
android:orientation="vertical" >
28+
29+
<ScrollView
30+
android:id="@+id/sv_chat"
31+
android:layout_width="match_parent"
32+
android:layout_height="match_parent" >
33+
34+
<LinearLayout
35+
android:id="@+id/ll_show"
36+
android:layout_width="match_parent"
37+
android:layout_height="match_parent"
38+
android:gravity="bottom"
39+
android:orientation="vertical" >
40+
</LinearLayout>
41+
</ScrollView>
42+
</LinearLayout>
43+
44+
<EditText
45+
android:id="@+id/et_input"
46+
android:layout_width="match_parent"
47+
android:layout_height="wrap_content"
48+
android:background="@drawable/editext_selector"
49+
android:hint="输入"
50+
android:textColor="@color/black"
51+
android:textSize="15sp" />
52+
53+
<LinearLayout
54+
android:layout_width="match_parent"
55+
android:layout_height="wrap_content"
56+
android:orientation="horizontal" >
57+
58+
<ImageButton
59+
android:id="@+id/ib_photo"
60+
android:layout_width="wrap_content"
61+
android:layout_height="match_parent"
62+
android:src="@drawable/icon_photo"
63+
android:scaleType="fitCenter" />
64+
65+
<ImageButton
66+
android:id="@+id/ib_sound"
67+
android:layout_width="wrap_content"
68+
android:layout_height="match_parent"
69+
android:src="@drawable/icon_sound"
70+
android:scaleType="fitCenter" />
71+
72+
<Button
73+
android:id="@+id/btn_send"
74+
android:layout_width="0dp"
75+
android:layout_height="wrap_content"
76+
android:layout_weight="1"
77+
android:text="发送"
78+
android:textColor="@color/black"
79+
android:textSize="17sp" />
80+
</LinearLayout>
81+
82+
</LinearLayout>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent"
4+
android:orientation="vertical"
5+
android:padding="5dp" >
6+
7+
<TextView
8+
android:id="@+id/tv_connect"
9+
android:layout_width="match_parent"
10+
android:layout_height="wrap_content"
11+
android:textColor="@color/black"
12+
android:textSize="17sp" />
13+
14+
</LinearLayout>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent"
4+
android:orientation="vertical"
5+
android:padding="5dp" >
6+
7+
<RelativeLayout
8+
android:layout_width="match_parent"
9+
android:layout_height="40dp" >
10+
11+
<TextView
12+
android:id="@+id/tv_apk_url"
13+
android:layout_width="wrap_content"
14+
android:layout_height="match_parent"
15+
android:layout_alignParentLeft="true"
16+
android:gravity="center"
17+
android:text="请选择要下载的安装包 "
18+
android:textColor="@color/black"
19+
android:textSize="17sp" />
20+
21+
<Spinner
22+
android:id="@+id/sp_apk_url"
23+
android:layout_width="match_parent"
24+
android:layout_height="match_parent"
25+
android:layout_toRightOf="@+id/tv_apk_url"
26+
android:gravity="left|center"
27+
android:spinnerMode="dialog" />
28+
</RelativeLayout>
29+
30+
<TextView
31+
android:id="@+id/tv_apk_result"
32+
android:layout_width="match_parent"
33+
android:layout_height="wrap_content"
34+
android:textColor="@color/black"
35+
android:textSize="17sp" />
36+
37+
</LinearLayout>
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent"
4+
android:orientation="vertical"
5+
android:padding="5dp" >
6+
7+
<ScrollView
8+
android:layout_width="match_parent"
9+
android:layout_height="wrap_content">
10+
11+
<LinearLayout
12+
android:layout_width="match_parent"
13+
android:layout_height="wrap_content"
14+
android:orientation="vertical">
15+
16+
<RelativeLayout
17+
android:layout_width="match_parent"
18+
android:layout_height="40dp" >
19+
20+
<TextView
21+
android:id="@+id/tv_image_url"
22+
android:layout_width="wrap_content"
23+
android:layout_height="match_parent"
24+
android:layout_alignParentLeft="true"
25+
android:gravity="center"
26+
android:text="请选择要下载的图片 "
27+
android:textColor="@color/black"
28+
android:textSize="17sp" />
29+
30+
<Spinner
31+
android:id="@+id/sp_image_url"
32+
android:layout_width="match_parent"
33+
android:layout_height="match_parent"
34+
android:layout_toRightOf="@+id/tv_image_url"
35+
android:gravity="left|center"
36+
android:spinnerMode="dialog" />
37+
</RelativeLayout>
38+
39+
<FrameLayout
40+
android:layout_width="match_parent"
41+
android:layout_height="wrap_content" >
42+
43+
<ImageView
44+
android:id="@+id/iv_image_url"
45+
android:layout_width="match_parent"
46+
android:layout_height="match_parent"
47+
android:background="@drawable/downloading"
48+
android:scaleType="fitCenter" />
49+
50+
<com.example.network.widget.TextProgressCircle
51+
android:id="@+id/tpc_progress"
52+
android:layout_width="match_parent"
53+
android:layout_height="430dp"
54+
android:layout_gravity="center"
55+
android:background="#99ffffff"
56+
android:visibility="invisible" />
57+
</FrameLayout>
58+
59+
<TextView
60+
android:id="@+id/tv_image_result"
61+
android:layout_width="match_parent"
62+
android:layout_height="wrap_content"
63+
android:textColor="@color/black"
64+
android:textSize="17sp" />
65+
66+
</LinearLayout>
67+
</ScrollView>
68+
69+
</LinearLayout>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent"
4+
android:orientation="vertical"
5+
android:padding="5dp" >
6+
7+
<EditText
8+
android:id="@+id/et_image_save"
9+
android:layout_width="match_parent"
10+
android:layout_height="100dp"
11+
android:background="@drawable/editext_selector"
12+
android:gravity="left|top"
13+
android:hint="请输入文字"
14+
android:textColor="@color/black"
15+
android:textSize="17sp" />
16+
17+
<Button
18+
android:id="@+id/btn_image_save"
19+
android:layout_width="match_parent"
20+
android:layout_height="wrap_content"
21+
android:text="保存截图"
22+
android:textColor="@color/black"
23+
android:textSize="17sp" />
24+
25+
<TextView
26+
android:id="@+id/tv_image_save"
27+
android:layout_width="match_parent"
28+
android:layout_height="wrap_content"
29+
android:textColor="@color/black"
30+
android:textSize="17sp" />
31+
32+
</LinearLayout>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent"
4+
android:orientation="vertical"
5+
android:padding="5dp" >
6+
7+
<Button
8+
android:id="@+id/btn_image_select"
9+
android:layout_width="match_parent"
10+
android:layout_height="wrap_content"
11+
android:text="打开图片"
12+
android:textColor="@color/black"
13+
android:textSize="17sp" />
14+
15+
<TextView
16+
android:id="@+id/tv_image_select"
17+
android:layout_width="match_parent"
18+
android:layout_height="wrap_content"
19+
android:textColor="@color/black"
20+
android:textSize="17sp" />
21+
22+
<ImageView
23+
android:id="@+id/iv_image_select"
24+
android:layout_width="match_parent"
25+
android:layout_height="wrap_content"
26+
android:scaleType="fitCenter" />
27+
28+
</LinearLayout>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent"
4+
android:orientation="vertical"
5+
android:padding="5dp" >
6+
7+
<TextView
8+
android:layout_width="match_parent"
9+
android:layout_height="wrap_content"
10+
android:layout_marginBottom="5dp"
11+
android:padding="3dp"
12+
android:background="@drawable/shape_gold"
13+
android:gravity="center"
14+
android:text="OO邮箱"
15+
android:textColor="@color/black"
16+
android:textSize="20sp" />
17+
18+
<ExpandableListView
19+
android:id="@+id/elv_list"
20+
android:layout_width="match_parent"
21+
android:layout_height="wrap_content" />
22+
23+
</LinearLayout>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent"
4+
android:orientation="vertical"
5+
android:padding="5dp" >
6+
7+
<TextView
8+
android:layout_width="match_parent"
9+
android:layout_height="wrap_content"
10+
android:text="点击验证码即可刷新验证码图片"
11+
android:textColor="@color/black"
12+
android:textSize="17sp" />
13+
14+
<ImageView
15+
android:id="@+id/iv_image_code"
16+
android:layout_width="match_parent"
17+
android:layout_height="100dp"
18+
android:scaleType="fitCenter" />
19+
20+
</LinearLayout>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent"
4+
android:orientation="vertical"
5+
android:padding="10dp" >
6+
7+
<TextView
8+
android:id="@+id/tv_location"
9+
android:layout_width="wrap_content"
10+
android:layout_height="wrap_content"
11+
android:textColor="@color/black"
12+
android:textSize="17sp" />
13+
14+
</LinearLayout>

0 commit comments

Comments
 (0)