Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2 #999 第二次实验-绿色音乐播放器 #1078

Merged
merged 6 commits into from
Apr 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package edu.hzuapps.androidlabs.soft1614080902427;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class Soft1614080902427Activity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_soft1614080902427);
}
}

22 changes: 22 additions & 0 deletions soft1614080902427/manifests/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.hzuapps.androidlabs.soft1614080902427">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".Soft1614080902427Activity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

42 changes: 42 additions & 0 deletions soft1614080902427/report2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 第二次实验

## 1. 实验目标

1. 阅读实验要求:https://github.com/hzuapps/android-labs-2018/labels/Lab

2. 在电脑上Android Studio编写代码

```
// 代码要可以运行!
```

3. 使用Git将代码提交到自己的库中:https://github.com/YOUR_NAME/android-labs-2018
```
$ git pull
$ git add 学号目录/*
$ git commit "#12345678 "
$ git push
```

4. 在自己的GitHub库上创建和发送Pull Request(注意查看Changed files)
```
// 是否只修改了自己的文件?
```

5. 在GitHub中使用Markdown文件编写实验报告(report1.md, report2.md)
```
// 保存在自己的文件夹下
```

## 2. 实验步骤
1. 打开Android Studio 并且新建项目,把项目默认包名改成实验所要求的 `edu.hzuapps.androidlabs.soft123456`
2. 新建一个 Empty Activity,把 Activity 名称改成 `Soft123456Activity`
3. 修改 `res/string.xml` 里的 app_name 的值为我自己的应用名
4. 点击上方绿色的"Run",启动虚拟机运行应用

## 3. 实验结果

![截图](https://github.com/harytfw/android-labs-2018/blob/master/soft1614080902427/simulator.jpg)
## 4. 实验体会
这次实验比较简单,主要是在项目刚建立的时候需要等待插件下载,比较费时。运行App需要新建虚拟机,而新建虚拟机又要下载新的东西,又要耗费很多时间。
而且安卓App和一般的java程序不同,没有main函数。
21 changes: 21 additions & 0 deletions soft1614080902427/res/layout/activity_soft1614080902427.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@


<?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="edu.hzuapps.androidlabs.soft1614080902427.Soft1614080902427Activity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>

4 changes: 4 additions & 0 deletions soft1614080902427/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<resources>
<string name="app_name">绿色音乐播放器</string>
</resources>

Binary file added soft1614080902427/simulator.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.