【正文】
型。布局里面還可以套用其他的布局。操作可行性上,利用現(xiàn)有的windows系統(tǒng)進(jìn)行開(kāi)發(fā)。關(guān)閉數(shù)據(jù)庫(kù)很重要,經(jīng)常容易忘記。 (savedInstanceState)。 if (!(new File()).exists()) { FileOutputStream fos。按下HOME鍵則返回手機(jī)主界面,延時(shí)暫停,再點(diǎn)擊啟動(dòng)程序時(shí)延時(shí)線程繼續(xù)運(yùn)行,直到3s后,跳到下一個(gè)界面。對(duì)于界面左上角的兩個(gè)刪除與重置按鈕,通過(guò) onClick (View v)事件,頁(yè)面上顯示一個(gè)(對(duì)話框)dialog,dialog的樣式設(shè)置由res,界面顯示時(shí),先生成一個(gè)dialog對(duì)象,然后顯示這個(gè)dialog。分別為未學(xué)習(xí)過(guò)的LIST和所有的LIST;同時(shí)顯示各項(xiàng)LIST列表。圖片按鈕為發(fā)音標(biāo)示,按鈕的屬性設(shè)置為android:drawable/btn_default,文本框分別為拼寫(xiě)(spelling)與單詞解釋?zhuān)╥nfo)。 startActivity(intent)。 case 1: if ( checkedId == () ) { score++。進(jìn)行操作:編輯該單詞和從生詞本中刪除。系統(tǒng)測(cè)試是整個(gè)軟件最后必須要經(jīng)歷的步驟,系統(tǒng)測(cè)試主要測(cè)試系統(tǒng)的穩(wěn)定性、健壯性等。歷經(jīng)了幾個(gè)月的奮戰(zhàn),緊張而又充實(shí)的畢業(yè)設(shè)計(jì)終于落下了帷幕。參考文獻(xiàn)[1] 楊豐盛. ANDROID應(yīng)用開(kāi)發(fā)揭秘[M]. 北京:機(jī)械工業(yè)出版社,[2] 李剛. 瘋狂Android講義(第二版) . 電子工業(yè)出版社,[3] Ethan import 。 } private void updateTime() { (new Date().toString())。這次論文的寫(xiě)作過(guò)程,讓我收獲了很多,即為在大學(xué)四年的學(xué)習(xí)生涯上劃上了一個(gè)完美的句號(hào),為將來(lái)的人生之路做好了一個(gè)非常好的鋪墊。,比如在小屏幕可以,到大屏幕就不能全屏了。測(cè)試結(jié)果:點(diǎn)擊menu后,再點(diǎn)擊add,進(jìn)入widget選擇對(duì)話框選擇該程序圖標(biāo)在主界面顯示。 //根據(jù)鍵值獲得具體數(shù)據(jù)如果第二界面要想返回結(jié)果到第一個(gè)界面,則在改寫(xiě)OnActivityResult方法,啟動(dòng)第二個(gè)Activity則要使用StartActivityForResult方法。 (bundle)。 switch (rightAns) { case 0: if ( checkedId == () ) { score++。} ...........public void onClick(DialogInterface dialog, int whichButton) { ()。 } (ttsUtteranceCompletedListener)。i++){ fileNames[i]=files[i].getName()。()。 initWidgets()。 SharedPreferences setting = getSharedPreferences(, MODE_PRIVATE)。表33 PLAN表字段類(lèi)型非空默認(rèn)值主鍵描述BOOKIDtext√詞庫(kù)的編號(hào)LISTtext√所在listLEARNEDtext√已學(xué)習(xí)listLEARN_TIMEtext學(xué)習(xí)時(shí)間REVIEW_TIMEStext復(fù)習(xí)次數(shù)REVIEWTIMEtext復(fù)試時(shí)間BESTSCOREtext最佳得分SHOULDREVIEWtext是否復(fù)習(xí)表PLAN具體內(nèi)容如圖39所示:圖39表PLAN 4. 系統(tǒng)各個(gè)模塊的具體實(shí)現(xiàn) 啟動(dòng)模塊的實(shí)現(xiàn)啟動(dòng)界面是系統(tǒng)的第一個(gè)界面,目的是給用戶一種直觀的感受,給用戶一種良好的感覺(jué)。向表中添加一條數(shù)據(jù)使用insert方法來(lái)添加數(shù)據(jù)即單詞。Android應(yīng)用是用java語(yǔ)言,雖然版本有好多,但一般會(huì)向下兼容,用Eclipse + ADT來(lái)創(chuàng)建應(yīng)用程序,Android提供開(kāi)發(fā)的足夠的接口API讓開(kāi)發(fā)者開(kāi)發(fā)功能強(qiáng)大的應(yīng)用程序。創(chuàng)建一個(gè)Activity一般繼承Activity父類(lèi)。3) Broadcast ReceiverBroadcast Receiver是Android提供的第三方應(yīng)用數(shù)據(jù)的訪問(wèn)方案,它可以派生出Content Provider這個(gè)類(lèi),然后對(duì)外提供數(shù)據(jù),它可以像數(shù)據(jù)庫(kù)一樣進(jìn)行選擇排序,它屏蔽內(nèi)部的細(xì)節(jié),并對(duì)外提供了一個(gè)統(tǒng)一接口模型,這很好的簡(jiǎn)化上層應(yīng)用,它對(duì)數(shù)據(jù)整合提供了更方便的方式。只有Eclipse還不夠,因?yàn)槭鞘褂肑ava語(yǔ)言進(jìn)行開(kāi)發(fā),還應(yīng)該有由SUN公司提供的Java SDK(其中包括JRE:Java Runtime Environment)。總之,Android 將帶給我們更加智能、便捷、現(xiàn)代的生活。市場(chǎng)份額為75%,%。 software development 目 錄摘 要 IAbstract II1. 緒 論 1 1 1 12. 平臺(tái)與開(kāi)發(fā)工具 3 開(kāi)發(fā)平臺(tái)介紹 3 開(kāi)發(fā)語(yǔ)言與開(kāi)發(fā)環(huán)境 33. 英語(yǔ)背單詞軟件總體設(shè)計(jì)與需求分析 5 Android四大組件簡(jiǎn)介 5 Android 手機(jī)應(yīng)用軟件的UI設(shè)計(jì) 6 英語(yǔ)背單詞軟件需求分析與性能分析 7 英語(yǔ)背單詞軟件操作流程圖與數(shù)據(jù)庫(kù)設(shè)計(jì) 7 英語(yǔ)背單詞軟件操作流程圖 7 數(shù)據(jù)庫(kù)的創(chuàng)建與設(shè)計(jì) 84. 系統(tǒng)各個(gè)模塊的具體實(shí)現(xiàn) 13 啟動(dòng)模塊的實(shí)現(xiàn) 13 用戶信息模塊的實(shí)現(xiàn) 14 用戶單詞學(xué)習(xí)模塊的實(shí)現(xiàn) 16 用戶單詞復(fù)習(xí)模塊的實(shí)現(xiàn) 17 用戶單詞測(cè)試模塊的實(shí)現(xiàn) 19 生詞本模塊的實(shí)現(xiàn) 20 各界面之間切換的實(shí)現(xiàn) 215. 客戶端界面測(cè)試 23 系統(tǒng)測(cè)試的目標(biāo) 23 測(cè)試流程 23 測(cè)試用例與測(cè)試結(jié)果 236. 總結(jié) 24 本文工作總結(jié) 24 進(jìn)一步工作的打算 24參考文獻(xiàn) 25致 謝 25外文原文 26外文翻譯 37 1. 緒 論本著對(duì)用戶學(xué)習(xí)英語(yǔ)提供便利和有效記憶的目標(biāo),該英語(yǔ)背單詞軟件是基于Android手機(jī)平臺(tái),通過(guò)詞庫(kù)的解析與導(dǎo)入,開(kāi)發(fā)出針對(duì)使用Android平臺(tái)的手機(jī)英語(yǔ)背單詞系統(tǒng)。用戶使用此平臺(tái)進(jìn)行單詞學(xué)習(xí)、單詞背誦、單詞測(cè)試、加入生詞本等。其他操作系統(tǒng)的表現(xiàn)則要平穩(wěn)很多。從而,Android應(yīng)用的開(kāi)發(fā),將會(huì)越來(lái)越龐大,需求將會(huì)越來(lái)越豐富。此外,Android的應(yīng)用程序開(kāi)發(fā)和Java開(kāi)發(fā)有較大區(qū)別的,所以還需要有Google提供的Android SDK。Broadcase Receiver并不執(zhí)行任何的任務(wù),它僅是接受并響應(yīng)廣播的通知的一類(lèi)組件。覆蓋Activity的onCreate()方法,在該方法中調(diào)用setOnContextView()方法來(lái)展示要顯示的視圖。 經(jīng)濟(jì)可行性上,該應(yīng)用程序不需要服務(wù)器端,不需要與別的應(yīng)用進(jìn)行交互,只需要本地Android智能機(jī)設(shè)置好,用戶學(xué)習(xí)內(nèi)容自動(dòng)保存,而且復(fù)習(xí)計(jì)劃可自行設(shè)置提醒。具體實(shí)現(xiàn)如下:(table, null, values)。由一個(gè)Linearlayout(線性布局) 構(gòu)成,里面包含一個(gè)ImageView (圖片控件)并填充整個(gè)手機(jī)界面,考慮到橫豎屏切換和屏幕大小,在res的drawablehdpi、drawableldpi和drawa blemdpi三個(gè)文件夾分別放三種尺寸圖片,分辨路為480x800、800x480、320x460并且啟動(dòng)畫(huà)面要覆蓋整個(gè)手機(jī)屏幕,啟動(dòng)界面如圖41所示:圖41 啟動(dòng)界面啟動(dòng)界面最主要的工作時(shí)設(shè)置畫(huà)面延時(shí),并且能夠在畫(huà)面顯示的3秒內(nèi)對(duì)HOME鍵、返回鍵,做出相應(yīng),并且可以支持橫豎屏切換。 ((time, 18:00 下午),)。}。(adapter)。} (new ArrayAdapterString(this, , fileNames))。} 用戶單詞復(fù)習(xí)模塊的實(shí)現(xiàn)。 finish()。 DisplayToast (正確)。 (, )。 最后還要說(shuō)一點(diǎn)的是,android中每一個(gè)Activity(顯示界面類(lèi)) 系統(tǒng)最主要的配置文件中進(jìn)行注冊(cè),才可以顯示該界面,否則系統(tǒng)將報(bào)異常。測(cè)試結(jié)果基本符合預(yù)期。,當(dāng)點(diǎn)擊時(shí)可以切換到另一種效果。同時(shí),我也衷心的感謝太原理工大學(xué)軟件學(xué)院四年來(lái)對(duì)我的精心栽培,為我進(jìn)入社會(huì)提供了莫大的幫助。 } } The first difference is that rather than setting the content view to be a view we created in Java code, we set it to reference the XML layout (setContentView()). The source file will be updated when we rebuild this project to include a reference to our layout file (stored as in our project’s res/layout directory). The other difference is that we need to get our hands on our Button instance, for which we use the findViewById() call. Since we identified our button as +id/button, we can reference the button’s identifier as . Now, with the Button instance in hand, we can set the callback and set the label as needed. As you can see in Figure 51, the results look the same as with the original Now demo. Figure 51. The NowRedux sample activityEmploying Basic WidgetsEvery GUI toolkit has some basic widgets: fields, labels, buttons, etc. Android’s toolkit is no different in scope, and the basic widgets will provide a good introduction as to how widgets work in Android 。 This is the same setContentView() we used earlier, passing it an instance of a View subclass (in that case, a Button). The Androidbuilt view, constructed from our layout, is accessed from that codegenerated R class. All of the layouts are accessible under , keyed by the base name of the layout file— results in . To access our identified widgets, use findViewById(), passing in the numeric identifier of the widget in question. That numeric identifier was generated by Android in the R class as (where something is the specific widget you are seeking). Those widgets are simply subclasses of View, just like the Button instance we created in Chapter 4. The Rest of the Story In the original Now demo, the button’s face would show the current time, which would reflect when the button was last pushed (or when the activity was first shown, if the button had not yet been pushed). Most of that logic still works, even in this revised demo (NowRedux). However, rather than instantiating the Button in our activity’s onCreate() callback, we can reference the one from the XML layout: package 。從最初的茫然,到慢慢的進(jìn)入狀態(tài),再到對(duì)思路逐漸的清晰,整個(gè)寫(xiě)作過(guò)程難以用語(yǔ)言來(lái)表達(dá)。在執(zhí)行測(cè)試的用例之后,根據(jù)需要跟蹤檢測(cè)到的故障,以保證開(kāi)發(fā)的產(chǎn)品適合需