Closed ccentauri closed 8 years ago
The problem here is that you're initially setting your View's visibility to 'gone'. If the visibility is 'gone', your view is not taken into account for layout purposes, so all its layout parameters, such as width, height, top or bottom have a value of 0.
The first time you call the revealShow method you are creating a circular reveal animation of radius=0, hence you don't see anything. After this call, the right layout parameters for the View will be calculated, since you changed the visibility to 'visible'. That way, all subsequent circular reveal animations will have the correct radius.
Solution: change the View's visibility to 'invisible'. That way, opposite to 'gone', the view will be taken into account when layout takes place.
Hi! I use this awesome library to create CircularReveal animation in RecyclerView when SearchView is pressed and I have a little bug. Animation works fine, but only after first open and close of SearchView. When I open Activity and press SearchView, RecyclerView appears without CircularReveal animation, and when I close it and open again, all works fine.
Here is my XML:
My Animation methods:
My
SearchView's
OnClickListener
:My SearchView's OnCloseListener: