Design for Android · App bar • The 7tle in the app bar reflects the current page. It can be an...

Preview:

Citation preview

DesignforAndroid

MaterialDesignGuidelines

•  Layout•  Style•  Anima7on•  Components•  Pa;erns•  Usability

Slidesbasedon“AndroidDesign”h;ps://developer.android.com/design/

Layout

•  Guidedbyprint-basedelements:– Typography– Grids– Space– Scale– Color–  Imagery

HierarchyMeaningFocus

List-KeylinesandMargins

ScreenedgeleLandrightmargins:16dpContentassociatedwithaniconoravatarleLmargin:72dpHorizontalmarginsonmobile:16dp

List-Ver7calSpacing

(1)Statusbar:24dp(2)Toolbar:56dp(3)Sub7tle:48dp(4)Listitem:72dp

Detail– KeylinesandMargins

ScreenedgeleLandrightmargins:16dpContentleLmarginfromscreenedge:72dp

Detail–Ver7calSpacing

Statusbar:24dpToolbar:56dpTitleandlistitems:72dpSub7tle:48dpSpacebetweencontentareas:8dp

Naviga7onDrawer– Keylines&Margins

ScreenedgeleLandrightmargins:16dpContentassociatedwithaniconoravatarleLmargin:72dpSidenavwidth:Thescreenwidthminustheheightoftheac7onbar.Here,thewidthis56dpfromtherightscreenedge.

Naviga7onDrawer–Ver7calLines

Accountmenuandlistitems:48dpSpacebetweencontentareas:8dpNaviga7onrightmargin:56dp

Ra7oKeyline

•  Thepropor7onofanelement’swidthtoitsheight(calledtheaspectra7o)appliestobothUIelementsandscreensize.Itiswri;enaswidth:height.

Ra7oKeylines

Ra7oKeylines

SizingbyIncrements

TouchTargetSize

Toensurebalancedinforma7ondensityandusability,touchtargetsshouldbeatleast48x48dp.Inmostcases,thereshouldbe8dpormorespacebetweenthem.

Structure

Thisstructureincludesapermanentappbarandfloa7ngac7onbu;on.Anop7onalbo;ombarcanbeaddedforaddi7onalfunc7onalityorac7onoverflow.Sidenavmenusoverlayallotherstructuralelements.

UIRegions

HorizontalDivider Ver7calDivider

UIRegions

AvoidslicinguptheinterfaceintotoomanyregionswhichcancauseLshapes.Instead,usewhitespacetodelineatesecondaryareas.

UIRegions

CardBreakinganEdge Floa7ngAc7onBu;onBreakinganEdge

UIRegions

Usecardstoorganizecontentwhenspecificbehaviorsareneededorifgroupingsofinforma7onneedmoresepara7onthanwhatwhitespaceordividerscan

provide.

Toolbars

Full-width,defaultheightappbar

Toolbars

Full-width,extendedheightappbar

Toolbars

Column-widthtoolbarsatmul7plelevelsofhierarchy

Toolbars

Flexibletoolbarandcardtoolbar

Toolbars

Floa7ngtoolbar

Toolbars

DetachedToolbarPale;e

Toolbars

Bo;omtoolbarthatlaunchestoashelfandclingstothetopofthekeyboardorotherbo;omcomponent

Toolbars

Bo;omtoolbarshelf

Appbar•  Specialkindoftoolbarthat’susedforbranding,naviga7on,search,andac7ons.

•  ThenaviconattheleLsideoftheappbarcanbe:– Acontroltoopenanaviga7ondrawer– Anuparrowfornaviga7ngupwardthroughyourapp’shierarchy

– Omi;eden7relyifnonaviga7onisrequiredfromthisscreen

Appbar•  The7tleintheappbarreflectsthecurrentpage.Itcanbeanapp7tle,page7tle,orapagefilter.

•  Iconsontherightsideoftheappbarareapp-relatedac7ons.Themenuiconopenstheoverflowmenu,whichcontainssecondaryac7onsandmenuitemslikehelp,segngs,andfeedback.

AppbarHidingtheappbar:ActionBar actionBar = getSupportActionBar();if (actionBar != null) {

// hides titleactionBar.setDisplayShowTitleEnabled(false);

// hides action baractionBar.hide();

}

Appbar

AppbarstructureOntheleL:Navicon,7tle,andfiltericonOntheright:Ac7onandmenuicons

Appbar

Light Dark

Appbar

Colored Transparent

Appbar

SingleColor(default) Dis7nctTitleColor

The7tlecanhaveadis7nctcolorfromtheiconsifincreasedvisualhierarchyisneeded.Dis7nct7tlecolorsworkbestonbackgroundswithenoughcontrastfor

bothwhiteandblackglyphs.

Appbar

•  MoreinforegardingappbarinLayoutGuidelines

Menu

Exampleofanappbar Exampleofmenuinanappbar

Amenuisatemporarysheetofpaperthatalwaysoverlapstheappbar,ratherthanbehavingasanextensionoftheappbar.

Recommended