默认操作栏高程 [英] Default action bar elevation

查看:72
本文介绍了默认操作栏高程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在自定义布局元素中使用高程,并且希望使用默认操作栏高程值在XML中设置该元素的值.我找不到以XML格式获取它的方法,并且我想避免在代码中调用getElevation().有提示吗?

I want to use an elevation in a custom layout element and I want to set in XML the value of that element using the default action bar elevation value. I can't find a way to get it in XML and I'd like to avoid to call getElevation() in code. Any tips?

推荐答案

默认值为8dp,使用此值创建dimen并在整个项目中使用,我从源头获得它,但

Default value is 8dp, create dimen with this value and use on whole project, I got it from sources, but the material design guidelines state the action bar elevation should be 4dp.

这篇关于默认操作栏高程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