在pre-棒棒糖设备进行的ImageButton高程效应 [英] Elevation effect for ImageButton on Pre-Lollipop devices

查看:152
本文介绍了在pre-棒棒糖设备进行的ImageButton高程效应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在申请的ImageButton海拔效果。它运作良好,运行Android 5.0的Nexus我的平板电脑,但高度不能在pre-棒棒糖设备上工作。

I am trying the apply elevation effect for ImageButton. It works well on my Nexus tablet running Android 5.0 but elevation does not work on Pre-Lollipop devices.

试过ViewCompat.setElevation(查看,evaluationValue),但什么都没有改变。

Tried ViewCompat.setElevation(view, evaluationValue) but nothing changed.

我看到了像群或Gmail应用某些应用上pre-棒棒糖设备使用效果标高为他们的FAB(浮动操作按钮)。

I saw some applications like Swarm or Gmail apps use elevation effect for their FAB (Floating Action Button) on Pre-Lollipop devices.

你有一个想法,他们如何使用标高是多少?

Do you have an idea how they use elevation?

推荐答案

您不能用海拔pre 5.0,您需要提供一个形象与影子,以使它看起来像它的升高

You cannot use elevation pre 5.0, you need to provide an image with a "shadow" to make it appear like its elevated

这篇关于在pre-棒棒糖设备进行的ImageButton高程效应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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