毕业设计论文外文资料和译文格式要求模板.docx
- 文档编号:29438450
- 上传时间:2023-07-23
- 格式:DOCX
- 页数:40
- 大小:467.43KB
毕业设计论文外文资料和译文格式要求模板.docx
《毕业设计论文外文资料和译文格式要求模板.docx》由会员分享,可在线阅读,更多相关《毕业设计论文外文资料和译文格式要求模板.docx(40页珍藏版)》请在冰豆网上搜索。
毕业设计论文外文资料和译文格式要求模板
成都东软学院
外文资料和译文格式要求
一、译文必须采用计算机输入、打印,幅面A4。
外文资料原文(复印或打印)在前,译文在后,于左侧装订。
二、具体要求
1、至少翻译一篇内容与所选课题相关的外文文献。
2、译文汉字字数不少于4000字。
3、正文格式要求:
宋体五号字。
译文
格式
参见《译文格式要求》,宋体五号字,单倍行距。
纸张
纸张为A4纸,页边距上2.54cm、下2.54cm、左3.17cm、右3.17cm。
装订
外文资料原文(复印或打印)在前,译文在后
封面
封面的专业、班级、姓名、学号等信息要全部填写正确。
封面指导教师必须为讲师以上职称,若助教则需要配备一名讲师协助指导。
讲师在前,助教在后。
指导教师姓名后面空一个中文空格,加职称。
页眉
页眉说明宋体小五,左端“XX学院毕业设计(论文)”,右端“译文”。
页眉中的学院名称要与封面学院名称一致。
日期
填写毕业设计第4周的日期,即2014年12月8日到2014年12月12日之间日期。
字数
本科4000字。
附:
外文资料和译文封面、空白页
成都东软学院
外文资料和译文
专业:
软件工程移动互联网应用开发
班级:
2班
姓名:
罗荣昆
学号:
12310420216
指导教师:
2015年12月8日
Androidpagelayout
UsingXML-BasedLayouts
WhileitistechnicallypossibletocreateandattachwidgetstoouractivitypurelythroughJavacode,thewaywedidinChapter4,themorecommonapproachistouseanXML-basedlayoutfile.Dynamicinstantiationofwidgetsisreservedformorecomplicatedscenarios,wherethewidgetsarenotknownatcompile-time(eg.,populatingacolumnofradiobuttonsbasedondataretrievedofftheInternet).
Withthatinmind,it’stimetobreakouttheXMLandlearnhowtolayoutAndroidactivitiesthatway.
WhatIsanXML-BasedLayout?
Asthenamesuggests,anXML-basedlayoutisaspecificationofwidgets’relationshipstoeachother—andtotheircontainers(moreonthisinChapter7)—encodedinXMLformat.Specifically,AndroidconsidersXML-basedlayoutstoberesources,andassuchlayoutfilesarestoredintheres/layoutdirectoryinsideyourAndroidproject.
EachXMLfilecontainsatreeofelementsspecifyingalayoutofwidgetsandtheircontainersthatmakeuponeviewhierarchy.TheattributesoftheXMLelementsareproperties,describinghowawidgetshouldlookorhowacontainershouldbehave.Forexample,ifaButtonelementhasanattributevalueofandroid:
textStyle="bold",thatmeansthatthetextappearingonthefaceofthebuttonshouldberenderedinaboldfacefontstyle.
Android’sSDKshipswithatool(aapt)whichusesthelayouts.ThistoolshouldbeautomaticallyinvokedbyyourAndroidtoolchain(e.g.,Eclipse,Ant’sbuild.xml).OfparticularimportancetoyouasadeveloperisthataaptgeneratestheR.javasourcefilewithinyourproject,allowingyoutoaccesslayoutsandwidgetswithinthoselayoutsdirectlyfromyourJavacode.
WhyUseXML-BasedLayouts?
MosteverythingyoudousingXMLlayoutfilescanbeachievedthroughJavacode.Forexample,youcouldusesetTypeface()tohaveabuttonrenderitstextinbold,insteadofusingapropertyinanXMLlayout.SinceXMLlayoutsareyetanotherfileforyoutokeeptrackof,weneedgoodreasonsforusingsuchfiles.
Perhapsthebiggestreasonistoassistinthecreationoftoolsforviewdefinition,suchasaGUIbuilderinanIDElikeEclipseoradedicatedAndroidGUIdesignerlikeDroidDraw1.SuchGUIbuilderscould,inprinciple,generateJavacodeinsteadofXML.Thechallengeisre-readingtheUIdefinitiontosupportedits—thatisfarsimplerifthedataisinastructuredformatlikeXMLthaninaprogramminglanguage.Moreover,keepinggeneratedXMLdefinitionsseparatedfromhand-writtenJavacodemakesitlesslikelythatsomebody’scustom-craftedsourcewillgetclobberedbyaccidentwhenthegeneratedbitsgetre-generated.XMLformsanicemiddlegroundbetweensomethingthatiseasyfortool-writerstouseandeasyforprogrammerstoworkwithbyhandasneeded.
Also,XMLasaGUIdefinitionformatisbecomingmorecommonplace.Microsoft’sXAML2,Adobe’sFlex3,andMozilla’sXUL4alltakeasimilarapproachtothatofAndroid:
putlayoutdetailsinanXMLfileandputprogrammingsmartsinsourcefiles(e.g.,JavaScriptforXUL).Manyless-well-knownGUIframeworks,suchasZK5,alsouseXMLforviewdefinition.While“followingtheherd”isnotnecessarilythebestpolicy,itdoeshavetheadvantageofhelpingtoeasethetransitionintoAndroidfromanyotherXML-centeredviewdescriptionlanguage.
OK,SoWhatDoesItLookLike?
HereistheButtonfromthepreviouschapter’ssampleapplication,convertedintoanXML
layoutfile,foundintheLayouts/NowReduxsampleproject.ThiscodesamplealongwithallothersinthischaptercanbefoundintheSourceCodeareaof.
xmlversion="1.0"encoding="utf-8"?
>
android=" android: id="@+id/button" android: text="" android: layout_width="fill_parent" android: layout_height="fill_parent"/> Theclassnameofthewidget—Button—formsthenameoftheXMLelement.SinceButtonisanAndroid-suppliedwidget,wecanjustusethebareclassname.Ifyoucreateyourownwidgetsassubclassesofandroid.view.View,youwouldneedtoprovideafullpackagedeclarationaswell. TherootelementneedstodeclaretheAndroidXMLnamespace: xmlns: android=" Allotherelementswillbechildrenoftherootandwillinheritthatnamespacedeclaration. BecausewewanttoreferencethisbuttonfromourJavacode,weneedtogiveitanidentifierviatheandroid: idattribute.Wewillcoverthisconceptingreaterdetaillaterinthischapter. TheremainingattributesarepropertiesofthisButtoninstance: •android: textindicatestheinitialtexttobedisplayedonthebuttonface(inthiscase,anemptystring) •android: layout_widthandandroid: layout_heighttellAndroidtohavethebutton’s widthandheightfillthe“parent”,inthiscasetheentirescreen—theseattributeswillbecoveredingreaterdetailinChapter7. Sincethissinglewidgetistheonlycontentinouractivity,weonlyneedthissingleelement.ComplexUIswillrequireawholetreeofelements,representingthewidgetsandcontainersthatcontroltheirpositioning.AlltheremainingchaptersofthisbookwillusetheXMLlayoutformwheneverpractical,sotherearedozensofotherexamplesofmorecomplexlayoutsforyoutoperusefromChapter7onward. What’swiththe@Signs? ManywidgetsandcontainersonlyneedtoappearintheXMLlayoutfileanddonotneedtobereferencedinyourJavacode.Forexample,astaticlabel(TextView)frequentlyonlyneedstobeinthelayoutfiletoindicatewhereitshouldappear.ThesesortsofelementsintheXMLfiledonotneedtohavetheandroid: idattributetogivethemaname. AnythingyoudowanttouseinyourJavasource,though,needsanandroid: id. Theconventionistouse@+id/...astheidvalue,wherethe...representsyourlocallyuniquenameforthewidgetinquestion.IntheXMLlayoutexampleintheprecedingsection,@+id/buttonistheidentifierfortheButtonwidget. Androidprovidesafewspecialandroid: idvalues,oftheform@android: id/....Wewillseesomeoftheseinvariouschaptersofthisbook,suchasChapters8and10. WeAttachThesetotheJavaHow? GiventhatyouhavepainstakinglysetupthewidgetsandcontainersinanXMLlayoutfile namedmain.xmlstoredinres/layout,allyouneedisonestatementinyouractivity’sonCreate()callbacktousethatlayout: setContentView(R.layout.main); ThisisthesamesetContentView()weusedearlier,passingitaninstanceofaViewsubclass(inthatcase,aButton).TheAndroid-builtview,constructedfromourlayout,isaccessedfromthatcode-generatedRclass.AllofthelayoutsareaccessibleunderR.layout,keyedbythebasenameofthelayoutfile—main.xmlresultsinR.layout.main. Toaccessouridentifiedwidgets,usefindViewById(),passinginthenumericidentifierofthewidgetinquestion.ThatnumericidentifierwasgeneratedbyAndroidintheRclassas R.id.something(wheresomethingisthespecificwidgetyouareseeking).ThosewidgetsaresimplysubclassesofView,justliketheButtoninstancewecreatedinChapter4. TheRestoftheStory IntheoriginalNowdemo,thebutton’sfacewouldshowthecurrenttime,whichwouldreflectwhenthebuttonwaslastpushed(orwhentheactivitywasfirstshown,ifthebuttonhadnotyetbeenpushed). Mostofthatlogicstillworks,eveninthisreviseddemo(NowRedux).However,ratherthaninstantiatingtheButtoninouractivity’sonCreate()callback,wecanreferencetheonefromtheXMLlayout: packagemonsware.android.layouts; importandroid.app.Activity; importandroid.os.Bundle; importandroid.view.View; importandroid.widget.Button;importjava.util.Date; publicclassNowReduxextendsActivityimplementsView.OnClickListener{Buttonbtn; @Override publicvoidonCreate(Bundleicicle){super.onCreate(icicle); setContentView(R.layout.main); btn=(Button)findViewById(R.id.button);btn.setOnClickListener(this);updateTime(); } publicvoidonClick(Viewview){updateTime(); } privatevoidupdateTime(){ btn.setText(newDate().toString());} } ThefirstdifferenceisthatratherthansettingthecontentviewtobeaviewwecreatedinJavacode,wesetittoreferencetheXMLlayout(setContentView(R.layout.main)).TheR.javasourcefilewillbeupdatedwhenwerebuildthisprojecttoincludeareferencetoourlayoutfile(storedasmain.xmlinourproject’sres/layoutdirectory). TheotherdifferenceisthatweneedtogetourhandsonourButtoninstance,forwhichweusethefindViewById()call.Sinceweidentifiedourbuttonas@+id/button,wecanreferencethebutton’sidentifierasR.id.button.Now,withtheButtoninstanceinhand,wecansetthecallbackandsetthelabelasneeded. AsyoucanseeinFigure5-1,theresultslookthesameaswiththeoriginalNowdemo. Figure5-1.TheNowReduxsampleactivity EmployingBasicWidgets EveryGUItoolkithassomebasicwidgets: fields,labels,buttons,etc.Android’stoolkitisnodifferentinscope,andthebasicwidgetswillprovideagoodintroductionastohowwidgetswork
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 毕业设计 论文 外文 资料 译文 格式 要求 模板
![提示](https://static.bdocx.com/images/bang_tan.gif)