20155220 实验四 Android开发基础
2017-05-21 09:58
295 查看
20155220 实验四 Android开发基础
实验内容
(一)Android Stuidio的安装测试: 参考《Java和Android开发学习指南(第二版)(EPUBIT,Java for Android 2nd)》第二十四章:
安装 Android Stuidio完成Hello World, 要求修改res目录中的内容,Hello World后要显示自己的学号,提交代码运行截图和码云Git链接,截图没有学号要扣分
学习Android Stuidio调试应用程序
运行截图为:
实验使用的xml文件为
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="com.example.ljq.helloworld.MainActivity"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!20155220 " app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.050000012" app:layout_constraintHorizontal_bias="0.5" /> </android.support.constraint.ConstraintLayout>
(二)Activity测试: 参考《Java和Android开发学习指南(第二版)(EPUBIT,Java for Android 2nd)》第二十五章:
构建项目,运行教材相关代码创建 ThirdActivity, 在ThirdActivity中显示自己的学号,修改代码让MainActivity启动ThirdActivity
提交代码运行截图和码云Git链接,截图要有学号水印,否则会扣分
ThirdActivity的代码为:
package com.example.ljq.myapplication; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Menu; import android.widget.TextView; public class ThirdActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_third); Intent intent = getIntent(); String message = intent.getStringExtra("message"); ((TextView) findViewById(R.id.textView1)).setText(message); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_third, menu); return true; } }
(三)UI测试: 参考《Java和Android开发学习指南(第二版)(EPUBIT,Java for Android 2nd)》第二十六章:
构建项目,运行教材相关代码修改代码让Toast消息中显示自己的学号信息
提交代码运行截图和码云Git链接,截图要有学号水印,否则会扣分
运行截图为:
码云链接
(四)布局测试: 参考《Java和Android开发学习指南(第二版)(EPUBIT,Java for Android 2nd)》第二十七章:
构建项目,运行教材相关代码修改布局让P290页的界面与教材不同
提交代码运行截图和码云Git链接,截图要有学号水印,否则会扣分
运行截图为:
码云链接
(五)事件处理测试: 参考《Java和Android开发学习指南(第二版)(EPUBIT,Java for Android 2nd)》第二十八章:
构建项目,运行教材相关代码提交代码运行截图和码云Git链接,截图要有学号水印,否则会扣分
运行截图为:
码云链接
相关文章推荐
- 20145208 实验四 Android开发基础
- 20145337实验四Android开发基础
- 2016-2017-2 20155302 实验四 Android 开发基础
- 20155305 2016-2017-2 《Java程序设计》实验四 Android程序开发基础
- 20155219实验四 Android开发基础设计实验报告
- 20145219 《Java程序设计》实验四 Android开发基础设计实验报告
- 20155228 实验四 Android开发基础
- 20155226 实验四 Android开发基础
- 20155233 《Java程序设计》实验四 Android开发基础
- 20155235 《Java程序设计》 实验四 Android开发基础
- 20145221 《Java程序设计》实验报告四:Android开发基础
- 20145213 《Java程序设计》实验四 Android开发基础
- #实验四 Android开发基础
- 实验四android开发基础
- 20145214实验四 Android开发基础
- 20145211 《Java程序设计》实验报告四: Android开发基础
- 20145331实验四 "Android开发基础"
- 20145239 杜文超 实验四 Android开发基础
- 20155324 《Java程序设计》实验四 Android开发基础
- 20155308 实验四 Android开发基础