daimajia / AndroidViewHover

An elegant way to show your menu or messages.
3.21k stars 722 forks source link

Bad recycling in RecyclerView #12

Open dev-alepage opened 9 years ago

dev-alepage commented 9 years ago

In a RecyclerView (I think it causes the same problem in ListView or GridView), when I set an HoverView on a cell, after scrolling, the HoverView is not recycled.

So, if I select one visible item and scroll, I find the state of the previously selected item in another item of the list.

Do you have an idea of the correct way to implement HoverView recycling on scroll ?

deepakbaliga commented 9 years ago

Facing the same problem. Not able to solve it. @dev-alepage Please let me know if you find the solution deepak.baliga9@gmail.com

arashmidos commented 9 years ago

I had the same problem too.

dev-things-30 commented 9 years ago

I had modified this according to my need and hopefully not getting this issue. Take a look. https://www.dropbox.com/s/ixuawrdrldf8rhe/Android%20Hover.zip?dl=0

This is how i used it.

holder.mSampleLayout.setHoverView(holder.llBottom); holder.mSampleLayout.setBlurDuration(550); holder.mSampleLayout.addChildAppearAnimator(holder.llBottom, holder.tvVideoName, Techniques.FlipInX, 550, 250);;

holder.mSampleLayout.addChildDisappearAnimator(holder.llBottom, holder.tvVideoName, Techniques.FlipOutX, 550, 250);

holder.mSampleLayout.addChildAppearAnimator(holder.llBottom, holder.tvDownloadPlay, Techniques.Landing); holder.mSampleLayout.addChildDisappearAnimator(holder.llBottom, holder.tvDownloadPlay, Techniques.TakingOff); try { holder.mSampleLayout.dismissHover(1, holder.llBottom, Techniques.FlipOutX, 1, 0); } catch (Exception e) { }

johnjake commented 6 years ago

@jontyankit can you share your source code? do you have hover_sample.xml in your layout? I was working on it but it doesnt show anything I dont get error either.