Android項目報告書_第1頁
Android項目報告書_第2頁
Android項目報告書_第3頁
Android項目報告書_第4頁
Android項目報告書_第5頁
已閱讀5頁,還剩16頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、項目報告書目錄目錄1一、 概述21.1背景21.2主要功能21.3意義21.4擬采用技術(shù)21.5創(chuàng)新2二、 需求分析32.1功能需求32.2結(jié)構(gòu)32.3流程42.4模型4三、 系統(tǒng)設(shè)計53.1數(shù)據(jù)架構(gòu)設(shè)計53.1.1分類53.1.2收藏53.1.3更多63.1.4返回63.2功能設(shè)計63.2.1歡迎界面自動跳轉(zhuǎn)63.2.2歡迎界面的音效功能73.2.3底部菜單功能73.2.4列表分頁顯示功能83.2.5返回功能83.3界面設(shè)計83.3.1歡迎界面83.3.2主界面93.3.3分類列表界面123.3.4詳情顯示界面143.4數(shù)據(jù)庫設(shè)計183.4.1數(shù)據(jù)庫分析183.4.2數(shù)據(jù)庫設(shè)計183.4.3

2、數(shù)據(jù)表設(shè)計183.5拓展設(shè)計19四、 系統(tǒng)測試194.1測試環(huán)境194.2測試過程描述194.2.1單元測試194.2.2集成測試204.2.3功能測試204.3測試用例204.4測試結(jié)果21一、 概述1.1背景當(dāng)前,是信息化的時代。隨著人們生活水平是不斷提高,信息科技也在發(fā)生日新月異的變化,android手機應(yīng)用程序已經(jīng)成為了人們生活中的一部分。就以本項目來說,我們設(shè)計的是新聞閱讀器,給廣大愛看新聞的人們帶來了方便。1.2主要功能l 歡迎界面l 新聞信息的列表分頁顯示l 新聞的詳情顯示l 菜單的切換和跳轉(zhuǎn)1.3意義新聞行業(yè)已經(jīng)不僅僅可以通過電視、報紙等宣傳訊息,現(xiàn)在是高科技的時代,網(wǎng)上信息傳

3、播的速度要比傳統(tǒng)的通訊快,所以我們采用了android手機開發(fā)的新聞閱讀器可以讓用戶隨時隨地的了解新聞的最新資訊。1.4擬采用技術(shù)1、本項目是以java為基礎(chǔ)、android4.0平臺開發(fā)的一款手機應(yīng)用程序2、本項目采用了sax技術(shù)和json解析技術(shù),解析xml數(shù)據(jù)文件3、本項目運用了非常美觀的ui設(shè)計,給用戶耳目一新的效果體驗。4、同時本項目使用了國際化1.5創(chuàng)新1) 本項目采用了底部菜單和標(biāo)題欄配合使用,使用戶在體驗時操作更加的方便;2) 本項目以綠色為主題,ui設(shè)計大方、有新意,字體搭配協(xié)調(diào);3) 本項目采用了國際化設(shè)計,體現(xiàn)了人機交互的效果。4) 在信息分類界面中,本項目采用了列表形式

4、展現(xiàn)新聞信息,同時還采用了分頁技術(shù);5) 進入歡迎界面時,采用了音效和自動跳轉(zhuǎn)功能;6) 我們還新增了“幫助”欄目,在用戶體驗時更顯人性化。二、 需求分析2.1功能需求Ø 歡迎界面自動跳轉(zhuǎn)Ø 歡迎界面的音效功能Ø 底部菜單功能Ø 列表分頁顯示功能Ø 返回或退出功能2.2結(jié)構(gòu)圖(2.1)模塊結(jié)構(gòu)說明:進入主界面后,底部菜單會顯示出所有的模塊。分類的下級菜單是分類列表,再下一級是詳情頁。收藏的下級菜單是收藏的新聞信息。在更多模塊中,會顯示出一下幾級菜單:關(guān)于、反饋和幫助。返回或退出是在界面跳轉(zhuǎn)時實現(xiàn)的功能,當(dāng)用戶在主界面時點擊返回按鈕將退出整個程序

