-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2655 from liaoyun00/master
- Loading branch information
Showing
6 changed files
with
292 additions
and
0 deletions.
There are no files selected for viewing
170 changes: 170 additions & 0 deletions
170
soft1614080902143/app6/src/main/res/drawable/ic_launcher_background.xml
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,170 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="108dp" | ||
android:height="108dp" | ||
android:viewportHeight="108" | ||
android:viewportWidth="108"> | ||
<path | ||
android:fillColor="#26A69A" | ||
android:pathData="M0,0h108v108h-108z" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M9,0L9,108" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M19,0L19,108" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M29,0L29,108" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M39,0L39,108" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M49,0L49,108" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M59,0L59,108" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M69,0L69,108" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M79,0L79,108" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M89,0L89,108" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M99,0L99,108" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M0,9L108,9" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M0,19L108,19" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M0,29L108,29" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M0,39L108,39" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M0,49L108,49" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M0,59L108,59" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M0,69L108,69" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M0,79L108,79" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M0,89L108,89" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M0,99L108,99" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M19,29L89,29" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M19,39L89,39" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M19,49L89,49" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M19,59L89,59" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M19,69L89,69" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M19,79L89,79" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M29,19L29,89" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M39,19L39,89" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M49,19L49,89" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M59,19L59,89" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M69,19L69,89" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M79,19L79,89" | ||
android:strokeColor="#33FFFFFF" | ||
android:strokeWidth="0.8" /> | ||
</vector> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".Download"> | ||
|
||
<EditText | ||
android:id="@+id/edit_text" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="10sp" | ||
android:layout_marginEnd="10dp" | ||
android:layout_marginLeft="10dp" | ||
android:layout_marginRight="10dp" | ||
android:layout_marginStart="10dp" | ||
android:hint="请输入下载的视频网址" | ||
android:maxLength="400" | ||
android:textColorHint="#238745" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
tools:layout_editor_absoluteY="10dp" /> | ||
|
||
<ImageView | ||
android:id="@+id/imageView3" | ||
android:layout_width="385dp" | ||
android:layout_height="wrap_content" | ||
app:srcCompat="@drawable/jianpan" | ||
tools:layout_editor_absoluteX="1dp" | ||
tools:layout_editor_absoluteY="289dp" /> | ||
|
||
<Button | ||
android:id="@+id/button" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="输入完成" | ||
tools:layout_editor_absoluteX="286dp" | ||
tools:layout_editor_absoluteY="241dp" /> | ||
|
||
|
||
</android.support.constraint.ConstraintLayout> |
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,50 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".Download"> | ||
|
||
<EditText | ||
android:id="@+id/edit_text" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="10sp" | ||
android:layout_marginEnd="10dp" | ||
android:layout_marginLeft="10dp" | ||
android:layout_marginRight="10dp" | ||
android:layout_marginStart="10dp" | ||
android:hint="https://neets.cc/detail/RThVR29bPBBb9rkqGrCKWn" | ||
android:maxLength="400" | ||
android:textColorHint="#238745" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
tools:layout_editor_absoluteY="10dp" /> | ||
|
||
<Button | ||
android:id="@+id/button2" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="点击搜索" | ||
tools:layout_editor_absoluteX="296dp" | ||
tools:layout_editor_absoluteY="77dp" /> | ||
|
||
<Button | ||
android:id="@+id/button3" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="点击下载" | ||
tools:layout_editor_absoluteX="296dp" | ||
tools:layout_editor_absoluteY="401dp" /> | ||
|
||
<ImageView | ||
android:id="@+id/imageView2" | ||
android:layout_width="wrap_content" | ||
android:layout_height="336dp" | ||
app:srcCompat="@drawable/shipin" | ||
tools:layout_editor_absoluteX="0dp" | ||
tools:layout_editor_absoluteY="125dp" /> | ||
|
||
|
||
</android.support.constraint.ConstraintLayout> |
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,30 @@ | ||
# 实验6:Android网络编程 | ||
|
||
## 1. 实验内容 | ||
|
||
1.从网络下载一个文件(图片、MP3、MP4);<br> | ||
|
||
2.保存到手机,在应用中使用文件;<br> | ||
|
||
3.将应用运行结果截图。<br> | ||
|
||
## 2. 实验步骤 | ||
|
||
1.首先创建`Download`和`Jump`来实现图片的下载和一个跳转,并创建对应的xml文件,添加控件。<br> | ||
|
||
2.并从`Jump`新建一个按钮”点击搜索“,实现跳转到`Download`,并将TexView记录的视频网址传给`Download`。<br> | ||
|
||
3.在`Download`实现接收网址并且从网上下载视频的功能。<br> | ||
|
||
4.给`AndroidManifest.xml`添加联网权限。<br> | ||
|
||
## 3. 实验结果 | ||
|
||
![image](https://github.com/liaoyun00/android-labs-2018/blob/master/soft1614080902143/app6/src/main/res/drawable/%E6%88%AA%E5%9B%BE1.png)<br> | ||
|
||
![image](https://github.com/liaoyun00/android-labs-2018/blob/master/soft1614080902143/app6/src/main/res/drawable/%E6%88%AA%E5%9B%BE2.png)<br> | ||
|
||
|
||
## 4. 实验体会 | ||
最后一次实验很有难度,看了许久老师给的参考资料,也参考了不少已经上交的同学的代码,最终花了不少时间做出来了。对于andriodstudio的使用还不够熟悉, | ||
在全是英文的软件上一旦操作失误,就得花时间去研究恢复的方法。 |