android - 抽屉导航图案 Material 设计

标签 android material-design

Google 刚刚在他们的博客中发布了 a post讨论实现 Material 设计的最佳实践。它说:

If the app uses a navigation drawer, it follows the newer material design interactions and styling (Figure 7). The drawer appears in front of the app bar. It also appears semitransparent behind the status bar.

但是,如果您查看它在 Google Play Store 和 Inbox by Gmail 等应用中的实现方式,就会发现抽屉导航位于操作栏(工具栏)下方。

enter image description here

但是,Play Newsstand 和 Pushbullet 等应用按照建议使用工具栏上方的抽屉。 那么,我应该使用哪一个?

请注意,如果我应该将抽屉放在工具栏上方,为什么 Google 完全要在汉堡包图标中实现动画 (ActionBarDrawerToggle)?

最佳答案

您应该使用 Material Specs 中的版本,并在栏上显示您的左侧抽屉。

收件箱上 NavigationDrawer宽度也不正确:

The width of the side nav is equal to the width of the screen minus the height of the action bar, or in this case 56dp from the right edge of the screen.

Mobile: Width = screen width - app bar height

Desktop: Max width for the left nav is 400dp. The right nav can vary depending on content.

当你拉出右边的抽屉时,动画也会显示,它应该显示在抽屉的下方。此外,您的抽屉可以是(半)半透明的。

关于android - 抽屉导航图案 Material 设计,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26620007/

相关文章:

java - MTaaS 导致资源泄漏

android - 从 CLI 构建时,Cordova 向 AndroidManifest.xml 添加了不需要的权限

android - 如何制作 Material Design 全屏对话框?

css - 像 Material Design 一样基于 z-index 的盒子阴影

java - Android,有没有API可以从邮箱(本地/网络)读取邮件?

java - NullPointerException - 尝试调用虚拟方法 `notifyDataSetChanged()`

java - java.lang.NoClassDefFoundError:无法解决以下问题:Lcom/fasterxml/jackson/databind/ObjectMapper

html - 网页 Material 设计 - 如何进行自动完成输入

css - 移动浏览器列 View 问题 Material 设计(css)

javascript - Angular 2 应用程序和静态 html 页面之间共享的 Material Design CSS/JS