實驗目的
一、Android Studio的安裝測試
二、Activity測試
三、UI測試
四、布局測試
五、事件處理測試
一.Android Stuidio的安裝測試: 參考《Java和Android開發學習指南(第二版)(EPUBIT,Java for Android 2nd)》第二十四章:
- 參考http://www.cnblogs.com/rocedu/p/6371315.html#SECANDROID,安裝 Android Stuidio
- 完成Hello World, 要求修改res目錄中的內容,Hello World后要顯示自己的學號,自己學號前后一名同學的學號,提交代碼運行截圖和碼云Git鏈接,截圖沒有學號要扣分
- 學習Android Stuidio調試應用程序
在activity_main.xml中進行修改:
代碼:
`<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayoutxmlns: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=".MainActivity"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginEnd="80dp"android:layout_marginRight="80dp"android:text="Hello 20175235 20175236 20175234"app:layout_constraintBottom_toBottomOf="parent"app:layout_constraintEnd_toEndOf="parent"app:layout_constraintLeft_toLeftOf="parent"app:layout_constraintRight_toRightOf="parent"app:layout_constraintTop_toTopOf="parent"tools:text="Hello World!20175235 20175236 20175234" /></android.support.constraint.ConstraintLayout>
二.Activity測試: 參考《Java和Android開發學習指南(第二版)(EPUBIT,Java for Android 2nd)》第二十五章:
- 構建項目,運行教材相關代碼
- 創建 ThirdActivity, 在ThirdActivity中顯示自己的學號,修改代碼讓MainActivity啟動ThirdActivity
- 提交代碼運行截圖和碼云Git鏈接,截圖要有學號水印,否則會扣分
三.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鏈接,截圖要有學號水印,否則會扣分