create a ripple.xml
set the drawable to a
ImageView
I found that the circle is draw outside current ImageView
How does this work
create a ripple.xml
set the drawable to a ImageView
I found that the circle is draw outside current ImageView
How does this work
The reason is about hardware accelerate,see the function isProjected()
in RippleDrawable
.
If isProjected()
return true
, DislayList
will hold this RenderNode
(see http://androidxref.com/7.1.1_r6/xref/frameworks/base/libs/hwui/DisplayListCanvas.cpp#addRenderNodeOp)
Easiest way- put the ImageView inside a larger layout, and apply the ripple to the layout.