




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、基于Android的揚州大學系統軟件揚州大學信息工程學院基于Android的揚州大學APP姓名:滕玲 班級:物聯1301 學號:131408119 日期:2015.12.10 目 錄一、系統設計31.1系統名稱31.2系統總體功能3二、系統開發及運行環境3三、創建項目3四、系統界面及程序主要代碼64.1系統主頁64.2學校概況104.3學院部門114.4招生就業12五、運行項目14六、將程序安裝到Android手機上15七、設計總結與收獲167.1 常見問題與解決方法167.2 收獲與小結16八、附錄(部分源代碼)16一、 系統設計 1.1 系統名稱 基于安卓的揚州大學APP1.2 系統總體功
2、能 (1) 能夠閱讀關于揚州大學的相關信息 (2) 能打開相關網頁鏈接 (3) 能正常啟動,退出 (4) 能夠在手機上使用該系統二、 系統開發及運行環境 本系統的軟件開發環境及運行環境具體如下:操作系統:Windows 7。JDK環境:Java SE Development KET(JDK) version 6。開發工具:Eclipse 3.7.1+Android 4.0.3。開發語言:Java、XML。數據庫管理軟件:SQLite 3。運行平臺:Windows、Linux各版本。分辨率:最佳效果1024×768像素。三、 創建項目(1)啟動Ecl
3、ipse,在菜單欄中依次選擇“文件”/“新建”/Android Project命令。 (2)彈出New Android Project窗口中,首先輸入項目名稱YDAPP,并選擇項目存放路徑,然后單擊“下一步”按鈕,進入Select Build Target界面,從中選擇Android版本。 (3)單擊“下一步”按鈕,進入Application Info界面。(4)單擊“完成”按鈕。四、 系統界面及程序主要代碼4.1 系統主頁<?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 學校概況<?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 學院部門<?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 招生就業<?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>五、 運行項目模塊設計及代碼編寫完成之后,單擊Eclipse開發工具的工具欄中的運行鍵,或者在菜單欄中選擇“運行”/“運行”命令,運行該項目,顯示揚州大學APP登錄窗口,如下圖所示
36、。進入揚大APP的主窗體,然后用戶可以單擊主窗體中的各個功能圖標,以便調用其各個子模塊。例如,在主窗體中單擊“校園文化”按鈕,顯示校園文化的相關內容,如下圖所示。該窗口中,用戶可以打開相應的網頁。六、 將程序安裝到Android手機上使用adb命令將此軟件安裝到Android模擬器的步驟如下:(1) 開發完揚大系統軟件后,在Eclipse中運行該程序,會在項目文件的bin文件下自動生成一個apk文件,如圖,將該文件復制到AndroidSDK安裝路徑下的platform-tools文件夾中。(2) 在“開始”菜單中打開cmd命令提示窗口,首先把路徑切換到Android SDK安裝路徑的platf
37、orm-tools文件夾,然后使用adb install命令將YDAPP.apk文件夾安裝到Android模擬器上。如果要將文件安裝到SD卡,則使用adb install-s命令,如圖、(3) 安裝成功后,顯示Success成功信息,打開Android模擬器,可以看到安裝的揚州大學系統軟件,如圖所示。七、 設計總結與收獲7.1 常見問題與解決方法(1)問題描述:我有一款HTC的智能手機,為什么下載安裝該程序后無法運行?解決方法:該錯誤是由于Android版本低造成的,由于家庭理財通系統使用的是Android 4.0版本開發的,所以需要在裝有Android 4.0以上版本的手機上運行,你可以聯系
38、供應商升級Android到最新版本,然后再安裝使用。 (2)問題描述:在Eclipse開發環境中修改完代碼,重新運行程序時,出現如下圖所示的錯誤提示。 解決方法:該錯誤是由于Android版本低造成的,由于家庭理財通系統使用的是Android 4.0版本開發的,所以需要在裝有Android 4.0以上版本的手機上運行,你可以聯系供應商升級Android到最新版本,然后再安裝使用。7.2 收獲與小結在此次課程設計中,我不僅了解到了android的有關知識,而且學習了Java語言以及eclipse等硬件環境。有幾點需要特別注意:(1) 要明確課程設計的要求,想好系統應該包含哪些功能模塊。否則,在軟
39、件設計的后期,再想添加新的功能就需要花費大量的時間。(2) 要對android系統有一定的了解。在軟件設計過程中,大量的用到了android系統的四大組件:Activity(提供可視化的界面)、Service(運行在后臺的服務程序)、Broadcast Receiver(廣播事件處理機制)、Content Provider(使應用程序相互訪問數據)。只有對這些組件熟練掌握后,才能夠真正設計出穩健搞笑的多媒體播放器。(3) 要對Java語言熟練掌握。Android軟件開發都是用Java語言寫的,而Java又是由類組成的。而Java語言本身又含有眾多機制,只有深刻理解這些機制后,才能輕松地實現自己
40、想要的功能。(4) 要對界面設計有一定的了解。Android所有的布局都放在了res/layout中,而所有的菜單選項都放在了res/menu中。(5) 要具備快速上網查資料的能力。網上的很多現成的資料都可借鑒、學習。在熟練理解了別人的應用程序的基礎上,再做二次開發。八、 附錄(部分源代碼)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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 機關公文寫作與處理7
- 2024融合大語言模型DeepSeek技術新人音版音樂一年級下冊(趙季平主編)《第一單元 春天》( 唱歌 布谷 小雨沙沙 演奏 沙錘 三角鐵)(計劃一課時)教學設計2022課標
- 實 踐 調研我國造船與航海方面的成就(教學設計)-2024-2025學年滬科版物理八年級下冊
- 駕駛員安全文明駕駛培訓會
- 督查考核年終匯報(街道委員會)
- 房產按揭借款合同標準格式
- 南京物業管理合同2025
- 協議書通信設備協議書合同樣本
- 醫院客戶服務培訓
- 高強度鑄件生產合同范本
- 2024年遼寧高考地理真題試題(原卷版+含解析)
- 第16課 經濟危機與資本主義國家的應對(課件)-【中職專用】《世界歷史》(同課異構)(高教版2023基礎模塊)
- 廣州市白云區金廣實驗學校2022-2023學年七年級下學期期中考試英語試題
- HJ 997-2018 土壤和沉積物 醛、酮類化合物的測定 高效液相色譜法(正式版)
- 俄羅斯介紹模板
- 50以內加減法練習題
- 全民國家安全教育日培訓課件模板(可編輯)
- 江蘇省鹽城市建湖縣2023-2024學年七年級下學期期中語文試題
- 印刷廠常用生產工藝、設備作業指導書一整套
- 小班語言《輕輕地》課件
- 甘肅省農墾集團有限責任公司人才招聘考試試題及答案
評論
0/150
提交評論