




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
1、揚州大學(xué)信息工程學(xué)院基于android的揚州大學(xué)app姓名: 班級:物聯(lián)1301 學(xué)號: 日期:2015.12.10 目 錄一、系統(tǒng)設(shè)計31.1系統(tǒng)名稱31.2系統(tǒng)總體功能3二、系統(tǒng)開發(fā)及運行環(huán)境3三、創(chuàng)建項目3四、系統(tǒng)界面及程序主要代碼64.1系統(tǒng)主頁64.2學(xué)校概況104.3學(xué)院部門114.4招生就業(yè)12五、運行項目14六、將程序安裝到android手機上15七、設(shè)計總結(jié)與收獲167.1 常見問題與解決方法167.2 收獲與小結(jié)16八、附錄(部分源代碼)16一、 系統(tǒng)設(shè)計 1.1 系統(tǒng)名稱 基于安卓的揚州大學(xué)app1.2 系統(tǒng)總體功能 (1) 能夠閱讀關(guān)于揚州大學(xué)的相關(guān)信息
2、160; (2) 能打開相關(guān)網(wǎng)頁鏈接 (3) 能正常啟動,退出 (4) 能夠在手機上使用該系統(tǒng)二、 系統(tǒng)開發(fā)及運行環(huán)境 本系統(tǒng)的軟件開發(fā)環(huán)境及運行環(huán)境具體如下:操作系統(tǒng):windows 7。jdk環(huán)境:java se development ket(jdk) version 6。開發(fā)工具:eclipse 3.7.1+android 4.0.3。開發(fā)語言:java、xml。數(shù)據(jù)庫管理軟件:sqlite 3。運行平臺:windows、linux各版本。分辨率:最佳效果1024×768像素。三、 創(chuàng)建項目(1)啟動eclipse,在菜單欄中依次選擇“文件”/“新建”/andro
3、id project命令。 (2)彈出new android project窗口中,首先輸入項目名稱ydapp,并選擇項目存放路徑,然后單擊“下一步”按鈕,進入select build target界面,從中選擇android版本。 (3)單擊“下一步”按鈕,進入application info界面。(4)單擊“完成”按鈕。四、 系統(tǒng)界面及程序主要代碼4.1 系統(tǒng)主頁<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android=" android:la
4、yout_width="wrap_content" android:layout_height="wrap_content" android:background="drawable/background" android:orientation="vertical" > <imageview android:id="+id/ydxhimg" android:layout_width="wrap_content" android:layout_height=&qu
5、ot;wrap_content" android:layout_marginleft="30dp" android:src="drawable/logo28" /> <button android:id="+id/xxgk" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="33dp" android:la
6、yout_marginright="10dp" android:layout_margintop="100dp" android:background="#00000000" android:onclick="onclick" android:text="string/xxgk" /><button android:id="+id/xybm" android:layout_width="wrap_content" android:layout_
7、height="wrap_content" android:layout_marginleft="10dp" android:layout_marginright="10dp" android:layout_margintop="100dp" android:layout_torightof="+id/xxgk" android:background="#00000000" android:onclick="onclick" android:text=&q
8、uot;string/xybm" /><button android:id="+id/zsjy" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="10dp" android:layout_marginright="10dp" android:layout_margintop="100dp" android
9、:layout_torightof="+id/xybm" android:background="#00000000" android:onclick="onclick" android:text="string/zsjy" /><button android:id="+id/rcpy" android:layout_width="wrap_content" android:layout_height="wrap_content" androi
10、d:layout_below="+id/xxgk" android:layout_marginleft="33dp" android:layout_marginright="10dp" android:background="#00000000" android:onclick="onclick" android:text="string/rcpy" /><button android:id="+id/szdw" android:layout_
11、width="wrap_content" android:layout_height="wrap_content" android:layout_below="+id/xybm" android:layout_marginleft="10dp" android:layout_marginright="10dp" android:layout_torightof="+id/rcpy" android:background="#00000000" androi
12、d:onclick="onclick" android:text="string/szdw" /><button android:id="+id/xkky" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="+id/zsjy" android:layout_marginleft="10dp" android
13、:layout_marginright="10dp" android:layout_torightof="+id/szdw" android:background="#00000000" android:onclick="onclick" android:text="string/xkky" /><button android:id="+id/hzjl" android:layout_width="wrap_content" android:l
14、ayout_height="wrap_content" android:layout_below="+id/rcpy" android:layout_marginleft="33dp" android:layout_marginright="10dp" android:background="#00000000" android:onclick="onclick" android:text="string/hzjl" /><button and
15、roid:id="+id/xyfw" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="+id/szdw" android:layout_marginleft="10dp" android:layout_marginright="10dp" android:layout_torightof="+id/hzjl" and
16、roid:background="#00000000" android:onclick="onclick" android:text="string/xyfw" /><button android:id="+id/xywh" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="+id/xkky" androi
17、d:layout_marginleft="10dp" android:layout_marginright="10dp" android:layout_torightof="+id/xyfw" android:background="#00000000" android:onclick="onclick" android:text="string/xywh" /><imagebutton android:id="+id/xigk" androi
18、d:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="+id/ydxhimg" android:layout_alignparentbottom="true" android:src="drawable/img04" /><imagebutton android:id="+id/ydxl" android:layout_width=&
19、quot;wrap_content" android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:layout_torightof="+id/xigk" android:src="drawable/img03" /><imagebutton android:id="+id/bgxt" android:layout_width="wrap_content&q
20、uot; android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:layout_torightof="+id/ydxl" android:src="drawable/img08" /><imagebutton android:id="+id/bgxt" android:layout_width="wrap_content" android:layout
21、_height="wrap_content" android:layout_alignparentbottom="true" android:layout_torightof="+id/ydxhimg" android:src="drawable/img01" /><imagebutton android:id="+id/rczp" android:layout_width="wrap_content" android:layout_height="wr
22、ap_content" android:layout_above="+id/xigk" android:layout_alignright="+id/ydxl" android:src="drawable/img02" /><imagebutton android:id="+id/bgxt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:l
23、ayout_above="+id/xigk" android:layout_alignleft="+id/xigk" android:src="drawable/img06" /><imagebutton android:id="+id/bgxt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_aligntop="+id/rc
24、zp" android:layout_torightof="+id/xyfw" android:src="drawable/img05" /><imagebutton android:id="+id/bgxt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignright="+id/xyfw" android:layou
25、t_aligntop="+id/rczp" android:src="drawable/img07" /></relativelayout>4.2 學(xué)校概況<?xml version="1.0" encoding="utf-8"?><scrollview xmlns:android=" android:layout_width="fill_parent" android:layout_height="fill_parent" an
26、droid:scrollbars="vertical" android:fadingedge="vertical"> <linearlayout xmlns:android=" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="color/white">
27、<webview android:id="+id/webview1" android:layout_width="match_parent" android:layout_height="match_parent" /> <imageview android:id="+id/imgview1" android:layout_width="wrap_content" android:layout_height="wrap_content" /><t
28、extview android:id="+id/textview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textcolor="color/black" /></linearlayout></scrollview>4.3 學(xué)院部門<?xml version="1.0" encoding="utf-8"?><
29、;scrollview xmlns:android=" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scrollbars="vertical" android:fadingedge="vertical"> <linearlayout xmlns:android=" android:orientation="vertical" android:layou
30、t_width="match_parent" android:layout_height="match_parent" android:background="color/white" > <webview android:id="+id/webview2" android:layout_width="match_parent" android:layout_height="match_parent" /> <imageview android:id=
31、"+id/imgview2" android:layout_width="wrap_content" android:layout_height="wrap_content" /><textview android:id="+id/textview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textcolor="color/blac
32、k" /></linearlayout></scrollview>4.4 招生就業(yè)<?xml version="1.0" encoding="utf-8"?><scrollview xmlns:android=" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scrollbars="vertical" android:
33、fadingedge="vertical"> <linearlayout xmlns:android=" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="color/white" > <webview android:id="+id/webview3&qu
34、ot; android:layout_width="match_parent" android:layout_height="match_parent" /> <imageview android:id="+id/imgview3" android:layout_width="wrap_content" android:layout_height="wrap_content" /><textview android:id="+id/textview1"
35、 android:layout_width="wrap_content" android:layout_height="wrap_content" android:textcolor="color/black" /></linearlayout></scrollview>五、 運行項目模塊設(shè)計及代碼編寫完成之后,單擊eclipse開發(fā)工具的工具欄中的運行鍵,或者在菜單欄中選擇“運行”/“運行”命令,運行該項目,顯示揚州大學(xué)app登錄窗口,如下圖所示。進入揚大app的主窗體,然后用戶可以單擊主窗體中的各個功
36、能圖標(biāo),以便調(diào)用其各個子模塊。例如,在主窗體中單擊“校園文化”按鈕,顯示校園文化的相關(guān)內(nèi)容,如下圖所示。該窗口中,用戶可以打開相應(yīng)的網(wǎng)頁。六、 將程序安裝到android手機上使用adb命令將此軟件安裝到android模擬器的步驟如下:(1) 開發(fā)完揚大系統(tǒng)軟件后,在eclipse中運行該程序,會在項目文件的bin文件下自動生成一個apk文件,如圖,將該文件復(fù)制到androidsdk安裝路徑下的platform-tools文件夾中。(2) 在“開始”菜單中打開cmd命令提示窗口,首先把路徑切換到android sdk安裝路徑的platform-tools文件夾,然后使用adb install命
37、令將ydapp.apk文件夾安裝到android模擬器上。如果要將文件安裝到sd卡,則使用adb install-s命令,如圖、(3) 安裝成功后,顯示success成功信息,打開android模擬器,可以看到安裝的揚州大學(xué)系統(tǒng)軟件,如圖所示。七、 設(shè)計總結(jié)與收獲7.1 常見問題與解決方法(1)問題描述:我有一款htc的智能手機,為什么下載安裝該程序后無法運行?解決方法:該錯誤是由于android版本低造成的,由于家庭理財通系統(tǒng)使用的是android 4.0版本開發(fā)的,所以需要在裝有android 4.0以上版本的手機上運行,你可以聯(lián)系供應(yīng)商升級android到最新版本,然后再安裝使用。 (2
38、)問題描述:在eclipse開發(fā)環(huán)境中修改完代碼,重新運行程序時,出現(xiàn)如下圖所示的錯誤提示。 解決方法:該錯誤是由于android版本低造成的,由于家庭理財通系統(tǒng)使用的是android 4.0版本開發(fā)的,所以需要在裝有android 4.0以上版本的手機上運行,你可以聯(lián)系供應(yīng)商升級android到最新版本,然后再安裝使用。7.2 收獲與小結(jié)在此次課程設(shè)計中,我不僅了解到了android的有關(guān)知識,而且學(xué)習(xí)了java語言以及eclipse等硬件環(huán)境。有幾點需要特別注意:(1) 要明確課程設(shè)計的要求,想好系統(tǒng)應(yīng)該包含哪些功能模塊。否則,在軟件設(shè)計的后期,再想添加新的功能就需要花費大量的時間。(2)
39、 要對android系統(tǒng)有一定的了解。在軟件設(shè)計過程中,大量的用到了android系統(tǒng)的四大組件:activity(提供可視化的界面)、service(運行在后臺的服務(wù)程序)、broadcast receiver(廣播事件處理機制)、content provider(使應(yīng)用程序相互訪問數(shù)據(jù))。只有對這些組件熟練掌握后,才能夠真正設(shè)計出穩(wěn)健搞笑的多媒體播放器。(3) 要對java語言熟練掌握。android軟件開發(fā)都是用java語言寫的,而java又是由類組成的。而java語言本身又含有眾多機制,只有深刻理解這些機制后,才能輕松地實現(xiàn)自己想要的功能。(4) 要對界面設(shè)計有一定的了解。androi
40、d所有的布局都放在了res/layout中,而所有的菜單選項都放在了res/menu中。(5) 要具備快速上網(wǎng)查資料的能力。網(wǎng)上的很多現(xiàn)成的資料都可借鑒、學(xué)習(xí)。在熟練理解了別人的應(yīng)用程序的基礎(chǔ)上,再做二次開發(fā)。八、 附錄(部分源代碼)mainactivity.javapackage ;import android.app.activity;import android.content.intent;import android.os.bundle;import android.view.keyevent;import android.view.view;import android.view.
41、viewgroup;import android.widget.button;import android.widget.progressbar;import android.widget.textview;import android.widget.toast;public class mainactivity extends activity button button1 = null;button button2 = null;button button3 = null;button button4 = null;button button5 = null;button button6
42、= null;button button7 = null;button button8 = null;button button9 = null;private long exittime;public void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.main); button1 = (button)findviewbyid(r.id.xxgk); button1.setonclicklistener(new button.onclickli
43、stener() public void onclick(view v) intent intent = new intent(); intent.setclass(mainactivity.this,xxgkactivity.class); startactivity(intent); ); button2 = (button)findviewbyid(r.id.xybm); button2.setonclicklistener(new button.onclicklistener() public void onclick(view v) intent intent = new inten
44、t(); intent.setclass(mainactivity.this,xybmactivity.class); startactivity(intent); ); button3 = (button)findviewbyid(r.id.zsjy); button3.setonclicklistener(new button.onclicklistener() public void onclick(view v) intent intent = new intent(); intent.setclass(mainactivity.this,zsjyactivity.class); st
45、artactivity(intent); ); button4 = (button)findviewbyid(r.id.rcpy); button4.setonclicklistener(new button.onclicklistener() public void onclick(view v) intent intent = new intent(); intent.setclass(mainactivity.this,rcpyactivity.class); startactivity(intent); ); button5 = (button)findviewbyid(r.id.szdw); button5.setonclicklistener(new button
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 香港科技大學(xué)(廣州)《耳鼻咽喉頭頸外科》2023-2024學(xué)年第一學(xué)期期末試卷
- 佳木斯職業(yè)學(xué)院《文獻(xiàn)學(xué)概論》2023-2024學(xué)年第二學(xué)期期末試卷
- 燕京理工學(xué)院《web技術(shù)》2023-2024學(xué)年第二學(xué)期期末試卷
- 2024-2025學(xué)年陜西省恒口高級中學(xué)高三下學(xué)期綜合模擬考試物理試題含解析
- 永城職業(yè)學(xué)院《安全工程》2023-2024學(xué)年第一學(xué)期期末試卷
- 浙江省杭州十四中2025年高三測試(四)物理試題含解析
- 江西服裝學(xué)院《先進功能材料雙語》2023-2024學(xué)年第二學(xué)期期末試卷
- 寧波幼兒師范高等??茖W(xué)校《營養(yǎng)與食品衛(wèi)生學(xué)2》2023-2024學(xué)年第二學(xué)期期末試卷
- 新疆體育職業(yè)技術(shù)學(xué)院《影視攝影與剪輯技術(shù)》2023-2024學(xué)年第二學(xué)期期末試卷
- 供應(yīng)商設(shè)備預(yù)驗收人員分工
- 幼兒園獲獎公開課:大班語言繪本《好消息壞消息》課件
- 宇樹科技在機器人領(lǐng)域的技術(shù)突破與應(yīng)用
- 《高危作業(yè)培訓(xùn)》課件
- 中央2025年中國科協(xié)所屬單位招聘應(yīng)屆生27人筆試歷年參考題庫附帶答案詳解
- 《義務(wù)教育語文課程標(biāo)準(zhǔn)》2022年修訂版原版
- (精選word)3v3籃球比賽記錄表
- 消費者行為學(xué)課件
- 【小升初】部編版2022-2023學(xué)年四川省綿陽市語文升學(xué)分班考真題專項模擬試卷(04 現(xiàn)代文閱讀)含解析
- 第九-現(xiàn)場勘查課件
- 挖掘機配件名稱大全
- 煙花爆竹危險固體廢棄物綜合利用建設(shè)項目可行性研究報告-甲乙丙資信
評論
0/150
提交評論