5、。2.3流程圖(2.2)數(shù)據(jù)流程說明:進入歡迎界面后自動跳轉(zhuǎn)到主界面。同上面結(jié)構(gòu)圖解釋,分為四個模塊。根據(jù)箭頭的指向操作,具體的操作步驟詳見使用說明說。2.4模型圖(2.3)數(shù)據(jù)模型說明:本新聞分為三層數(shù)據(jù),輸入數(shù)據(jù)、可變參數(shù)和輸出數(shù)據(jù)。其中,新聞分類和更多屬于輸入數(shù)據(jù),新聞列表和收藏列表屬于可變參數(shù),新聞信息、收藏信息、關(guān)于、反饋和幫助屬于輸出數(shù)據(jù)。三、 系統(tǒng)設(shè)計3.1數(shù)據(jù)架構(gòu)設(shè)計圖(3.1)總體架構(gòu)3.1.1分類圖(3.2)分類說明:在點擊某一分類后,進入該分類對應(yīng)的分類列表。在此,我們采用了listview布局顯示列表信息,同時設(shè)置了列表的觸發(fā)事件。點擊某一列,便跳轉(zhuǎn)到該分類列表對應(yīng)的信

6、息詳情頁。3.1.2收藏圖(3.3)收藏說明:點擊收藏菜單后出發(fā)菜單界面跳轉(zhuǎn)事件,跳轉(zhuǎn)到對應(yīng)的收藏列表界面,同上分類一樣設(shè)置了分頁顯示。點擊某一列表跳轉(zhuǎn)到該列表對應(yīng)的信息詳情頁。3.1.3更多圖(3.4)更多說明:在更多模塊中,我們提供了關(guān)于、反饋和幫助。這里屬于我們的附加功能。3.1.4返回返回主要是針對界面跳轉(zhuǎn)后返回到上一界面做出的觸發(fā)事件。在主界面中,返回菜單觸發(fā)的是退出主程序事件。3.2功能設(shè)計3.2.1歡迎界面自動跳轉(zhuǎn)進入歡迎界面時,本項目會在兩秒后自動跳轉(zhuǎn)到主界面。詳細代碼如下:package m;import java.util.timer;import java.util.ti

7、mertask;import com.app1.newsreader.newstype_activity;import com.app1.newsreader.r;import android.app.activity;import android.content.intent;import android.media.mediaplayer;import android.os.bundle;import android.os.handler;import android.os.message;import android.view.window;public class wellcome_a

8、ctivity extends activityprivate mediaplayer mp;protected void oncreate(bundle savedinstancestate) this.requestwindowfeature(window.feature_no_title);super.oncreate(savedinstancestate);setcontentview(r.layout.wellcom_activity);timer time=new timer();time.schedule(new timerun(), 2000);mp=mediaplayer.c

9、reate(this, r.raw.tada);mp.start();handler hander=new handler()public void handlemessage(android.os.message msg)switch (msg.what) case 1:intent in=new intent();in.setclass(wellcome_activity.this, newstype_activity.class);startactivity(in);wellcome_activity.this.finish();mp.stop();break;private class

