forked from hzuapps/android-labs-2018
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
043f796
commit 65abe3b
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# 第六次实验 | ||
## 1.实验目标 | ||
掌握Android网络访问方法 | ||
## 2.实验内容 | ||
(1)在个人目录中创建一个表示数据的XML或JSON文件 | ||
|
||
(2)数据文件代码提交之后从GitHub获取文件URL | ||
|
||
(3)在应用中通过网络编程访问GitHub的数据文件 | ||
|
||
(4)在应用中解析并显示文件所包含的数据; | ||
|
||
(5)将应用运行结果截图。 | ||
|
||
## 3.实验步骤 | ||
(1)打开已建好的项目。 | ||
|
||
(2)在自己的Github库中创建一个JSON数据文件(text.json)。 | ||
|
||
(3)在ThirdActivity访问json文件的网址。 | ||
|
||
(4)解析JSON,取得对应的值,并在屏幕上显示出json文件中的文字数据。 | ||
|
||
(5)用git上交。 | ||
|
||
## 4.实验结果 | ||
![image](https://github.com/Zhenghizhong/android-labs-2018/blob/master/soft1614080902215/test6/1.png) | ||
![image](https://github.com/Zhenghizhong/android-labs-2018/blob/master/soft1614080902215/test6/SecondActivity.png) | ||
![image](https://github.com/Zhenghizhong/android-labs-2018/blob/master/soft1614080902215/test6/时间转换.png) | ||
![image](https://github.com/Zhenghizhong/android-labs-2018/blob/master/soft1614080902215/test6/长度转换.png) | ||
![image](https://github.com/Zhenghizhong/android-labs-2018/blob/master/soft1614080902215/test6/汇率计算.png) | ||
![image](https://github.com/Zhenghizhong/android-labs-2018/blob/master/soft1614080902215/test6/房贷计算.png) | ||
## 5.实验体会 | ||
这次实验使我了解了如何在安卓的应用上通过访问网站获取网上的信息,并理解了一些通过线程传输json文件数据的一些知识。 |