[英]z elevation on recycler view item click
I'm trying to achieve this layout. 我正在尝试实现这种布局。 When I click on an item (
CardView
) I should display an overlay on top of the entire activity ( 9dp
elevation) and also elevate the item I clicked above the overlay ( >10dp
) 当我单击一个项目(
CardView
)时,我应该在整个活动上方显示一个覆盖图(高程为9dp
),并且还将我单击的项目升高到覆盖图上方( >10dp
)
I have tried changing the properties z
, translationZ
, elevation
and cardElevation
with no success. 我试图改变属性
z
, translationZ
, elevation
和cardElevation
没有成功。 Therefore I think the layout manager doesn't let its children rise above the overlay 因此,我认为布局管理器不会让其子级超过覆盖层
Any ideas on how to workaround? 关于如何解决的任何想法?
The elevation is added to the view width/height as margin. 高程将作为边距添加到视图的宽度/高度。 Depending on the layout you might have to disable the children clipping.
根据布局,您可能必须禁用子剪辑。
Providing the layout xml may help us answer. 提供布局xml可以帮助我们回答。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.