10、 timerun extends timertaskpublic void run() message msg=new message();msg.what=1;hander.sendmessage(msg);3.2.2歡迎界面的音效功能本項目還設(shè)計了多功能的音效設(shè)置,在歡迎界面打開時,會播放音樂。詳細代碼如下:mp=mediaplayer.create(this, r.raw.tada);mp.start();3.2.3底部菜單功能在本項目中,我們?nèi)诵曰脑O(shè)計了底部菜單,方便用戶進行界面跳轉(zhuǎn)。詳細代碼如下:linhome=(linearlayout) findviewbyid(r.id.cd

11、_shouye);linclection=(linearlayout) findviewbyid(r.id.cd_shoucang);linmore=(linearlayout) findviewbyid(r.id.cd_genduo);linexit=(linearlayout) findviewbyid(r.id.cd_fanhui);3.2.4列表分頁顯示功能在分類顯示列表時,我們采用了分頁技術(shù)來加載數(shù)據(jù),大大的提高了數(shù)據(jù)加載的效率。詳細代碼如下:public void onscrollstatechanged(abslistview arg0, int arg1) if(arg0.ge

12、tlastvisibleposition()=newsize-1&&scroll_state_idle=arg1)int nnew=newsize;newsize+=5;if(newsize>=oldsize)newsize=oldsize;for(int i=nnew;i<newsize;i+)newlist.add(mylist.get(i);toast.maketext(newslist_activity.this, "下一頁加載成功!",toast.length_long).show();adp.notifydatasetchanged(

13、);3.2.5返回功能運行程序時,點擊返回可跳轉(zhuǎn)到上一個界面。詳細代碼如下:linexit.setontouchlistener(new goexit();3.3界面設(shè)計3.3.1歡迎界面效果如圖(4.1):3.3.2主界面效果如圖(4.2):詳細布局代碼如下:<?xml version="1.0" encoding="utf-8"?><relativelayout xmlns:android=" android:layout_width="wrap_content" android:layout_heig

14、ht="match_parent" android:background="#ffffff" > <linearlayout android:id="+id/linearlayout1" android:layout_width="fill_parent" android:layout_height="30dp" android:background="drawable/biaoti_beijing" android:orientation="verti

15、cal" > <textview android:id="+id/textview2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textsize="19dp" android:textcolor="#000" android:paddingleft="10dp" android:text="string/zhuye_zhuy

16、e" /> </linearlayout> <linearlayout android:id="+id/linearlayout1" android:layout_width="fill_parent" android:layout_height="100dp" android:layout_margintop="30dp" android:orientation="vertical" ><imageswitcher android:id="

17、;+id/imagswitch" android:layout_height="100dp" android:layout_width="fill_parent" ></imageswitcher> </linearlayout> <linearlayout android:id="+id/linearlayout2" android:layout_width="match_parent" android:layout_height="wrap_content

18、" android:layout_alignparentleft="true" android:layout_below="+id/linearlayout1" android:orientation="vertical" > <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" > <button android:id="+id/z

19、huye_sangxin" android:layout_width="80dp" android:layout_height="wrap_content" android:textcolor="#000" android:textsize="12dp" android:background="drawable/anniu_biejing" android:text="string/zhuye_sangxin" /> <button android:id

20、="+id/zhuye_heimei" android:layout_width="80dp" android:layout_height="wrap_content" android:textcolor="#000" android:textsize="12dp" android:background="drawable/anniu_biejing" android:text="string/zhuye_heimei" /> <button

21、android:id="+id/zhuye_huawei" android:layout_width="80dp" android:layout_height="wrap_content" android:text="string/zhuye_huawei" android:background="drawable/anniu_biejing" android:textsize="12dp" android:textcolor="#000" /> &

22、lt;button android:id="+id/zhuye_weiruan" android:layout_width="80dp" android:layout_height="wrap_content" android:text="string/zhuye_weiruan" android:textsize="12dp" android:background="drawable/anniu_biejing" android:textcolor="#000&q

23、uot; /> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" > </linearlayout> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="230dp" andro

24、id:layout_margintop="10dp" android:layout_alignparentleft="true" android:layout_below="+id/linearlayout2" android:orientation="vertical" > <textview android:id="+id/textview1" android:layout_width="wrap_content" android:layout_height=

25、"wrap_content" android:text="string/zhuye_zuixindongtai" android:textsize="19dp" android:paddingleft="10dp" android:textcolor="#fc1010"/> <listview android:id="+id/zhuye_list" android:layout_width="match_parent" android:layo

26、ut_height="224dp" > </listview> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:layout_alignparentleft="true" android:orientation

27、="vertical" ><include layout="layout/caidanlan"/> </linearlayout></relativelayout>3.3.3分類列表界面效果如圖(4.3):詳細布局代碼如下:<?xml version="1.0" encoding="utf-8"?><relativelayout xmlns:android=" android:layout_width="match_parent&quo

28、t; android:layout_height="match_parent" android:background="#fff" android:orientation="vertical" > <linearlayout android:id="+id/linearlayout1" android:layout_width="match_parent" android:layout_height="30dp" android:layout_alignparen

29、ttop="true" android:orientation="vertical" > <textview android:id="+id/textview1" android:layout_width="match_parent" android:layout_height="match_parent" android:text="string/newslist" android:background="drawable/biaoti_beijing

30、" android:gravity="center_vertical" android:textcolor="#000" /> </linearlayout> <linearlayout android:id="+id/lin3" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignparentbottom="true&q

31、uot; android:layout_alignparentleft="true" android:orientation="vertical" > <include layout="layout/caidanlan"/> </linearlayout> <listview android:id="+id/list_list" android:layout_width="match_parent" android:layout_height="wr

32、ap_content" android:layout_above="+id/lin3" android:layout_alignparentleft="true" android:layout_below="+id/linearlayout1" android:paddingleft="10dp" > </listview></relativelayout>3.3.4詳情顯示界面效果如圖(4.4):詳細布局代碼如下:<?xml version="1.0&quo

33、t; encoding="utf-8"?><relativelayout xmlns:android=" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffffff" > <linearlayout android:id="+id/linearlayout1" android:layout_width="matc

34、h_parent" android:background="drawable/liebiao_beijing" android:layout_height="190dp" > <imageview android:id="+id/imageview1" android:layout_width="130dp" android:paddingleft="10dp" android:layout_height="190dp" android:src=&quo

35、t;drawable/tu_3" /> <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <textview android:id="+id/detial_title" android:layout_width="wrap_content" android:layout_he

36、ight="wrap_content" android:text="textview" android:layout_marginleft="5dp" android:textcolor="#fc1010" android:layout_margintop="35dp" android:textsize="15dp" /> <textview android:id="+id/detial_time" android:layout_width=&

37、quot;wrap_content" android:layout_height="wrap_content" android:layout_margintop="35dp" android:textcolor="#000" android:layout_marginleft="5dp" android:text="textview" android:textsize="13dp" /> </linearlayout> </linearlay

38、out> <linearlayout android:id="+id/linearlayout2" android:layout_width="fill_parent" android:layout_height="150dp" android:paddingleft="10dp" android:layout_above="+id/edittext1" android:layout_alignparentleft="true" android:layout_be

39、low="+id/linearlayout1" android:orientation="vertical" > <textview android:id="+id/textview4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textcolor="#000" android:text="string/xiangqing"

40、android:textsize="18dp" /> <textview android:id="+id/detial_desc" android:layout_width="match_parent" android:textcolor="#000" android:background="drawable/liebiao_beijing" android:layout_height="match_parent" android:text="textv

41、iew" /> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="+id/lin3" android:layout_alignparentbottom="true" android:layout_alignparentleft="true" > <button androi

42、d:id="+id/detial_shouc" android:layout_width="120dp" android:textcolor="#000" android:background="drawable/anniu_biejing" android:layout_height="wrap_content" android:text="string/cd_shoucang" android:textsize="16dp" /> <but

43、ton android:id="+id/detial_talk" android:layout_width="120dp" android:layout_height="wrap_content" android:layout_marginleft="75dp" android:background="drawable/anniu_biejing" android:text="string/xiangqi_list1_pinglun" android:textcolor="#000" android:textsize="16dp" /> </linearlayout> <edittext android:id="+id/edittext1" android:layout_wid

溫馨提示

  • 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)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論