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
Showing
5 changed files
with
71 additions
and
6 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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,33 @@ | ||
|
||
|
||
|
||
|
||
|
||
##第五次实验 | ||
|
||
1.实验目标 | ||
|
||
(1)掌握在Android App中存储数据 | ||
|
||
2.实验步骤 | ||
|
||
(1)本次实验首先由于之前做的是计算器,所以决定把计算器中的一个按钮‘C’改为”保存“的按钮,具有保存屏幕上输入数字的功能 | ||
|
||
(2)在原soft1614080902416Activity中定义了 方法savenumber(String text) | ||
|
||
(3)方法savenumber(String text)中运用了FileOutputStream流定义名字为“number”的文本,BufferedWriter writer的write写入数字 | ||
|
||
(4)在点击按钮“保存”时设置调用savenumber()方法,达到储存数字的效果。 | ||
|
||
(5) | ||
|
||
## 3.实验结果 | ||
![screen](https://github.com/779221136/android-labs-2018/blob/master/soft1614080902416/app/5.png) | ||
![screen](https://github.com/779221136/android-labs-2018/blob/master/soft1614080902416/app/52.png) | ||
|
||
## 4.实验体会 | ||
|
||
学会了简单的存储,利用java.io类和流来输出数据,写入数据,和储存简单的数据,希望在以后的学习中能更多了解到储存的相关内容。 | ||
|
||
|
||
|