{"id":20366,"date":"2016-06-07T11:48:42","date_gmt":"2016-06-07T17:18:42","guid":{"rendered":"https:\/\/www.solutionanalysts.com\/blog\/material-design-navigation-drawer-for-android-app-development\/"},"modified":"2023-08-16T23:12:21","modified_gmt":"2023-08-17T04:42:21","slug":"material-design-navigation-drawer-for-android-app-development","status":"publish","type":"post","link":"https:\/\/www.solutionanalysts.com\/blog\/material-design-navigation-drawer-for-android-app-development\/","title":{"rendered":"Material Design Navigation Drawer for Android App Development"},"content":{"rendered":"<p>Android Material Design has its unique Material Theme, vector drawable, custom shadows, animations and widgets. It\u2019s been over a year since the new development platform was launched by Google with the Lollipop version.<\/p>\n<p>A prominent feature of the Material Design based Android framework that every <a href=\"https:\/\/www.solutionanalysts.com\/android-application-development\/\">Android developer<\/a> must know well is the navigation drawer.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Primary_Features\"><\/span>Primary Features<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>It slides in from the left and has three primary aspects &#8211;<\/p>\n<ul>\n<li>Specs- the key specs are the<\/li>\n<li>Typography- Roboto Medium is the Font<\/li>\n<li>Keylines and margins- Icons align at left and right of screen margin at 16dp. Avatars and content associated with margin appear on the left at 72dp and the side nav width is equal to the width minus the height of the action bar. Standard horizontal margins are 16dp for smartphones and 24dp for tablets.<\/li>\n<li>Vertical spacing- the spacing is 24dp for status bar it is 24dp, subtitle is 56dp, and content spacing is 8dp and subtitles and list items are 48dp.<\/li>\n<\/ul>\n<p><strong>Content-<\/strong> since the Nav drawer occupies the full length of the device screen at a resting elevation of 16dp, everything behind the drawer must be visible with a darkened scrim. A list item changes colour after being selected, and Google recommends that this is a primary colour.<\/p>\n<p>A touch ripple can be added to highlight the row of the selected item.<\/p>\n<p>They have given the option to add a darker tint of the primary colour if the touch or ripple colour does not contrast perfectly. The dividers in the nav are full-bleed within the drawer and 8dp padding is to be added above and below each divider.<\/p>\n<p>Settings, Help, Feedback and another support content appears at the bottom of the list.<\/p>\n<p><strong>Know More:<\/strong> <a href=\"https:\/\/www.solutionanalysts.com\/blog\/developers-guide-how-to-work-on-material-design-for-android-apps\/\">Developers guide: How to work on Material Design for Android Apps<\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Types_of_Nav_Drawers_Based_on_their_Behaviour\"><\/span>Types of Nav Drawers Based on their Behaviour<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>There are two types of Nav drawers \u2013 permanent and persistent, based on their application.<\/p>\n<p>The permanent navigation drawers are pinned to the left edge and are always visible. The threshold for their pinning is calculated using three minimum values \u2013 Side nav width , Content padding and Content width<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Permanent_Navigation_Drawer_types\"><\/span><strong>Permanent Navigation Drawer types<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>There are three types of permanent navigation drawers and the structure and behaviour of the interface determine the type of drawer to use.<\/p>\n<ul>\n<li>Full-height navigation drawer &#8211; for applications that have lot of information and use a left-to-right hierarchy<\/li>\n<li>Navigation bar clipped under app bar \u2013 for productivity applications that require screen balance<\/li>\n<li>Floating navigation bar \u2013 for applications with less hierarchy requirement<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Persistent_Nav_Drawer\"><\/span><strong>Persistent Nav Drawer<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Persistent navigation drawer can be toggle opened and closed. It has the same surface elevation as content and opens and closes by default on selecting the menu icon. Since it is placed outside the page grid, when opened, it forces the page content to change a size and adapt a smaller viewpoint.<\/p>\n<p>The Nav Drawers are an essential aspect of every application and Google has a comprehensive design that is easy to integrate and has an ergonomic presentation.<\/p>\n<p>Share your thoughts if you love reading this Material Design Blog and drop a line if you have <a href=\"https:\/\/www.solutionanalysts.com\/mobile-app-development\/\">mobile app development<\/a> requirements.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Android Material Design has its unique Material Theme, vector drawable, custom shadows, animations<\/p>\n","protected":false},"author":1,"featured_media":20367,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[200],"tags":[],"class_list":["post-20366","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android-apps"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/posts\/20366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/comments?post=20366"}],"version-history":[{"count":2,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/posts\/20366\/revisions"}],"predecessor-version":[{"id":32765,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/posts\/20366\/revisions\/32765"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/media\/20367"}],"wp:attachment":[{"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/media?parent=20366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/categories?post=20366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/tags?post=20366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}