Skip to content

Commit

Permalink
Merge pull request #1727 from hzutanziyang/master
Browse files Browse the repository at this point in the history
第四次实验
  • Loading branch information
zengsn authored May 9, 2018
2 parents 08e5d39 + 869b5f5 commit 73204cd
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_soft1614080902227);
Button btn_Click = (Button)findViewById(R.id.Air);
Button btn_Click1 = (Button)findViewById(R.id.TV);
Button btn_Click2 = (Button)findViewById(R.id.add);
btn_Click.setOnClickListener(new MyOnClickListener());
btn_Click1.setOnClickListener(new MyOnClickListener1());

}
class MyOnClickListener implements View.OnClickListener{
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,29 @@
android:orientation="vertical"

>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="@color/colorPrimaryDark"
android:orientation="horizontal">
<Button
android:id="@+id/add"
android:layout_width="40dp"
android:layout_height="40dp"
android:text="+"
android:textColor="#ffff"
android:layout_marginLeft="20dp"
android:background="@color/colorPrimaryDark"
android:textSize="20dp" />
<TextView
android:layout_height="40dp"
android:layout_width="200dp"
android:layout_marginLeft="20dp"
android:text="万能遥控"
android:textSize="20dp"
android:gravity="center"
android:textColor="#ffff"/>
</LinearLayout>

<Button
android:id="@+id/Air"
Expand Down
21 changes: 21 additions & 0 deletions soft1614080902227/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="AppTheme.NoActionBar">

<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

</resources>
17 changes: 3 additions & 14 deletions soft1614080902227/report2.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,12 @@

## 实验步骤

1.阅读实验要求:https://github.com/hzuapps/android-labs-2018/labels/Lab
1.在电脑上打开Android Studio编写代码

2.在电脑上Android Studio编写代码 // 代码要可以运行!
2.使用Git将代码提交到自己的库中

3.使用Git将代码提交到自己的库中:https://github.com/YOUR_NAME/android-labs-2018
3.在网页写实验报告

$ git pull

$ git add 学号目录/*

$ git commit "#2 #880 第二次实验 "

$ git push

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

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

## 实验结果
修改了app的名字
Expand Down
8 changes: 4 additions & 4 deletions soft1614080902227/report3.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
5 点击图片(或按钮)时,打开另一个Activity。
## 2. 实验步骤

1 统一步骤:
https://github.com/hzuapps/android-labs-2018/blob/master/labs-steps.md
2 Android 在TextView 中显示图片的4种方式:
https://blog.csdn.net/u012724237/article/details/79010741
1   在XML文件中添加ImatageButton,然后添加属性text、drawable等属性

2   在Activity代码中添加按钮监听事件,设置点击后跳转到下一个Activity

3   创建第二个Activity,通过intent传递信息,实现跳转

## 3. 实验结果
### 点击App打开第一个Activity,开始界面添加了两个Button
Expand Down
18 changes: 18 additions & 0 deletions soft1614080902227/report4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 第四次实验
Android界面设计编程
## 1. 实验目标
1.根据选题要求设计界面布局及控件使用;
2.布局xml及界面控制操作代码提交并截图;
3.将应用运行结果截图。
## 2. 实验步骤

1 将标题去掉

2 在XML文件中添加了新的布局linearlayout,然后添加TextView来充当标题

3 新添加了几个按钮控件

## 3. 实验结果
![screen](https://github.com/hzutanziyang/android-labs-2018/blob/master/soft1614080902227/%E7%AC%AC%E5%9B%9B%E6%AC%A1%E5%AE%9E%E9%AA%8C%E6%88%AA%E5%9B%BE.jpg)
## 4.实验体会
这次实验主要修改了标题,通过新加的布局linearlayout,添加TextView控件,实现上次实验没能完成标题居中的问题。。
Binary file added soft1614080902227/第四次实验截图.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 73204cd

Please sign in to comment.