首页 > > > Android User Interface Development - Beginners …

Android User Interface Development - Beginners Guide.pdf

Android User Interface Developm…

上传者: xuanguang 2013-11-03 评分1 评论0 下载42 收藏10 阅读量52 暂无简介 简介 举报

简介:本文档为《Android User Interface Development - Beginners Guidepdf》,可适用于手机软件领域,主题内容包含AndroidUserInterfaceDevelopmentBeginner'sGuideQuicklydesignanddevelopcompe符等。

AndroidUserInterfaceDevelopmentBeginner'sGuideQuicklydesignanddevelopcompellinguserinterfacesforyourAndroidapplicationsJasonMorrisBIRMINGHAMMUMBAIDownloadfromWow!eBook<wwwwowebookcom>AndroidUserInterfaceDevelopmentBeginner'sGuideCopyrightPacktPublishingAllrightsreservedNopartofthisbookmaybereproduced,storedinaretrievalsystem,ortransmittedinanyformorbyanymeans,withoutthepriorwrittenpermissionofthepublisher,exceptinthecaseofbriefquotationsembeddedincriticalarticlesorreviewsEveryefforthasbeenmadeinthepreparationofthisbooktoensuretheaccuracyoftheinformationpresentedHowever,theinformationcontainedinthisbookissoldwithoutwarranty,eitherexpressorimpliedNeithertheauthornorPacktPublishing,anditsdealersanddistributorswillbeheldliableforanydamagescausedorallegedtobecauseddirectlyorindirectlybythisbookPacktPublishinghasendeavoredtoprovidetrademarkinformationaboutallofthecompaniesandproductsmentionedinthisbookbytheappropriateuseofcapitalsHowever,PacktPublishingcannotguaranteetheaccuracyofthisinformationFirstpublished:FebruaryProductionReference:PublishedbyPacktPublishingLtdLincolnRoadOltonBirmingham,BPA,UKISBNwwwpacktpubcomCoverImagebyCharwakA(charwakgmailcom)CreditsAuthorJasonMorrisReviewersDavidJGroomMartinSkansAcquisitionEditorChaitanyaApteDevelopmentEditorReshmaSundaresanTechnicalEditorHarshitShahCopyEditorNehaShettyIndexerTejalDaruwaleEditorialTeamLeaderAksharaAwareProjectTeamLeaderPriyaMukherjiProjectCoordinatorShubhanjanChatterjeeProofreaderJoelTJohnsonGraphicsNileshRMohiteProductionCoordinatorsKruthikaBangeraAparnaBhagatCoverWorkKruthikaBangeraAbouttheAuthorJasonMorrishasworkedonsoftwareasdiverseasfruittrackingsystems,insurancesystems,andtravelsearchandbookingenginesHehasbeenwritingsoftwareforaslongashecanrememberHeiscurrentlyworkingasaSoftwareArchitectforTravelstartinSouthAfricaHeworksonmultiplefrontendandmiddlewaresystems,leveragingavarietyofJavabasedtechnologiesThepeopleI'dliketothankmostfortheirdirect,orindirecthelpinwritingthisbookaremywifeCaronMorris,myfatherMikeMorris,mymomJayneMorris,andtherestofmyfamilyfortheirloveandsupportI'dalsoliketothankWayne,Stuart,Angela,andJames,andeveryoneonmyteamatTravelstartFinallyaverybigthankstoMartinSkansforhisinvaluableinputAbouttheReviewerMartinSkansgraduatedfromLundUniversityinSweden,withaMaster'sdegreeinComputerScienceAfteracoupleofyearsintheonlinemarketingindustry,hemovedontobecomeadeveloperforTravelstart,anonlinetravelagencyHerelocatedtoCapeTownandiscurrentlyworkingonTravelstart'sAfricantravelplatformwhichhasbeenrecentlylaunchedforthemobilemarketwwwPacktPubcomSupportfiles,eBooks,discountoffersandmoreYoumightwanttovisitwwwPacktPubcomforsupportfilesanddownloadsrelatedtoyourbookDidyouknowthatPacktofferseBookversionsofeverybookpublished,withPDFandePubfilesavailableYoucanupgradetotheeBookversionatwwwPacktPubcomandasaprintbookcustomer,youareentitledtoadiscountontheeBookcopyGetintouchwithusatservicepacktpubcomformoredetailsAtwwwPacktPubcom,youcanalsoreadacollectionoffreetechnicalarticles,signupforarangeoffreenewslettersandreceiveexclusivediscountsandoffersonPacktbooksandeBookshttp:PacktLibPacktPubcomDoyouneedinstantsolutionstoyourITquestionsPacktLibisPackt'sonlinedigitalbooklibraryHere,youcanaccess,readandsearchacrossPackt'sentirelibraryofbooksWhySubscribe‹FullysearchableacrosseverybookpublishedbyPackt‹Copyandpaste,printandbookmarkcontent‹OndemandandaccessibleviawebbrowserFreeAccessforPacktaccountholdersIfyouhaveanaccountwithPacktatwwwPacktPubcom,youcanusethistoaccessPacktLibtodayandviewnineentirelyfreebooksSimplyuseyourlogincredentialsforimmediateaccessTableofContentsPrefaceChapter:DevelopingaSimpleActivityDevelopingourfirstexampleCreatingtheprojectstructureTimeforaction–settinguptheAndroidSDKTimeforaction–startinganewprojectExaminingtheAndroidprojectlayoutTimeforaction–runningtheexampleprojectThescreenlayoutThelayoutXMLfileResourceselectionqualifiersTimeforaction–settingupthequestionactivityPopulatingaViewandaViewGroupTimeforaction–askingaquestionTimeforaction–addingaspaceforanswersTimeforaction–addingmorebuttonsDefiningcommondimensionsLimitationsofthelayoutXMLformatPopulatingtheQuestionActivityTimeforaction–writingmoreJavacodeDynamicallycreatingwidgetsTimeforaction–puttingthequestionsonthescreenHandlingeventsinAndroidSummaryChapter:PresentingDataforViewsListingandselectingdataListViewchoicemodesNoselectionmode–CHOICEMODENONESingleselectionmode–CHOICEMODESINGLEMultipleselectionmode–CHOICEMODEMULTIPLETableofContentsiiAddingheaderandfooterwidgetsCreatingasimpleListViewTimeforaction–creatingafastfoodmenuStylingthestandardListAdaptersDefiningstandarddimensionsTimeforaction–improvingtherestaurantlistCreatingcustomadaptersCreatingamenuforTheBurgerPlaceTimeforaction–creatingaBurgeritemlayoutTimeforaction–presentingBurgerobjectsCreatingTheBurgerPlaceActivityclassTimeforaction–implementingTheBurgerPlaceActivityRegisteringandstartingTheBurgerPlaceActivityUsingtheExpandableListViewclassCreatingExpandableListAdapterimplementationsUsingtheGridViewclassTimeforaction–creatingthefruiticonDisplayingiconsinaGridViewTimeforaction–buildingthefruitmenuTimeforaction–creatingtheFourBucketsActivitySummaryChapter:DevelopingwithSpecializedAndroidWidgetsCreatingarestaurantreviewapplicationTimeforaction–creatingtheroboticreviewprojectstructureBuildingaTabActivityCreatingtabiconsAndroidtabsandiconsImplementingtheReviewActivityTimeforaction–writingtheReviewActivityclassTimeforaction–creatingtheReviewlayoutWorkingwithswitcherclassesTimeforaction–turningontheTextSwitcherCreatingasimplephotogalleryTimeforaction–buildingthePhotostabCreatingathumbnailwidgetImplementingaGalleryAdapterTimeforaction–theGalleryAdapterTimeforaction–makingthegalleryworkBuildingthereservationtabTimeforaction–implementingthereservationlayoutTimeforaction–initializingthereservationtabTableofContentsiiiTimeforaction–listeningtotheSeekBarTimeforaction–selectingdateandtimeCreatingcomplexlayoutswithInclude,Merge,andViewStubsUsingIncludetagsMerginglayoutsUsingtheViewStubclassSummaryChapter:LeveragingActivitiesandIntentsExploringtheActivityclassUsingBundleobjectsTimeforaction–buildinganexamplegame:"guessmynumber"CreatingandconsumingintentsDefiningIntentactionsPassingdatainanIntentAddingextradatatoanIntentUsingadvancedIntentfeaturesGettingdatabackfromanIntentTimeforaction–viewingphonebookcontactsSummaryChapter:DevelopingNonlinearLayoutsTimeforaction–creatingalayoutsexampleprojectFrameLayoutCommonusesTimeforaction–developingaFrameLayoutexampleTableLayoutCommonusesUsingTableLayoutforamemorygameTimeforaction–developingasimplememorygameAbsoluteLayoutCustomLayoutsDevelopingyourownLayoutsTimeforaction–creatingacustomlayoutUsingtheCircleLayoutTimeforaction–finishingtheCircleLayoutexampleRelativeLayoutCommonusesIntegratingtheRelativeLayoutTimeforaction–creatingacontacteditorTimeforaction–integrationwiththelayoutexampleSlidingDrawerCommonusesTableofContentsivCreatingaSlidingDrawerexampleTimeforaction–creatingaSlidingDrawerTimeforaction–slidingdrawerintegrationSummaryChapter:ValidatingandHandlingInputDataDealingwithundesirableinputCorrectlylabelinginputSignalingundesirableinputRecoveringfromundesirableinputGivingusersdirectfeedbackAvoidinginvalidinputentirelyCapturingdateandtimeUsingspinnersandListViewforselectionChangingthedatasetDisablingselectionsCapturingtextinputAutocompletingtextinputBuildingactivitiesforresultsGenericfilteringsearchActivityTimeforaction–creatingtheListItemSelectionActivityTimeforaction–creatinganArrayAdapterTimeforaction–creatingtheCursorAdapterTimeforaction–settinguptheListViewTimeforaction–filteringthelistTimeforaction–returningtheselectionUsingtheListItemSelectionActivitySummaryChapter:AnimatingWidgetsandLayoutsUsingstandardAndroidanimationsTimeforaction–animatinganewsfeedUsingflipperandswitcherwidgetsUsingtheImageSwitcherandTextSwitcherimplementationsAnimatinglayoutwidgetsTimeforaction–animatingaGridViewCreatingCustomAnimationsTimeforaction–writingacustomanimationTimeforaction–makingaButtonvanishSummaryChapter:DesigningContentcentricActivitiesConsideringdesignoptionswhendisplayingcontentonanAndroiddeviceTableofContentsvConsideringuserbehaviorDrawinguserattentionDisplayingcontentwiththeWebViewclassUsingaWebViewobjectTimeforaction–creatingarecipeviewerapplicationTakingWebViewfurtherCreatingrelativelayoutsforcontentdisplayTakingfulladvantageofRelativeLayoutConsideringAndroidlayoutconstraintsStylingTextViewobjectsTimeforaction–developingspecializedcontentviewsDevelopinganonlinemusicstoreDesigningthemusicstoreDevelopingthemusicstoreTimeforaction–buildingatrackitemTimeforaction–developingthemainuserinterfacelayoutTimeforaction–developingthemainuserinterfaceJavacodeSummaryChapter:StylingAndroidApplicationsWorkingwithstyleresourcesUsingshaperesourcesHowshapesbehaveRenderinglinesTimeforaction–drawingabrokenlineRenderingrectanglesTimeforaction–creatingaroundedborderRenderingovalsTimeforaction–applyingagradienttoanovalshapeRenderingringsTimeforaction–renderingaspinnerringDefininglayersStretchingusingninepatchimagesCreatingninepatchimagesUsingbitmapimagesinAndroidHandlingdifferentscreensizesHandlingdifferentscreendensitiesHandlingconfigurationchangesProvidinglandscapelayoutsProvidingtextinputonalandscapelayoutAlteringscreencontentSummaryDownloadfromWow!eBook<wwwwowebookcom>TableofContentsviChapter:BuildinganApplicationThemeCreatingabasiccalculatorlayoutDesigningastandardcalculatorTimeforaction–buildingthestandardcalculatorBuildingthecalculatorstylingTimeforaction–creatingthebuttonimagesTimeforaction–stylingthecalculatorbuttonsTimeforaction–stylingthedisplayScientificlandscapelayoutDefiningstringresourcesforthescientificlayoutStylingthescientificlayoutBuildingthescientificlayoutTimeforaction–codingthescientificlayoutHandlingtheActivityrestartSupportinghardwarekeyboardsAddingindisplayanimationsTimeforaction–animatingthedisplaySummaryAppendix:PopquizanswersChapterLayoutsasXMLflesPopulatinganactivityChapterListviewsandadaptersChapterGalleryobjectsandImageViewsChapterIntentsActivitiesChapterCustomlayoutsChapterTextinputChapterTheWebViewwidgetWebViewversusnativelayoutsChapterLayoutresourcesNinePatchImagesAndroidresourcesIndexPrefaceOnthJanuary,,AppleofficiallylaunchedtheiPhone,andtheworldofuserinterfacedesignshiftedWhiletabletPCshadbeenaroundforawhile,theiPhonewasthefirstdevicetogivesomanypeopleaportabletouchscreen,andpeopleloveditJustoverayearlater,GoogleandtheOpenHandsetAllianceannouncedAndroidwhichinmanywaysisthedirectcompetitortoiPhoneWhatisitabouttouchscreenphonesthatweloveTheanswerissimplefeedbackTouchscreensofferawaytodirectlymanipulateonscreenobjects,whichinthepasthadtobedriventhroughakeyboard,mouse,joystick,orotherinputdeviceThetouchscreenmodelofdirectmanipulationhasalargeimpactonthewaywethinkaboutouruserinterfacesasdevelopers,andchangestheexpectationsauserhasfortheapplicationTouchscreendevicesrequireustostopthinkingintermsofforms,andstartthinkingaboutobjectorienteduserinterfacesAndroidisusedastheprimaryoperatingsystemforarapidlyexpandingrangeofconsumerelectronics,including:‹Smartphones‹Netbooks‹Tablets‹SomedesktopsystemsWhileallofthesedeviceshavedifferentpurposesandspecifications,allofthemrunAndroidThisisunlikemanyotheroperatingenvironmentswhicharealmostalwayshaveaspecialpurposeTheservicesandtheAPIstheyprovidetodevelopersgenerallyreflecttheirtargethardwareAndroidontheotherhandmakestheassumptionthatasingleapplicationmayberequiredtorunonmanydifferenttypesofdevices,withverydifferenthardwarecapabilitiesandspecifications,andmakesitaseasyaspossiblefordeveloperstohandlethedifferencesbetweenthesedevicessimplyandelegantlyPrefaceNewchallengesAsAndroidandthetouchscreendevicesitpowersbecomeincreasinglycommon,theywillbringanewsetofchallengestouserinterfacedesignanddevelopment:‹Yougenerallydon'thaveamouse‹Youmayhavemorethanonepointingdevice‹Youoftendon'thaveakeyboard‹Anykeyboardthatdoesexistmaybeasoftwarekeyboard‹Asoftwarekeyboardmayconsumesomeofyourapplication'sscreenspaceThesoftwarekeyboardreducestheamountofscreenspaceavailabletoyourapplication,andinmuchthesamevein,ifthereisahardwarekeyboardpresentitmayormaynotalwaysbeexposedtotheuserTherefore,notonlyaredifferentAndroiddevicesdifferent,buttheymayalsoappeartochangefeatureswhileyourapplicationisrunningTheruleoffingerMostAndroiddeviceshavetouchscreens(althoughthisisnotarequirement)Thefirstrestrictionplacedonanytouchscreenuserinterfaceisthesizeofthehumanforefinger,whichofcoursevarieswidelyfromonepersontoanotherIfawidgetistoosmallonthescreen,itwon'tbeclearwhattheuseristryingtotouchYou'llnoticethatmostAndroidwidgetstakeupplentyofspace,andhavemorethanthenormalamountofpaddingaroundthemOnatouchscreendevice,youcan'trelyonpixelperfectprecisionYouneedtomakesurethatwhentheusertouchesawidget,theymakecontact,andtheydon'taccidentallytouchanotherwidgetThemagictouchAnotherimpacttouchscreenshaveonuserinterfacedesignisthatanapplicationandallthewidgetsthatitusesmustbeentirelyselfexplanatory(evenmorethanusual)Fartoooften,wesubstitutegooduserinterfaceplanninganddesignwitharolloverortooltiptoindicateawidget'sfunctionOnatouchscreendevice,thereisnomouseorpointingdeviceThefirstinteractionithaswiththeuseriswhentheytouchit,andtheywillexpectsomethingtohappenAtouchysubjectMostAndroiddeviceshaveatouchscreen,butit'snotarequirementThequalityofatouchscreenalsovarieswildlyfromdevicetodeviceThecategoryoftouchscreensandtheircapabilitieswillalsovaryfromonedevicetothenext,dependingontheintendeduseofthedeviceandoftenitsintendedmarketsegmentPrefaceAsmallerviewontheworldMostAndroiddevicesaresmall,andasaresulthavesmallerscreensandgenerallyfewerpixelsthananormalPCorlaptopThislackofsizelimitsthesizeofthewidgetsWidgetsmustbebigenoughtotouchsafely,butwealsoneedtopackasmuchinformationontothescreenaspossibleSodon'tgiveyourusersinformationthattheydon'twant,andalsoavoidaskingthemforinformationyoudon'tneedClassicuserinterfaceprincipalsHerearesomecoreguidelineswhicheveryuserinterfaceshouldfollowTheseguidelinesarewhatwillkeepyourusershappy,andensureyourapplicationissuccessfulThroughouttherestofthebook,we'llbewalkingthroughtheseguidelineswithpracticalexamplesofimprovementsthatcanbemadetoauserinterfaceConsistencyThisisthecornerstoneofgooduserinterfacedesignAbuttonshouldlooklikeabuttonMakesurethatthelayoutofeachscreenhasarelationshipwitheveryotherscreeninyourapplicationPeopleoftenmistakethisprinciplefor"sticktotheplatformlookandfeel"Lookandfeelisimportant,consistencymostlyappliestothelayoutandoverallexperienceoftheapplication,ratherthanthecolorschemeRecyclingyourinterfaceTheeasiestwaytomaintainaconsistentuserinterface,istorecycleasmuchofitaspossibleAtfirstglance,thissuggestionlooksmerelylikea"goodobjectoriented"practiceHowever,acloserlookwillrevealwaystoreusegraphicalwidgetsinwaysyouhadn'tthoughtofBychangingthevisibilityofvariouswidgets,oryoucanreuseaneditscreentoviewlistitemsoftheintendedtypeSimplicityThisisespeciallyimportantinaphonebasedapplicationOften,whenauserencountersanewapplication,it'sbecausetheyarelookingforsomethingTheymaynothavethetime(ormoreoftenpatience)tolearnanewuserinterfaceMakesurethatyourapplicationasksforaslittleaspossible,andguidestheusertotheexactinformationtheywantinasfewstepsaspossiblePrefaceTheZenapproachGenerally,whenyouareusingamobiledevice,yourtimeislimitedYoumayalsobeusinganapplicationinlessthanidealcircumstances(perhaps,inatrain)Thelesserinformationauserneedstogiveanapplication,andthelessertheyneedtoabsorbfromit,thebetterStrippingawayoptionsandinformationalsoleadstoashorterlearningcurveAndroid'shiddenmenuAveryusefulfeatureofAndroidisthehiddenmenustructureThemenuisonlyvisiblewhentheuserpressesthe"Menu"button,whichwouldgenerallymean,they'relookingforsomethingthatisn'tcurrently

精彩专题

热门资料

SQL Server 2005 教程.ppt

中兴内部教材一 --PCB基础概念、工艺、装配及测试(密码2069977).pdf

数字手机元器件识别与检测.pdf

PCB设计规范2010最新版.pdf

该用户的其他资料

  • 名称/格式
  • 评分
  • 下载次数
  • 资料大小
  • 上传时间

用户评论

0/200
    暂无评论
上传我的资料

相关资料换一换

  • Android User Int…

  • Android.User.Int…

  • Android.User.Int…

  • Android User Int…

  • Android.User.Int…

  • Android.User.Int…

  • Android User Int…

  • Android.User.Int…

  • [android.开发书籍].A…

资料评价:

/ 299
所需积分:0 立即下载
返回
顶部
举报
资料
关闭

温馨提示

感谢您对爱问共享资料的支持,精彩活动将尽快为您呈现,敬请期待!