diff --git a/Soft1614080902103/app/src/main/AndroidManifest.xml b/Soft1614080902103/app/src/main/AndroidManifest.xml
index 51f2c1392..71a28e140 100644
--- a/Soft1614080902103/app/src/main/AndroidManifest.xml
+++ b/Soft1614080902103/app/src/main/AndroidManifest.xml
@@ -1,15 +1,7 @@
+ package="androidlabs.hzuapps.edu.soft1614080902103">
-
-
-
-
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/Soft1614080902103/app/src/main/java/edu/hzuapps/androidlabs/myapplication/MainActivity.java b/Soft1614080902103/app/src/main/java/edu/hzuapps/androidlabs/myapplication/MainActivity.java
deleted file mode 100644
index 30b554660..000000000
--- a/Soft1614080902103/app/src/main/java/edu/hzuapps/androidlabs/myapplication/MainActivity.java
+++ /dev/null
@@ -1,171 +0,0 @@
-package edu.hzuapps.androidlabs.myapplication;
-
-import android.annotation.SuppressLint;
-import android.app.ProgressDialog;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.os.Environment;
-import android.os.Handler;
-import android.os.Message;
-import android.support.v7.app.AppCompatActivity;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.View;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.ImageView;
-import android.widget.Toast;
-
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-public class MainActivity extends AppCompatActivity {
-
- private final static String TAG = "soft1614080902103MainActivity";
- private final static String ALBUM_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/download_test/";
- private ImageView mImageView;
- private Button mBtnSave;
- private Button mBtnRead;
- private ProgressDialog mSaveDialog = null;
- private Bitmap mBitmap;
- private String mFileName;
- private String mSaveMessage;
- private EditText editText;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- mImageView = (ImageView)findViewById(R.id.imageView);
- mBtnSave = (Button)findViewById(R.id.button2);
- editText = (EditText)findViewById(R.id.url);
-
- mBtnSave.setOnClickListener(new Button.OnClickListener(){
- public void onClick(View v) {
- new Thread(connectNet).start();
- mSaveDialog = ProgressDialog.show(MainActivity.this, "保存图片", "图片正在保存中,请稍等...", true);
- new Thread(saveFileRunnable.get()).start();
- }
- });
- }
- public byte[] getImage(String path) throws Exception{
- URL url = new URL(path);
- HttpURLConnection conn = (HttpURLConnection) url.openConnection();
- conn.setConnectTimeout(5 * 1000);
- conn.setRequestMethod("GET");
- InputStream inStream = conn.getInputStream();
- if(conn.getResponseCode() == HttpURLConnection.HTTP_OK){
- return readStream(inStream);
- }
- return null;
- }
-
-
- public InputStream getImageStream(String path) throws Exception{
- URL url = new URL(path);
- HttpURLConnection conn = (HttpURLConnection) url.openConnection();
- conn.setConnectTimeout(5 * 1000);
- conn.setRequestMethod("GET");
- if(conn.getResponseCode() == HttpURLConnection.HTTP_OK){
- return conn.getInputStream();
- }
- return null;
- }
-
- public static byte[] readStream(InputStream inStream) throws Exception{
- ByteArrayOutputStream outStream = new ByteArrayOutputStream();
- byte[] buffer = new byte[1024];
- int len = 0;
- while( (len=inStream.read(buffer)) != -1){
- outStream.write(buffer, 0, len);
- }
- outStream.close();
- inStream.close();
- return outStream.toByteArray();
- }
- public void saveFile(Bitmap bm, String fileName) throws IOException {
- File dirFile = new File(ALBUM_PATH);
- if(!dirFile.exists()){
- dirFile.mkdir();
- }
- File myCaptureFile = new File(ALBUM_PATH + fileName);
- BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(myCaptureFile));
- bm.compress(Bitmap.CompressFormat.JPEG, 80, bos);
- bos.flush();
- bos.close();
- }
-
- private final ThreadLocal saveFileRunnable = new ThreadLocal() {
- @Override
- protected Runnable initialValue() {
- return new Runnable() {
- @Override
- public void run() {
- try {
- saveFile(mBitmap, mFileName);
- mSaveMessage = "图片保存成功!";
- } catch (IOException e) {
- mSaveMessage = "图片保存失败!";
- e.printStackTrace();
- }
- messageHandler.sendMessage(messageHandler.obtainMessage());
- }
-
- };
- }
- };
- private Handler messageHandler = new Handler() {
- @SuppressLint("LongLogTag")
- @Override
- public void handleMessage(Message msg) {
- mSaveDialog.dismiss();
- Log.d(TAG, mSaveMessage);
- Toast.makeText(MainActivity.this, mSaveMessage, Toast.LENGTH_SHORT).show();
- }
- };
-
- /*
- * 连接网络
- */
- private Runnable connectNet = new Runnable(){
- @SuppressLint({"LongLogTag", "WrongConstant"})
- @Override
- public void run() {
- try {
- String Url=editText.getText().toString();
- mFileName = "test.jpg";
- byte[] data = getImage(Url);
- if(data!=null){
- mBitmap = BitmapFactory.decodeByteArray(data, 0, data.length);// bitmap
- }else{
- Toast.makeText(MainActivity.this, "Image error!", 1).show();
- }
- // 发送消息,通知handler在主线程中更新UI
- connectHanlder.sendEmptyMessage(0);
- Log.d(TAG, "set image ...");
- } catch (Exception e) {
- Toast.makeText(MainActivity.this,"无法链接网络!", 1).show();
- e.printStackTrace();
- }
-
- }
-
- };
-
- private Handler connectHanlder = new Handler() {
- @SuppressLint("LongLogTag")
- @Override
- public void handleMessage(Message msg) {
- Log.d(TAG, "display image");
- // 更新UI,显示图片
- if (mBitmap != null) {
- mImageView.setImageBitmap(mBitmap);// display image
- }
- }
- };
-}
diff --git a/Soft1614080902103/app/src/main/java/edu/hzuapps/appforjiaxing/SecondActivity.java b/Soft1614080902103/app/src/main/java/edu/hzuapps/appforjiaxing/SecondActivity.java
deleted file mode 100644
index 94bd269ca..000000000
--- a/Soft1614080902103/app/src/main/java/edu/hzuapps/appforjiaxing/SecondActivity.java
+++ /dev/null
@@ -1,116 +0,0 @@
-
-package edu.hzuapps.appforjiaxing;
-
-import android.content.Context;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.Environment;
-import android.support.annotation.RequiresApi;
-//import android.support.design.widget.FloatingActionButton;
-//import android.support.design.widget.Snackbar;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.Toolbar;
-import android.util.Log;
-import android.widget.ListView;
-import android.widget.ArrayAdapter;
-
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.FileReader;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.util.LinkedList;
-
-public class SecondActivity extends AppCompatActivity {
-
- private final String TAG = SecondActivity.class.getSimpleName();
- private Context mContext;
-
- @RequiresApi(api = Build.VERSION_CODES.FROYO)
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_second);
-
- //根据id找到事先声明好的listview
- ListView listView = (ListView) findViewById(R.id.lvSongs );
-
- //定义一个数组,存放列表的项
- String[] names={"张三","李四","王五","赵六","田七"};
-
- //定义adapter (适配器), 搭建listview和数据的通路
- //第一个参数是当前的activity,第二个参数是列表项的布局,android.R.layout.simple_list_item_1 是android自带的一个简单的布局,只有一个文本框,这里直接拿来使用
- //第三个参数是含有数据的数组,用来填充列表项的布局
- ArrayAdapter arrayAdapter = new ArrayAdapter(this,android.R.layout.simple_list_item_1,names);
-
- //为listview设置adapter
- listView.setAdapter(arrayAdapter);
-
- saveData(names);
-
- String[] anotherNames = readData();
- // do something
- }
-
- @RequiresApi(api = Build.VERSION_CODES.FROYO)
- public void saveData(String[] data){
- // 获取需要写入的文件
- File f = new File("/mnt/sdcard","data.txt");
- try{
- FileWriter writer = new FileWriter(f);
- for(int i=0;i list = new LinkedList<>();
- File f = new File("/mnt/sdcard","data.txt");
- try{
- FileReader reader = new FileReader(f);
- BufferedReader br = new BufferedReader(reader);
- String temp;
- while( (temp=br.readLine())!=null){
- list.add(temp);
- }
- }catch (IOException e){
- }
- String[] result = new String[list.size()];
- list.toArray(result);
- return result;
- }
- /* Checks if external storage is available for read and write */
- private boolean isExternalStorageWritable() {
- String state = Environment.getExternalStorageState();
- if (Environment.MEDIA_MOUNTED.equals(state)) {
- return true;
- }
- return false;
- }
-
- /* Checks if external storage is available to at least read */
- private boolean isExternalStorageReadable() {
- String state = Environment.getExternalStorageState();
- if (Environment.MEDIA_MOUNTED.equals(state) ||
- Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
- return true;
- }
- return false;
- }
-
- @RequiresApi(api = Build.VERSION_CODES.FROYO)
- private File getPrivateExtStorageDir(String dirName) {
- File file = new File(mContext.getExternalFilesDir(null), dirName);
- if (!file.mkdirs()) {
- Log.e(TAG, "目录无法创建!");
- }
- return file;
- }
-}
\ No newline at end of file
diff --git a/Soft1614080902103/app/src/main/java/edu/hzuapps/appforjiaxing/Soft1614080902103Activity.java b/Soft1614080902103/app/src/main/java/edu/hzuapps/appforjiaxing/Soft1614080902103Activity.java
deleted file mode 100644
index 0afa1654c..000000000
--- a/Soft1614080902103/app/src/main/java/edu/hzuapps/appforjiaxing/Soft1614080902103Activity.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package edu.hzuapps.appforjiaxing;
-
-import android.content.Intent;
-import android.support.v7.app.AppCompatActivity;
-import android.os.Bundle;
-import android.view.View;
-import android.widget.TextView;
-import org.w3c.dom.Text;
-
-public class Soft1614080902103Activity extends AppCompatActivity {
- private TextView textView;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_soft1614080902103);
-
- textView=(TextView)findViewById(R.id.musicplayer);
-
- textView.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent intent=new Intent(Soft1614080902103Activity.this,SecondActivity.class);
- startActivity(intent);
- }
- });
-
-
-
- }
-}
\ No newline at end of file
diff --git a/Soft1614080902103/app/src/main/java/edu/hzuapps/appforjiaxing/SongItem.java b/Soft1614080902103/app/src/main/java/edu/hzuapps/appforjiaxing/SongItem.java
deleted file mode 100644
index 7a7eef4ac..000000000
--- a/Soft1614080902103/app/src/main/java/edu/hzuapps/appforjiaxing/SongItem.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package edu.hzuapps.appforjiaxing;
-
-class SongItem {
-}
diff --git a/Soft1614080902103/app/src/main/res/drawable/ic_launcher_background.xml b/Soft1614080902103/app/src/main/res/drawable/ic_launcher_background.xml
index d5fccc538..3a37cf6d0 100644
--- a/Soft1614080902103/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/Soft1614080902103/app/src/main/res/drawable/ic_launcher_background.xml
@@ -1,170 +1,170 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Soft1614080902103/app/src/main/res/drawable/musicplayer.png b/Soft1614080902103/app/src/main/res/drawable/musicplayer.png
deleted file mode 100644
index 26d1f6b6e..000000000
Binary files a/Soft1614080902103/app/src/main/res/drawable/musicplayer.png and /dev/null differ
diff --git a/Soft1614080902103/app/src/main/res/drawable/next.jpg b/Soft1614080902103/app/src/main/res/drawable/next.jpg
deleted file mode 100644
index 526f86668..000000000
Binary files a/Soft1614080902103/app/src/main/res/drawable/next.jpg and /dev/null differ
diff --git a/Soft1614080902103/app/src/main/res/drawable/photo.jpeg b/Soft1614080902103/app/src/main/res/drawable/photo.jpeg
deleted file mode 100644
index df630587c..000000000
Binary files a/Soft1614080902103/app/src/main/res/drawable/photo.jpeg and /dev/null differ
diff --git a/Soft1614080902103/app/src/main/res/drawable/picture.jpeg b/Soft1614080902103/app/src/main/res/drawable/picture.jpeg
deleted file mode 100644
index d5033f31e..000000000
Binary files a/Soft1614080902103/app/src/main/res/drawable/picture.jpeg and /dev/null differ
diff --git a/Soft1614080902103/app/src/main/res/drawable/progressbar.jpg b/Soft1614080902103/app/src/main/res/drawable/progressbar.jpg
deleted file mode 100644
index 2a3a6afe1..000000000
Binary files a/Soft1614080902103/app/src/main/res/drawable/progressbar.jpg and /dev/null differ
diff --git a/Soft1614080902103/app/src/main/res/drawable/stop.jpg b/Soft1614080902103/app/src/main/res/drawable/stop.jpg
deleted file mode 100644
index 3fccd3b42..000000000
Binary files a/Soft1614080902103/app/src/main/res/drawable/stop.jpg and /dev/null differ
diff --git a/Soft1614080902103/app/src/main/res/drawable/timg.jpg b/Soft1614080902103/app/src/main/res/drawable/timg.jpg
deleted file mode 100644
index 875a5ff1f..000000000
Binary files a/Soft1614080902103/app/src/main/res/drawable/timg.jpg and /dev/null differ
diff --git a/Soft1614080902103/app/src/main/res/layout/activity_main.xml b/Soft1614080902103/app/src/main/res/layout/activity_main.xml
deleted file mode 100644
index 0e6bf4a31..000000000
--- a/Soft1614080902103/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/Soft1614080902103/app/src/main/res/layout/activity_second.xml b/Soft1614080902103/app/src/main/res/layout/activity_second.xml
index d6c615da7..c8f99c25c 100644
--- a/Soft1614080902103/app/src/main/res/layout/activity_second.xml
+++ b/Soft1614080902103/app/src/main/res/layout/activity_second.xml
@@ -1,66 +1,36 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Soft1614080902103/app/src/main/res/layout/activity_soft1614080902103.xml b/Soft1614080902103/app/src/main/res/layout/activity_soft1614080902103.xml
index b86011cef..993230304 100644
--- a/Soft1614080902103/app/src/main/res/layout/activity_soft1614080902103.xml
+++ b/Soft1614080902103/app/src/main/res/layout/activity_soft1614080902103.xml
@@ -1,50 +1,47 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Soft1614080902103/app/src/main/res/values/strings.xml b/Soft1614080902103/app/src/main/res/values/strings.xml
index 759b75179..906ec5d69 100644
--- a/Soft1614080902103/app/src/main/res/values/strings.xml
+++ b/Soft1614080902103/app/src/main/res/values/strings.xml
@@ -1,5 +1,6 @@
-
-soft1614080902103
-SecondActivity
- android.support.design.widget.AppBarLayout$ScrollingViewBehavior
-
+
+ 音乐播放器
+ Settings
+ SecondActivity
+
+
diff --git a/Soft1614080902103/report5.md b/Soft1614080902103/report5.md
deleted file mode 100644
index 4019fbf62..000000000
--- a/Soft1614080902103/report5.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# 实验目的
-
-掌握在Android App中存储数据;
-
-# 实验要求
-
-1.根据选题要求使用文件存储
-
-2.将应用产生的数据保存到文件存储中;
-
-3.说明使用的文件存储方式:内部 or 外部;
-
-4.将运行结果截图。
-
-#实验步骤
-
-1.app保存了一个文件
-
-2.从文件中读取歌单名并显示出来。
-
-# 实验结果
-![image](https://raw.githubusercontent.com/ZhengzyX/android-labs-2018/master/Soft1614080902103/%E5%AE%9E%E9%AA%8C%E4%BA%943.jpg)
-![image](https://raw.githubusercontent.com/ZhengzyX/android-labs-2018/master/Soft1614080902103/%E5%AE%9E%E9%AA%8C%E4%BA%941.png)
-![image](https://raw.githubusercontent.com/ZhengzyX/android-labs-2018/master/Soft1614080902103/%E5%AE%9E%E9%AA%8C%E4%BA%942.png)
-# 实验体会
-
-1.掌握了文件存储数据方法,包括读取和存入。
-
-2.掌握了edittext的编程使用。
diff --git a/Soft1614080902103/report6.md b/Soft1614080902103/report6.md
deleted file mode 100644
index 8ae678e62..000000000
--- a/Soft1614080902103/report6.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# 实验六
-
-## 一.实验目的
-
-掌握Android网络访问方法;
-
-## 二.实验内容
-
-从网络下载一个文件(图片、MP3、MP4);
-
-保存到手机,在应用中使用文件;
-
-将应用运行结果截图。
-
-## 三.实验步骤
-
-1.本次实验需通过网络下载东西,因此先修改AndroidManifest.xml中的文件,以获取上网的相关权限;
-
-2.在soft1614080902103MainActivity.java文件中定义几个功能类,分别实现连接网络获取图片,显示图片,图片保存功能;
-
-3.定义connectNet类用以下载图片,new 一个线程Thread进行下载;
-
-4.下载到的图片,先在getImage类中转换成byte再转化成Bitmap形式显示;
-
-5.定义savefiles类进行图片保存,开辟一个Thread进行保存;
-
-6.使用加载保存按钮获取URL的图片并保存;
-
-7.使用Git将代码提交到自己的库中:https://github.com/ZhengzyX/android-labs-2018
-
- $ git pull origin master
- $ git add soft1614080902103
- $ git commit "#6 #885 第6次实验"
- $ git push
-
-6.在GitHub中使用Markdown文件编写实验报告(report6.md).
-
-7.在自己的GitHub库上创建和发送Pull Request(注意查看Changed files).
-## 四.实验截图
-![image](https://raw.githubusercontent.com/ZhengzyX/android-labs-2018/master/Soft1614080902103/%E5%AE%9E%E9%AA%8C%E5%85%AD1.png)
-
-![image](https://raw.githubusercontent.com/ZhengzyX/android-labs-2018/master/Soft1614080902103/%E5%AE%9E%E9%AA%8C%E5%85%AD2.png)
-
-## 五.实验体会
-
-一开始做这个实验,无从下手,只能百度,通过别人的代码学习怎么去连接网络,下载图片,完成了代码的编写。
diff --git "a/Soft1614080902103/\345\256\236\351\252\214\344\272\2241.png" "b/Soft1614080902103/\345\256\236\351\252\214\344\272\2241.png"
deleted file mode 100644
index b78a4b789..000000000
Binary files "a/Soft1614080902103/\345\256\236\351\252\214\344\272\2241.png" and /dev/null differ
diff --git "a/Soft1614080902103/\345\256\236\351\252\214\344\272\2242.png" "b/Soft1614080902103/\345\256\236\351\252\214\344\272\2242.png"
deleted file mode 100644
index 72258233d..000000000
Binary files "a/Soft1614080902103/\345\256\236\351\252\214\344\272\2242.png" and /dev/null differ
diff --git "a/Soft1614080902103/\345\256\236\351\252\214\344\272\2243.jpg" "b/Soft1614080902103/\345\256\236\351\252\214\344\272\2243.jpg"
deleted file mode 100644
index ccde04c78..000000000
Binary files "a/Soft1614080902103/\345\256\236\351\252\214\344\272\2243.jpg" and /dev/null differ
diff --git "a/Soft1614080902103/\345\256\236\351\252\214\345\205\2551.png" "b/Soft1614080902103/\345\256\236\351\252\214\345\205\2551.png"
deleted file mode 100644
index 913d0ef0e..000000000
Binary files "a/Soft1614080902103/\345\256\236\351\252\214\345\205\2551.png" and /dev/null differ
diff --git "a/Soft1614080902103/\345\256\236\351\252\214\345\205\2552.png" "b/Soft1614080902103/\345\256\236\351\252\214\345\205\2552.png"
deleted file mode 100644
index 9f7e3d414..000000000
Binary files "a/Soft1614080902103/\345\256\236\351\252\214\345\205\2552.png" and /dev/null differ
diff --git "a/\345\256\236\351\252\214\345\205\2551.png" "b/\345\256\236\351\252\214\345\205\2551.png"
deleted file mode 100644
index 913d0ef0e..000000000
Binary files "a/\345\256\236\351\252\214\345\205\2551.png" and /dev/null differ
diff --git "a/\345\256\236\351\252\214\345\205\2552.png" "b/\345\256\236\351\252\214\345\205\2552.png"
deleted file mode 100644
index 9f7e3d414..000000000
Binary files "a/\345\256\236\351\252\214\345\205\2552.png" and /dev/null differ