首页 Android User Interface Development - Beginners …

Android User Interface Development - Beginners Guide.pdf

Android User Interface Developm…

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

简介:本文档为《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

职业精品

(汽车)产品营销策划书范文.doc

HH牙膏营销方案策划书.doc

加班管理人力资源考勤管理系统方案.doc

物品采购管理制度-正式.doc

用户评论

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

精彩专题

相关资料换一换

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

  • Android.User.Int…

  • Android.User.Int…

  • Android User Int…

  • Android.User.Int…

  • Android User Int…

  • Android.User.Int…

  • Android User Int…

  • Android.User.Int…

资料评价:

/ 299
所需积分:0 立即下载

意见
反馈

返回
顶部