I need to add a fading effect on a ImageView
.
In my situation I have a RelativeLayout
, the relative background in yellow and in the center of that background there is a ImageView
. Now I need to apply a fade affect on the edge of the ImageView
. Is this possible? (Android api 11+
)
I tried:
android:requiresFadingEdge="horizontal"
android:fadingEdge="horizontal"
android:fadingEdge="vertical"
android:fadingEdgeLength="40px"
but doesn't work..
This is an example of what I want. Like you can see the top and the left are fading, the right and bottom edge, instead, are not fading..
Thanks a lot!
Override methods in ImageView as written below:
And on initialization of view add lines:
Try this work around: Don't need to extend ImageView