android z轴大小,Android Elevation and shadows Z軸高度與陰影

66b52468c121889b900d4956032f1009.png

8种机械键盘轴体对比

本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选?

Android Material Design 中為了讓使用者更專注於某物件, 因此使用了3D空間的Z軸與陰影, 讓整體設計更具有立體感.

zorder_1.png

由上圖來看, 每個Menu與Sub-Menu之間有各自的高度與陰影, 使其畫面看起來具有立體感, 並且專注於最高層的Sub-Sub-Menu.

Android 官方對於不同物件之間規定不同的層級, 且對於Pressed和Normal狀態也有特殊規定.Elevation (dp)Component24Dialog, Picker

16Nav drawer, Right drawer, Modal bottom Sheet

12Floating action button (FAB - pressed)

9Sub menu (+1dp for each sub menu)

8Bottom navigation bar, Menu, Card (when picked up), Raised button (pressed state)

6Floating action button (FAB - resting elevation), Snackbar

4App Bar

3Refresh indicator, Quick entry / Search bar (scrolled state)

2Card (resting elevation) , Raised button (resting elevation), Quick entry / Search bar (resting elevation)

1Switch

c224e301944076465bdeb92e678d9adb.pngRaised button

Resting state: 2dp

Pressed state: 8dp

For desktop only, raised buttons can have an elevation of:

Resting state: 0dp

Pressed state: 2dp

ac8056055453d6ec600afd0b0e199634.pngFloating action button (FAB)

Resting state: 6dp

Pressed state: 12dp

5ccb4d16629ccc08a67145f377d63e0e.pngCard

Resting state: 2dp

Pressed state: 8dp

On desktop, cards can have a resting elevation of 0dp and gain an elevation of 8dp on hover.

e945c2a0bfead31572665c69c8813864.pngMenus and sub menus

Menus: 8dp

Sub menus: 9dp (+1 dp for each sub menu)

zorder_1.pngDialogs : 24dp

0b4de62dca522833b052d50cf74726ab.pngNav Drawer & Right drawer : 16dp

64ac6ef261e33c85461ef07233d9cd47.pngModal bottom sheet : 16dp

d7871b2f2260e1cb5535b8526667be71.pngRefresh indicator : 3dp

baa604871b526781a5ef10c57c9d82a6.pngQuick entry/Search bar

Resting state: 2dp

Scrolled state: 3dp

ec656f2de44e573d34557e0edc9becc7.pngSnackbar : 6dp

4ca9a0931f4b00b35e53081ba06e10c3.pngSwitch : 1dp

e7e468c170139adef12ebc9e1047947c.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值