Android 40 Devices and Displays.docx
- 文档编号:2949137
- 上传时间:2022-11-16
- 格式:DOCX
- 页数:22
- 大小:1.08MB
Android 40 Devices and Displays.docx
《Android 40 Devices and Displays.docx》由会员分享,可在线阅读,更多相关《Android 40 Devices and Displays.docx(22页珍藏版)》请在冰豆网上搜索。
Android40DevicesandDisplays
DevicesandDisplays
PREVIOUSNEXT
Androidpowersmillionsofphones,tablets,andotherdevicesinawidevarietyofscreensizesandformfactors.BytakingadvantageofAndroid'sflexiblelayoutsystem,youcancreateappsthatgracefullyscalefromlargetabletstosmallerphones.
Beflexible
Stretchandcompressyourlayoutstoaccommodatevariousheightsandwidths.
Optimizelayouts
Onlargerdevices,takeadvantageofextrascreenrealestate.Createcompoundviewsthatcombinemultipleviewstorevealmorecontentandeasenavigation.
Assetsforall
Provideresourcesfordifferentscreendensities(DPI)toensurethatyourapplooksgreatonanydevice.
Strategies
Sowheredoyoubeginwhendesigningformultiplescreens?
Oneapproachistoworkinthebasestandard(mediumsize, MDPI)andscaleitupordownfortheotherbuckets.Anotherapproachistostartwiththedevicewiththelargestscreensize,andthenscaledownandfigureouttheUIcompromisesyou'llneedtomakeonsmallerscreens.
Formoredetailedinformationonthistopic,pleasevisit SupportingMultipleScreens.
Themes
PREVIOUSNEXT
GmailinHoloLight.
SettingsinHoloDark.
TalkinHoloLightwithdarkactionbar.
ThemesareAndroid'smechanismforapplyingaconsistentstyletoanapporactivity.Thestylespecifiesthevisualpropertiesoftheelementsthatmakeupyouruserinterface,suchascolor,height,paddingandfontsize.Topromotegreatercohesionbetweenallappsontheplatform,AndroidprovidesthreesystemthemesthatyoucanchoosefromwhenbuildingappsforIceCreamSandwich:
∙HoloLight
∙HoloDark
∙HoloLightwithdarkactionbars
ApplyingthesethemeswillgoalongwayinhelpingyoutobuildappsthatfitrightintothegeneralvisuallanguageofAndroid.
Pickthesystemthemethatbestmatchestheneedsanddesignaestheticsforyourapp.Ifyourdesireistohaveamoredistinctlookforyourapp,usingoneofthesystemthemesasastartingpointforyourcustomizationsisagoodidea.Thesystemthemesprovideasolidfoundationontopofwhichyoucanselectivelyimplementyourownvisualstylings.
TouchFeedback
PREVIOUSNEXT
Usecolorandilluminationtorespondtotouches,reinforcetheresultingbehaviorsofgestures,andindicatewhatactionsareenabledanddisabled.
Wheneverausertouchesanactionableareainyourapp,provideavisualresponse.Thisletstheuserknowwhichobjectwastouchedandthatyourappis"listening".
States
MostofAndroid'sUIelementshavetouch-feedbackbuiltin,includingstatesthatindicatewhethertouchingtheelementwillhaveanyeffect.
Communication
Whenyourobjectsreacttomorecomplexgestures,helpusersunderstandwhattheoutcomeoftheoperationwillbe.Forexample,inRecents,whenyoustartswipingathumbnailleftorright,itstartstodim.Thishelpstheuserunderstandthatswipingwillcausetheitemtoberemoved.
Boundaries
Whenuserstrytoscrollpasttheupperorlowerlimitofascrollablearea,communicatetheboundarywithavisualcue.Forexample,ifauserattemptstoscrollpastthefirsthomescreenpanel,thescreencontenttiltstotherighttoindicatethatfurthernavigationinthisdirectionisnotpossible.ManyofAndroid'sscrollableUIwidgets(e.g.listsorgridlists)alreadyhavesupportforboundaryfeedbackbuiltin.Ifyouarebuildingcustom,keepboundaryfeedbackinmindandprovideitfromwithinyourapp.
MetricsandGrids
PREVIOUSNEXT
Devicesvarynotonlyinphysicalsize,butalsoinscreendensity(DPI).Tosimplifythewayyoudesignformultiplescreens,thinkofeachdeviceasfallingintoaparticularsizebucketanddensitybucket.Thesizebucketsare handset(smallerthan600dp)and tablet (largerthanorequal600dp).Thedensitybucketsare LDPI, MDPI, HDPI,and XHDPI.Optimizeyourapplication'sUIbydesigningalternativelayoutsforsomeofthedifferentsizebuckets,andprovidealternativebitmapimagesfordifferentdensitybuckets.
Spaceconsiderations
Devicesvaryintheamountofdensity-independentpixels(dp)theycandisplay.
Toseemore,visitthe ScreenSizesandDensitiesDeviceDashboard.
48dpRhythm
TouchableUIcomponentsaregenerallylaidoutalong48dpunits.
Why48dp?
Onaverage,48dptranslatetoaphysicalsizeofabout9mm(withsomevariability).Thisiscomfortablyintherangeofrecommendedtargetsizes(7-10mm)fortouchscreenobjectsanduserswillbeabletoreliablyandaccuratelytargetthemwiththeirfingers.
Ifyoudesignyourelementstobeatleast48dphighandwideyoucanguaranteethat:
∙yourtargetswillneverbesmallerthantheminimumrecommendedtargetsizeof7mmregardlessofwhatscreentheyaredisplayedon.
∙youstrikeagoodcompromisebetweenoverallinformationdensityontheonehand,andtargetabilityofUIelementso
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Android 40 Devices and Displays