关闭

关闭

封号提示

内容

首页 Android User Interface Development - Beginners …

Android User Interface Development - Beginners Guide.pdf

Android User Interface Developm…

上传者: xuanguang 2013-11-03 评分 3 0 13 2 57 暂无简介 简介 举报

简介:本文档为《Android User Interface Development - Beginners Guidepdf》,可适用于IT/计算机领域,主题内容包含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

类似资料

该用户的其他资料

TCPIP详解-卷1-协议.pdf

TCPIP详解卷2-实现.pdf

Computer Networks-A Systems Approach (3rd Edition).pdf

Apress.Pro.Application.Lifecycle.Management.with.Visual.Studio.2012.2nd.Edition.2012.pdf

Programming Android(2nd Edition).pdf

职业精品

精彩专题

上传我的资料

精选资料

热门资料排行换一换

  • Economics - Samu…

  • The_Rhetoric_of_…

  • 四库全书影印本.pdf

  • 蓄电池基础知识图解1.pdf

  • 时间管理++如何充分利用你的24…

  • 董秀芳 汉语的词库与词法.pdf

  • 普通高中语文课程标准(实验).d…

  • 律师之道:新律师的必修课.pdf

  • 牟宗三四大演讲汇编.doc

  • 资料评价:

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

    意见
    反馈

    返回
    顶部