hasOverlappingRendering()和两个ImageViews [英] hasOverlappingRendering() and two ImageViews
问题描述
我有一个自定义的查看
,它包含,除其他外,两个 ImageViews
在彼此的顶部。
我设置 hasOverlappingRendering()
返回假的,并没有任何问题,同时设置阿尔法。
I have a custom View
, which contains, amongst others, two ImageViews
on top of each other.
I set hasOverlappingRendering()
to return false, and haven't had any issues while setting alpha.
但并没有它真的包含重叠性(这两个 ImageViews
)?如果不是这是某种形式的(图形)错误?
But doesn't it really contain overlapping rendering (the two ImageViews
)? Shouldn't this be a (graphical) error of some sort?
推荐答案
一个迟到的答案。但迟到总比不到好。答案是不包含重叠的渲染。我发现下面的视频非常有用:<一href=\"https://www.youtube.com/watch?v=wIy8g8yNhNk&feature=youtu.be&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE&t=247\" rel=\"nofollow\">https://www.youtube.com/watch?v=wIy8g8yNhNk&feature=youtu.be&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE&t=247
A late answer.. But better late than never. The answer is that doesn't contain overlapping rendering. I found the following video really useful: https://www.youtube.com/watch?v=wIy8g8yNhNk&feature=youtu.be&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE&t=247
谷歌的工程师们用一个例子,当你返回false从该hasOverlappingRendering()
Google engineers are explaining with an example what is happening when you return false from the the hasOverlappingRendering()
这篇关于hasOverlappingRendering()和两个ImageViews的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!