




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、基于Android的揚(yáng)州大學(xué)系統(tǒng)軟件揚(yáng)州大學(xué)信息工程學(xué)院基于Android的揚(yáng)州大學(xué)APP姓名:滕玲 班級:物聯(lián)1301 學(xué)號:131408119 日期:2015.12.10 目 錄一、系統(tǒng)設(shè)計31.1系統(tǒng)名稱31.2系統(tǒng)總體功能3二、系統(tǒng)開發(fā)及運(yùn)行環(huán)境3三、創(chuàng)建項目3四、系統(tǒng)界面及程序主要代碼64.1系統(tǒng)主頁64.2學(xué)校概況104.3學(xué)院部門114.4招生就業(yè)12五、運(yùn)行項目14六、將程序安裝到Android手機(jī)上15七、設(shè)計總結(jié)與收獲167.1 常見問題與解決方法167.2 收獲與小結(jié)16八、附錄(部分源代碼)16一、 系統(tǒng)設(shè)計 1.1 系統(tǒng)名稱 基于安卓的揚(yáng)州大學(xué)APP1.2 系統(tǒng)總體功
2、能 (1) 能夠閱讀關(guān)于揚(yáng)州大學(xué)的相關(guān)信息 (2) 能打開相關(guān)網(wǎng)頁鏈接 (3) 能正常啟動,退出 (4) 能夠在手機(jī)上使用該系統(tǒng)二、 系統(tǒng)開發(fā)及運(yùn)行環(huán)境 本系統(tǒng)的軟件開發(fā)環(huán)境及運(yù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。運(yùn)行平臺:Windows、Linux各版本。分辨率:最佳效果1024×768像素。三、 創(chuàng)建項目(1)啟動Ecl
3、ipse,在菜單欄中依次選擇“文件”/“新建”/Android Project命令。 (2)彈出New Android Project窗口中,首先輸入項目名稱YDAPP,并選擇項目存放路徑,然后單擊“下一步”按鈕,進(jìn)入Select Build Target界面,從中選擇Android版本。 (3)單擊“下一步”按鈕,進(jìn)入Application Info界面。(4)單擊“完成”按鈕。四、 系統(tǒng)界面及程序主要代碼4.1 系統(tǒng)主頁<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xm
4、lns:android=" android:layout_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&qu
5、ot; android:layout_height="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_marginLef
6、t="33dp" android:layout_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_
7、content" android:layout_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="
8、onclick" android:text="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_margin
9、Top="100dp" android: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=&q
10、uot;wrap_content" android: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="+
11、id/szdw" android:layout_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
12、="#00000000" android: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_margin
13、Left="10dp" android: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="
14、;wrap_content" android:layout_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/h
15、zjl" /><Button android: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_toRig
16、htOf="+id/hzjl" android: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_belo
17、w="+id/xkky" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_toRightOf="+id/xyfw" android:background="#00000000" android:onClick="onclick" android:text="string/xywh" /><ImageButton android:i
18、d="+id/xigk" android: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
19、" android:layout_width="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:layo
20、ut_width="wrap_content" 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
21、_content" android:layout_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" a
22、ndroid:layout_height="wrap_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="
23、;wrap_content" android:layout_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
24、:layout_alignTop="+id/rczp" 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="
25、;+id/xyfw" android:layout_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_heig
26、ht="fill_parent" android:scrollbars="vertical" android:fadingEdge="vertical"> <LinearLayout xmlns:android=" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:backgroun
27、d="color/white"><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="
28、wrap_content" /><TextView 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" encod
29、ing="utf-8"?><ScrollView xmlns:android=" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scrollbars="vertical" android:fadingEdge="vertical"> <LinearLayout xmlns:android=" android:orientation="
30、;vertical" android:layout_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" /&
31、gt; <ImageView android:id="+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" andro
32、id:textColor="color/black" /></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=
33、"vertical" android:fadingEdge="vertical"> <LinearLayout xmlns:android=" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="color/white" > <WebView and
34、roid:id="+id/webView3" 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
35、:id="+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="color/black" /></LinearLayout></ScrollView>五、 運(yùn)行項目模塊設(shè)計及代碼編寫完成之后,單擊Eclipse開發(fā)工具的工具欄中的運(yùn)行鍵,或者在菜單欄中選擇“運(yùn)行”/“運(yùn)行”命令,運(yùn)行該項目,顯示揚(yáng)州大學(xué)APP登錄窗口,如下圖所示
36、。進(jìn)入揚(yáng)大APP的主窗體,然后用戶可以單擊主窗體中的各個功能圖標(biāo),以便調(diào)用其各個子模塊。例如,在主窗體中單擊“校園文化”按鈕,顯示校園文化的相關(guān)內(nèi)容,如下圖所示。該窗口中,用戶可以打開相應(yīng)的網(wǎng)頁。六、 將程序安裝到Android手機(jī)上使用adb命令將此軟件安裝到Android模擬器的步驟如下:(1) 開發(fā)完揚(yáng)大系統(tǒng)軟件后,在Eclipse中運(yùn)行該程序,會在項目文件的bin文件下自動生成一個apk文件,如圖,將該文件復(fù)制到AndroidSDK安裝路徑下的platform-tools文件夾中。(2) 在“開始”菜單中打開cmd命令提示窗口,首先把路徑切換到Android SDK安裝路徑的platf
37、orm-tools文件夾,然后使用adb install命令將YDAPP.apk文件夾安裝到Android模擬器上。如果要將文件安裝到SD卡,則使用adb install-s命令,如圖、(3) 安裝成功后,顯示Success成功信息,打開Android模擬器,可以看到安裝的揚(yáng)州大學(xué)系統(tǒng)軟件,如圖所示。七、 設(shè)計總結(jié)與收獲7.1 常見問題與解決方法(1)問題描述:我有一款HTC的智能手機(jī),為什么下載安裝該程序后無法運(yùn)行?解決方法:該錯誤是由于Android版本低造成的,由于家庭理財通系統(tǒng)使用的是Android 4.0版本開發(fā)的,所以需要在裝有Android 4.0以上版本的手機(jī)上運(yùn)行,你可以聯(lián)系
38、供應(yīng)商升級Android到最新版本,然后再安裝使用。 (2)問題描述:在Eclipse開發(fā)環(huán)境中修改完代碼,重新運(yùn)行程序時,出現(xiàn)如下圖所示的錯誤提示。 解決方法:該錯誤是由于Android版本低造成的,由于家庭理財通系統(tǒng)使用的是Android 4.0版本開發(fā)的,所以需要在裝有Android 4.0以上版本的手機(jī)上運(yùn)行,你可以聯(lián)系供應(yīng)商升級Android到最新版本,然后再安裝使用。7.2 收獲與小結(jié)在此次課程設(shè)計中,我不僅了解到了android的有關(guān)知識,而且學(xué)習(xí)了Java語言以及eclipse等硬件環(huán)境。有幾點需要特別注意:(1) 要明確課程設(shè)計的要求,想好系統(tǒng)應(yīng)該包含哪些功能模塊。否則,在軟
39、件設(shè)計的后期,再想添加新的功能就需要花費大量的時間。(2) 要對android系統(tǒng)有一定的了解。在軟件設(shè)計過程中,大量的用到了android系統(tǒng)的四大組件:Activity(提供可視化的界面)、Service(運(yùn)行在后臺的服務(wù)程序)、Broadcast Receiver(廣播事件處理機(jī)制)、Content Provider(使應(yīng)用程序相互訪問數(shù)據(jù))。只有對這些組件熟練掌握后,才能夠真正設(shè)計出穩(wěn)健搞笑的多媒體播放器。(3) 要對Java語言熟練掌握。Android軟件開發(fā)都是用Java語言寫的,而Java又是由類組成的。而Java語言本身又含有眾多機(jī)制,只有深刻理解這些機(jī)制后,才能輕松地實現(xiàn)自己
40、想要的功能。(4) 要對界面設(shè)計有一定的了解。Android所有的布局都放在了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.v
41、iew.View;import android.view.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 b
42、utton5 = null;Button button6 = 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.setOnClick
43、Listener(new Button.OnClickListener() 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
44、 v) Intent intent = new Intent(); 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
45、.this,Zsjyactivity.class); startActivity(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 Butto
溫馨提示
- 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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 醫(yī)院等級評審專項練習(xí)卷含答案
- 2025衛(wèi)生資格考試政策解讀與試題及答案
- 重癥哮喘急診診療規(guī)范
- 平方差公式與因式分解:精美課件展示與教學(xué)策略分享
- 安全生產(chǎn)法規(guī)培訓(xùn)課件:深入了解行業(yè)法規(guī)與實踐操作
- 建筑施工安全管理與應(yīng)急預(yù)案課件
- 小學(xué)重陽節(jié)教學(xué)課件
- 粉塵涉爆安全培訓(xùn)
- 高級審計師考試數(shù)據(jù)分析試題及答案
- 小學(xué)科學(xué)課件:日歷與時間管理
- 北師大版八年級數(shù)學(xué)上冊一次函數(shù)《一次函數(shù)中的三角形面積 》教學(xué)課件
- 科技企業(yè)研發(fā)流程的精益化管理
- 《中央空調(diào)原理與維護(hù)》課件
- 石油化工壓力管道安裝工藝及質(zhì)量控制重點
- 質(zhì)量管理科提高醫(yī)療質(zhì)量安全不良事件報告率PDCA
- 2025-2030年中國電力勘察設(shè)計行業(yè)現(xiàn)狀分析規(guī)劃研究報告新版
- DB31-T 1385-2022 科技成果分類評價和價值潛力評價規(guī)范
- 骨科股骨頸骨折“一病一品”成果匯報
- 《大禹治水的故事》課本劇劇本:感受英雄力量領(lǐng)略堅韌精神(6篇)
- 2018年高考英語全國一卷(精校+答案+聽力原文)
- 管道直飲水項目可行性研究報告
評論
0/150
提交評論